Recent

Author Topic: [SOLVED] Color printing of my Source Editor code  (Read 3195 times)

WickedDum

  • Full Member
  • ***
  • Posts: 211
[SOLVED] Color printing of my Source Editor code
« on: January 30, 2015, 01:51:26 am »
I would like to print the code as it is displayed in the Source Editor, i.e. comments in blue, compiler instructions in red, reserved words bolded, etc.  I found a post from 2011 that mentioned it could not be done.

Has this capability been implemented yet?

(It's really not worth [Alt][PrintScreen]-ing and then pasting into Word ...)   %)
 
Thanks!!
« Last Edit: January 31, 2015, 07:04:19 am by WickedDum »
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9855
  • Debugger - SynEdit - and more
    • wiki
Re: Color printing of my Source Editor code
« Reply #1 on: January 30, 2015, 03:22:27 am »
There is no direct way, but there is a better way than screenshots.

File > Export as html

Then print this.

WickedDum

  • Full Member
  • ***
  • Posts: 211
Re: Color printing of my Source Editor code
« Reply #2 on: January 31, 2015, 03:09:53 am »
Thanks for the info!  I wasn't printing anyway.  ;-)

Where's the code for the printer routines?  S'pose it wouldn't hurt if I took a look...
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9855
  • Debugger - SynEdit - and more
    • wiki
Re: Color printing of my Source Editor code
« Reply #3 on: January 31, 2015, 05:13:35 am »
I think it is in the package Printer4LazIDE

Find the RegisterIDEMenuCommand, that registers the handlers that are called.


For colors see  ide/main.pp  line 3074
procedure TMainIDE.mnuExportHtml(Sender: TObject);


WickedDum

  • Full Member
  • ***
  • Posts: 211
Re: Color printing of my Source Editor code
« Reply #4 on: January 31, 2015, 07:03:55 am »
Thank you!!
Practice Safe Computing!!

Intel i5-4460K @ 3.2GHz | Win8.1 64-bit | FPC: v3.0 | Lazarus:  v1.6.0

 

TinyPortal © 2005-2018