RE: Word to PDF - PPD setup - longish

Subject: RE: Word to PDF - PPD setup - longish
From: "Steve Hudson" <steve -at- wright -dot- com -dot- au>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Thu, 26 Jul 2001 15:11:27 +1000

Me> 1) Setup PPD with Distiller's latest PS printer driver with page def.
dmbrown> I'd try your method, but I'm afraid I can't interpret your
instructions in step 1.

Ok, lets expand that one out a bit. All printers have physical restrictions
that givern the page sizes they can use, and what the actual printable area
is. This info is kept in a PPD file. The PPD file is provided separately
with the device drivers, especially the Adobe PS driver.

So, you expand the adobe .zip file, and load the .ppd into wordpad.

You will see the ascii descriptions for the other pages - if you are playing
with the distiller file you will see that the page defs match the printable
areas defs - as it is a logical printer we can print to every pixel on the
page if we want to.

We need to insert an entry into every section for our own custom page size.
First, work out the size of your custom page in points - the universal
typographic unit of measurement.

Now, lets look at what we find in Adobe's PPD:

First theres some header guff. Its pretty self explantory: languages,
manufacturer etc.

Then we have Options and Constraints - this is empty for the PS driver.

Next is Device Capabilities, this is still "hardware" specs, and irrelevant
to our page size defs.

Next is Multiple Resolution support, again, a "hardware" spec. Theoretically
one could add custom resses to this list if required.

Next is Halftone Information, see my computer art primer on the HATT web
site for glossary defs.

Finally, we are now at the paper section! It starts with Paper Handling

First, note the DefaultPageSize - I set this to my custom pagesize NAME. I
call our custom page size USERGUIDE, instead of A4, A3 etc. So the page size
comes up in word (once the driver is loaded as the default printer) as
USERGUIDE where it normally says A4, Letter, Legal etc.


An eg entry from this section reads:

*PageSize Letter: "
2 dict dup /PageSize [612 792] put dup /ImagingBBox null put
setpagedevice"
*End

The first bit, "2 dict dup" says its duplex (print both sides). The next bit
is what we are interested in, in the Letter example above we have a pagesize
of 612 points x 792 points. Thats the actual paper size.

So, we fake a new entry by copying an existing one, and overwriting the name
and size, like this:

*PageSize UserGuide: "
2 dict dup /PageSize [539 625] put dup /ImagingBBox null put
setpagedevice"
*End

Tip: Because we are tricky dickys, my gfx designer often produces color
plates for interchapter breaks, and these are produced with bleed. So I also
set up a custom page size 1cm bigger, to allow for a 5mm bleed on each side.

*PageSize UGuide_Plates: "
2 dict dup /PageSize [595.3 680.3] put dup /ImagingBBox null put
setpagedevice"
*End


Now, the next little section is the code that shoves the values into the
system when a new page size is selected, it starts with

?PageSize: "
save
currentpagedevice /PageSize get aload pop

then it has a bunch of entries, like this:
dup [612 792] (Letter) put

Note that the size in here is the same as used before, 612x792

So our new line to add becomes:

dup [539 625] (UserGuide) put

So far so easy. Now the next section is the printable area, again, in the
Adobe virtual PS driver we can print to the entire area, so we just use the
same point dimensions as before.

The section starts with

*OpenUI *PageRegion: PickOne

again, note the DefaultPageRegion: setting just underneath and change this
to your common custom page size name as well.

*DefaultPageRegion: UserGuide

Now the region defs start, the eg:

*PageRegion Letter: "
2 dict dup /PageSize [612 792] put dup /ImagingBBox null put
setpagedevice"
*End

Like I said, same numbers coz its a virtual driver, so our new entry
becomes:

*PageRegion UserGuide: "
2 dict dup /PageSize [539 625] put dup /ImagingBBox null put
setpagedevice"
*End

Then the ppd sets 'margins', two offsets, and two measurements. We use an
offset of zero, and the same measurements as before:

*ImageableArea UserGuide: "0.0 0.0 539.0 625.0"

Next, a list of physical dimensions of the paper by keyword, again, a
trivial solution:

*DefaultPaperDimension: UserGuide
*PaperDimension UserGuide: "539 625"


Now its back to lotsa BS again. First is a stack of screening definitions,
this is how process printers lay the color down, see the Computer Art Primer
for more info. Finally, a bit of stuff on fonts.

So, as can be seen, its a fairly trivial job to define your new page size.
Then you install the printer, and when prompted for the ppd, you give it
your custom one.

Steve Hudson
Lead Technical Writer
Wright Technologies (Aus)
steve -at- www -dot- wright -dot- com -dot- au
(612) 9518-1822
The best way to predict the future... is to create it!


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

*** Deva(tm) Tools for Dreamweaver and Deva(tm) Search ***
Build Contents, Indexes, and Search for Web Sites and Help Systems
Available now at http://www.devahelp.com or info -at- devahelp -dot- com

Learn about tools and technologies for user assistance developers at
The Help Technology Conference, August 21-24 in Boston, MA
Details and online registration at http://www.SolutionsEvents.com


---
You are currently subscribed to techwr-l as: archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.


Previous by Author: RE: Word to PDF
Next by Author: RE: A Different Single Sourcing Question...
Previous by Thread: Obtaining WinHelp4 Help Workshop -- is it possible?
Next by Thread: Single Sourcing


What this post helpful? Share it with friends and colleagues:


Sponsored Ads