Printing from editor

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Hysteria
User
User
Posts: 50
Joined: Sat Oct 23, 2010 8:51 am
Location: UK

Printing from editor

Post 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
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Printing from editor

Post 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.)...
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Printing from editor

Post 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
Hysteria
User
User
Posts: 50
Joined: Sat Oct 23, 2010 8:51 am
Location: UK

Re: Printing from editor

Post 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:
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: Printing from editor

Post 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
Image Image
Hysteria
User
User
Posts: 50
Joined: Sat Oct 23, 2010 8:51 am
Location: UK

Re: Printing from editor

Post 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:
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Printing from editor

Post 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
Post Reply