Hard copy of Purebasic code

Working on new editor enhancements?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Hard copy of Purebasic code

Post by ts-soft »

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Hard copy of Purebasic code

Post by Lunasole »

Never needed to print code, but I think you can make simple x-platform util this way:
1. Send selected text from IDE to your tool (it is possible by tool command line or Scintilla commands)
2. In your tool use example from "Purebasic\SDK\Syntax Highlighting" to highlight PB code (if you need colored printing)
3. Print results using Printer library
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User_Russian
Addict
Addict
Posts: 1443
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: Hard copy of Purebasic code

Post by User_Russian »

Scintilla supports printing of text. http://www.scintilla.org/ScintillaDoc.html#Printing
Neil
Enthusiast
Enthusiast
Posts: 198
Joined: Wed Feb 29, 2012 8:04 am
Location: Melbourne, AUS

Re: Hard copy of Purebasic code

Post by Neil »

To print a file I just open the file in my text editor (in my case PSPad - an excellent freeware editor - color formatting etc)
RNBW
User
User
Posts: 65
Joined: Thu Jan 02, 2014 5:01 pm

Re: Hard copy of Purebasic code

Post by RNBW »

Neil wrote:To print a file I just open the file in my text editor (in my case PSPad - an excellent freeware editor - color formatting etc)
Much better than copying and pasting. However, I couldn't find a way to have colour formatting. Purebasic isn't one of the standard languages that would allow you to do this. PSPad is indeed an excellent freeware editor.
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: Hard copy of Purebasic code

Post by Marc56us »

I couldn't find a way to have colour formatting. Purebasic isn't one of the standard languages that would allow you to do this. PSPad is indeed an excellent freeware editor.
Uses Notepad++ (https://notepad-plus-plus.org/)
Notepad++ is based on Scintilla component like PB so it's easy to use (some) shortcuts

For color formatting:
- Setting > Style configurator > use "AutoIt" as base (autoit use basic syntax)
- Change others style same as PB
- Click Save and close

:wink:
RNBW
User
User
Posts: 65
Joined: Thu Jan 02, 2014 5:01 pm

Re: Hard copy of Purebasic code

Post by RNBW »

After looking at the various options, i think that the solution below is probably about the best. There are others covered by the link provided by IdeasVacuum, but i couldn't get any of them to print in colour.

http://www.purebasic.fr/english/viewtopic.php?t=38783

It is possible to link Notepad++ or PSPad from the Tools menu, which is slightly quicker than copying and pasting. Again, these don't print totally in colour so there is no great adavantage.

Purebasic is a very good piece of software, but I think it is let down by not being able to print out its code directly from its editor.

__________________________________________________
Link repaired
08.03.2016
RSBasic
RNBW
User
User
Posts: 65
Joined: Thu Jan 02, 2014 5:01 pm

Re: Hard copy of Purebasic code

Post by RNBW »

I've had another look at PureBasicPrint. Although I couldn't get it to print in colour, it does have its advantages in that you can get at its source code and there is also a useful Microsoft Word file that shows how to configure it, including inserting a VERY useful printer icon on the Toolbar.

http://forums.purebasic.com/english/vie ... highlight=
RNBW
User
User
Posts: 65
Joined: Thu Jan 02, 2014 5:01 pm

Re: Hard copy of Purebasic code

Post by RNBW »

You may have difficulty getting a download link for PureBasicPrint. Vera kindly provided a link at:
http://www.purebasic.fr/english/viewtop ... 5&start=15
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Hard copy of Purebasic code

Post by IdeasVacuum »

I think Flype's work could form the basis of an official print button in the IDE.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply