Recent

Author Topic: [SOLVED] Is it possible to print Syntax highlight?  (Read 2813 times)

egsuh

  • Hero Member
  • *****
  • Posts: 1289
[SOLVED] Is it possible to print Syntax highlight?
« on: June 25, 2019, 08:29:38 am »
in colors..

and is it possible to remove line numbers in printing?
« Last Edit: June 25, 2019, 11:45:46 am by egsuh »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Is it possible to print Syntax highlight?
« Reply #1 on: June 25, 2019, 09:27:37 am »
I think you need to add some context  ;)  Where? What? When?

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Is it possible to print Syntax highlight?
« Reply #2 on: June 25, 2019, 10:26:29 am »
If you refer to the Print ... menu under the main IDE File menu, then all things are possible, but not without extending the IDE beyond its current capabilities.
To add an option for line number printing to be optional could be done fairly easily, since this would involve merely keeping or discarding information that the current print routine calculates.

To provide for colour printing of syntax highlights (presumably grayscaled on non-colour printers) would be considerably more complex, since the print routine would have to access (or construct) individual highlight information for every code point in the source editor synedit that was to be printed.

Thaddy

  • Hero Member
  • *****
  • Posts: 14360
  • Sensorship about opinions does not belong here.
Re: Is it possible to print Syntax highlight?
« Reply #3 on: June 25, 2019, 10:38:41 am »
There are several html highlighters for Pascal that can be used to pipe to your browser and then print from the browser, if that is an acceptable solution.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: Is it possible to print Syntax highlight?
« Reply #4 on: June 25, 2019, 10:49:10 am »
The IDE has an "export to html" function. This preserves the colors, you can then print this from your browser.

The "print" function in the IDE does not yet support color. (would be nice to have)

egsuh

  • Hero Member
  • *****
  • Posts: 1289
Re: Is it possible to print Syntax highlight?
« Reply #5 on: June 25, 2019, 11:45:31 am »
Alright. Thank you for your kind replies.
Yes, it's simple to open the pascal file in other text editors which support syntax highlights.

Thaddy

  • Hero Member
  • *****
  • Posts: 14360
  • Sensorship about opinions does not belong here.
Re: [SOLVED] Is it possible to print Syntax highlight?
« Reply #6 on: June 25, 2019, 02:02:21 pm »
I would recommend Geany which supports Pascal and - almost - does what you want.
It has some trouble with some of the more advanced FreePascal syntax, though, but so do alternatives.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018