Save source code with formatting (syntax highlighting)

I need to send my code to the competition in .pdf format. It would be nice and much easier to read if the syntax was highlighted as in a real studio. I really don't feel like highlighting it myself, line by line, so is there a way to export Delphi source code to .rtf?

thanks

+8
export delphi rtf
source share
6 answers

Two free IDE enhancements have the functionality you are looking for (I think):

+14
source share

There's also John Custer YAPP (another beautiful printer), a web service, or a standalone executable .

+5
source share

GExperts contains an expert Source Export . It is integrated into the Delphi development environment: Screenshothot

+4
source share

GVim has an β€œexport to HTML” function - it cannot do line numbers and background colors; however, dark themes should be avoided since they will not look the way you expect. Then you can open the file in your web browser and from there print it in PDF format.

+1
source share

CnWizards can break non-Latin characters.

At least in XE2, sources with Russian characters were broken when exported to RTF. They were also broken by default when exporting HTML / UTF8.

And since I used some characters (Greek letters) outside of English + Russian, they were borken even with non-standard HTML / windows-1251 export

Also, CnWizards cannot export DFMs, which are also part of the project.

External tools, such as SynEdit, SynPlus, or YAPP, are good, but they cannot immediately convert the entire project, cannot reuse individual coloring in the IDE, and may not have the most recent syntax changes in the latest Delphi releases.

0
source share

One possible way to save DFM is to print from the IDE to a free PDF printer or to the Microsoft XPS printer available on Windows 7.

The latter creates a page too large that cannot be placed on the printed page. This is when the STDU Viewer comes to the rescue - it allows File | Advanced Printing | Paste in printer margin mode to print them on any computer that also copied the file.

0
source share

All Articles