Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Developers


Topic: Automating Distiller and PDFWriter [was: Save As Dialog Box with
Conf: (P-PDF) Developers, Msg: 51885
From: teryk
Date: 5/29/2002 04:48 PM

Jeremy-

Take a look at the PDFWriter API Reference Manual from the Acrobat
_Developer Support Web Page. It documents all of the available
methods for programmatically controlling PDFWriter. The Acrobat
Distiller API Reference documents the methods for controlling Acrobat
Distiller.

http://partners.adobe.com/asn/developer/acrosdk/docs.html

Your main problem in doing this is that PDFWriter is a printer
driver. As such the APIs it can make available are limited.
Applications printing to PDFWriter have all the control they need
using the DOCINFO/DEVMODE structs and the printer escapes documented
in the above technotes but if you are using OLE to control Word (or
some other application) you do not have access to either this struct
or the Device Context needed to use the printer escapes. The registry
and .ini file entries are sort of a backdoor to help out in these
situations. They work in some situations but do not amount to a
robust solution.

The main issue is that PDFWriter initially reads the registry when a
Device Context for it is acquired. If PDFWriter is the default
printer, some applications will acquire a DC at some point before
printing. This means that changes you make to the .ini or registry
after that will not affect the first print job. There can be other
synchronization issues if you are driving an application via OLE to
print to PDFWriter and modifying the registry each time to specify
the output filename. Although it has been difficult to reproduce
there have been multiple reports of PDFWriter popping a dialog in the
middle of batch processing.

In general this means that using the registry/.ini file to control
PDFWriter works reasonably well for single or small batch print jobs
but is not recommended as a commercial grade large batch printing
solution, although in some environments it may work fine.

Another option is to use Distiller. Distiller supports an OLE
automation interface as well as Windows Messages and a command line
interface. Distiller works well for batch creation of PDF files as
long as you already have a PostScript File.

One way to get a PostScript file is to set up a new port as described here:

http://www.jsiinc.com/TIP0100/rh0117.htm

Once you have the port set up, use the AdobePS5.x setup utility to
create a new PostScript printer using the Distiller PPD file from:
Acrobat4.0\Distillr\Xtras. Specify the port you set up above as the
port. Now every time you print to that printer, you will know exactly
where the PostScript file is as well as the name. You could simply
use a command line like:

acrodist /0 excel_cell.pdf out.ps

Or use one of the other interfaces to do something fancier.

-Teryk







>From: "Jeremy"
>
>------ AcroBuddies Forum | http://www.acrobuddies.com ------
>
>I am currently working on a VB6 project where I am populating a Word
>template with data from a SQL Server database.
>
>When the data has been merged into the Word template it needs to be
>saved as a PDF so that it cannot be edited by users.
>
>I have found a way of disabling the PDFWriter's Save As dialog box
>by editing the PDF.INI files in the relevant NT system
>directory.(Courtesy of Jim Osieczonek article on 9/9/99 and the link
>to Adobe's support page)
>
>My problem is that I need to specify a filename to save the PDF. The
>Adobe support article states that only one specific file name can be
>used in the INI file and that unless the PDF file is renamed it will
>get overwritten. There must be a way to dynamically pass in a file
>name to PDFWriter without using the Save As dialog box. Someone
>please help.
>
>Does the Adobe Distiller driver do what I want ?
>
>Many Thanks
>
>Jeremy Bayliss
>Jago Managing Agency Limited
>jeremy.bayliss@jago.co.uk
>
>
>------ Powered by www.BinaryThing.com & www.PlanetPDF.com ---------
>
> Learn more about PDF from world-class experts:
> PDF 2000 Conference, June 5-7, Scottsdale, Arizona
>
> http://www.planetpdf.com/mainpage.asp?webpageid=727
>------------------------------------------------------------


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.