Printing to pdf

From 4DWiki

Jump to: navigation, search

Contents

[edit] Printing to pdf from 4D

[edit] Printing to pdf from 4D on Windows

[edit] Printing to pdf from 4D on Windows using Ghostscript

This is an interesting method to print pdf from 4D running on Windows. I haven't tried it...

Subject: Re: PDFs from Windows

Date: Thu, 8 May 2008 12:50:57 +0500

From: "Shazia K. Rahim"

To: 4d_tech@lists.4d.com

A couple of years ago, Jens Blomster posted the following technique to generate free PDFs on Windows via Ghostscript from 4D. Here's his description:

  1. install a quality postscript printer driver, for instance Apple ColorLaserWriter 12/600. It's on the WinXP cd distribution.
  2. configure the printer to print postscript to a "local port" which is a tempfile, named for instance C:\pstemp.ps
  3. download and install GNU Ghostscript
  4. in 4D, when you want to print pdf, use Win32API to change printer to the LaserWriter
  5. Print! You will generate a postscript file at C:\pstemp.ps. Test when it's ready (it is ready when it exists and is possible to open for writing, for instance)
  6. use AP Sublaunch or shellExecute to fire the command ps2pdf C:\pstemp.ps C:\mypdf.pdf
  7. test when the pdf is ready, in same way.
code ?


[edit] Printing to pdf from 4D on Mac

Personal tools