Page 1 of 1

Printing from editor

Posted: Sat Feb 19, 2011 5:04 pm
by Hysteria
I'm fairly new to PB but have been thinking that the editor is very good (and so is PB itself...very good!) and how I like the colour scheme I've chosen and then I've come to print some code...

For a while I thought it must be me, I can't find the print function but then it dawned on me (after a bit of searching) that there is no print function. I am astonished!

While I could copy the code to say Notepad++, I lose the colouring. I guess I could replicate it but who wants to copy code to another editor to print when the editor provided is already feature-rich (enough for me anyway!)

Please tell me I'm being stupid and the function is just under my nose :D

If not, could I politely request this being added in the not too distant future.

Many thanks

Hysteria

Re: Printing from editor

Posted: Sat Feb 19, 2011 5:27 pm
by c4s
You are correct, the IDE doesn't support printing out your source code. However, there should be some codes in this forum that should do this for your (with coloring etc.)...

Re: Printing from editor

Posted: Sat Feb 19, 2011 5:52 pm
by Vera
Hello Hysteria,

have a look in here: PureBasicPrint

and did you know you can have your own PB-highlighting in NP++ as well ?
see for more: Notepad++ language template for PureBasic?

greetings ~ Vera

Re: Printing from editor

Posted: Sat Feb 19, 2011 10:41 pm
by Hysteria
Vera wrote:Hello Hysteria,

have a look in here: PureBasicPrint

and did you know you can have your own PB-highlighting in NP++ as well ?
see for more: Notepad++ language template for PureBasic?

greetings ~ Vera
Many thanks for your help Vera.

I've got the NP++ working, though the colours aren't mine.

I've spent some time with the PureBasicPrint and have it printing though only in black&white. I've noticed some of the PB screens are slightly different to those shown in the documentation (I guess it was for an earlier version) so maybe I'm missing something. If I play around with it some more perhaps I'll get it to play ball!

Shame having to muck around when I'd rather be coding, when all I want to do is to print my code in colour from the IDE. Years ago this would have been a luxury (colour) but now it's normal...mind you with regard to printing itself, even my assembler's IDE on my C64 could do that (without any 'add ons') at that was 100 years ago :mrgreen:

Re: Printing from editor

Posted: Sun Feb 20, 2011 12:42 am
by Paul
I use a little app I wrote called HardCopy, which prints straight out of the IDE...
http://www.reelmedia.org/cgi-bin/PurePr ... ub=General

Re: Printing from editor

Posted: Sun Feb 20, 2011 2:37 pm
by Hysteria
Paul wrote:I use a little app I wrote called HardCopy, which prints straight out of the IDE...
http://www.reelmedia.org/cgi-bin/PurePr ... ub=General
Many thanks Paul.

I've given it a try. I like the simple set-up, however, like the other utility, it doesn't print in colour (well not on my printer anyway) and I'm rather keen on that :)

Perhaps one of the PB team could comment on whether this functionality is likely to be added in the near(ish) future. I'd be interested to know why it hasn't been included to this point. Was it that it was tricky to achieve (which I doubt given the power of PB to do everything else!) or perhaps the PB team never enjoyed playing the 'my listing is longer than yours game' :mrgreen:

Re: Printing from editor

Posted: Sun Feb 20, 2011 8:07 pm
by Vera
Hi Hysteria,

I tested PureBasicPrint again today and it wouldn't highlight the code for me either anymore. As I don't print I never use it as addon and have kept it as standalone-commandline-tool just in case I'd like to make a pdf from a code.

What I found out now is that the highlight doesn't work anymore because of the pb-4.5x prefs. With the 4.41 prefs (or below) the keywords are highlighted again.

The manual says to copy Purebasicprint.exe + Syntaxhighlighting.dll into the root folder. What I would test is to place them in a different folder and apply an old prefs-file to it and adjust the tool settings.
Don't forget - the newer commands won't be highlighted anyway because they are defined in the Syntaxhighlighting.dll. But maybe this workaround would do at first.

On the long I think you're more independent and uptodate if you adjust NP++ pb-highlighting to your preferences. Maybe it's possible to install NP++ as IDE-addon if the "%file" parameter sends the classical fullpath ;)

greetings ~ Vera