Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   IT / Communications (http://www.chiefdelphi.com/forums/forumdisplay.php?f=85)
-   -   Code Print (http://www.chiefdelphi.com/forums/showthread.php?t=28949)

Astronouth7303 05-06-2004 11:57

Code Print
 
Does anyone know how to get multiple code files to a single PDF?

What I'm hopping for is to be able to save a bunch of different code files (PIC C), where a new file begins a new page, and preferably with syntax coloring. Help?

Ryan M. 05-06-2004 12:33

Re: Code Print
 
Quote:

Originally Posted by Astronouth7303
Does anyone know how to get multiple code files to a single PDF?

What I'm hopping for is to be able to save a bunch of different code files (PIC C), where a new file begins a new page, and preferably with syntax coloring. Help?

I don't know much about it, but I know this would be possible with PHP. That would be look too, because then it could be something available to everyone if you want it to be. :)

Max Lobovsky 05-06-2004 12:36

Re: Code Print
 
Quote:

Originally Posted by Texan
I don't know much about it, but I know this would be possible with PHP. That would be look too, because then it could be something available to everyone if you want it to be. :)

It would be pretty easy in PHP thanks to PDFlib functions.

mtrawls 05-06-2004 12:40

Re: Code Print
 
Quote:

Originally Posted by Astronouth7303
Does anyone know how to get multiple code files to a single PDF?

What I'm hopping for is to be able to save a bunch of different code files (PIC C), where a new file begins a new page, and preferably with syntax coloring. Help?

Well, do you have just the Acrobat reader program? Assuming this is the case ... you might try PDF::Create, a perl module. This way you could loop over all the files you wanted and harness perl's text processing ability to add syntax highlighting yourself (if desired). Also, OO.o will export to PDF.

Astronouth7303 05-06-2004 13:29

Re: Code Print
 
Quote:

Originally Posted by mtrawls
Well, do you have just the Acrobat reader program? Assuming this is the case ... you might try PDF::Create, a perl module. This way you could loop over all the files you wanted and harness perl's text processing ability to add syntax highlighting yourself (if desired). Also, OO.o will export to PDF.

I'll try that. I don't actually know pearl, but my dad does, so I'll ask him.

I do have PDFwriter (Adobe's PDF print driver), but the problem is that I can't find an editor that will print several files at once.

So far, the best solution I have found is to print them one at a time, open the results, copy them into Word, respace it, and then print it out again. Quite labor intensive. I tried to find an HTML type printer, but no luck (HTML would be easy to append).

Max Lobovsky 05-06-2004 17:18

Re: Code Print
 
Why do you print them to PDFwriter first? To save the color coding? There are dozens of text editors with syntax highlighting. I'm sure some of them will let you copy with color in tact. There is a thread listing a dozen or so (I think you posted in it, so I'm sure you know).

I'd still do it in PHP (or Perl). If you do it in PHP, use SilverStar's C highlighter at http://nrg.chaosnet.org.


All times are GMT -5. The time now is 10:54.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi