Silverfrost Forums

Welcome to our forums

Create a PDF

11 Jan 2012 8:41 #9445

A few years ago I needed to create PDF files from a Clearwin program. The best solution I could come up with at the time was to generate a JPG file to disk and then use a 3rd party command line product (run from within the fortran program) - img2pdf - to read the .JPG and convert to .pdf. Works fine and quickly and with 'OK' quality. [img2pdf is a licenced product for 40 dollars]

I just wondered if others had used any other techniques they could recommend?

Many Thanks

Bill

11 Jan 2012 9:03 #9446

If you have Word for Windows then you could probably use your basic idea with Word by creating a macro to run from a Word command line.

11 Jan 2012 12:08 #9448

Try installing a PDF printer such as the free version of PDF995 and then just print to the pdf printer rather than a physical printer.

11 Jan 2012 1:11 #9449

Dear Paul / Ian,

Many thanks for your suggestions.

What I need to do is to batch process sets of data and create automatically hundreds or thousands of PDF single page reports. The present approach works but quality is not the best. I can certainly create individual pages to output or to file using a pdf printer driver (and I do on occasion), but really want to generate directly from the fortran application in a batch run without user interaction. Not sure about the Word route if this could assist with this but I only have a slightly outdated Word version.

Thanks again, Bill

11 Jan 2012 1:22 #9450

You are right that user intevention is required for PDF printers, but you can set the output name from Clearwin+ using: SET_CLEARWIN_STRING( 'PRINTER_DOCUMENT', filename ) and then only a single key press of 'Enter' is required per file.

Is it possible to:

  1. Override this requirement in the PDF printer?
  2. Use some clearwin function to supply the 'Enter' via something like FEED_WKEYBOARD@?
  3. Place all pages in one file and provide the name once and a single 'Enter' key press?

Over to you Paul!

20 Mar 2012 10:25 #9858

Quoted from BILLDOWS A few years ago I needed to create PDF files from a Clearwin program. The best solution I could come up with at the time was to generate a JPG file to disk and then use a 3rd party command line product (run from within the fortran program) - img2pdf - to read the .JPG and convert to .pdf. Works fine and quickly and with 'OK' quality. [img2pdf is a licenced product for 40 dollars]

I just wondered if others had used any other techniques they could recommend?

Many Thanks

Bill

Bill

You can only get pdf files with embedded bit maps that way which have poor resolution. The Simfit technique is to create vector eps files which are tiny and of device-independent resolution. These can then be used to create pdf, jpg, svg, etc. with excellent resolution. You can do this from Plato now or get the code from my website.

Bill

Please login to reply.