Jump to content

PDDR/2 - Importing PostScript Printer Description files: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{| style="float: right; background: #F5F5F5;"
{{PrintDDRef}}
|- style="background: silver;"
{{IBM-Reprint}}
!Printer Device Driver Reference for OS/2
{{DISPLAYTITLE:Importing PostScript Printer Description files}}
|-
PostScript Printer Description (PPD) files describe the fonts, paper sizes, resolution capabilities, and other features that are standard for your PostScript printer.
|[[Printer Device Driver|About this Book & Introduction]]
|-
|[[Generic Printer Library]]
|-
|[[32-Bit PostScript Driver]]
|-
|[[32-Bit Plotter Presentation Driver]]
|-
|[[The 42XX Rasterizing Driver]]
|-
|[[32-bit Omni Presentation Driver]]
|-
|[[Printer Bidirectional Communications]]
|-
|[[Font Test 32-Bit Printing Utility]]
|-
|[[Printer Test Tool (PTT)]]
|-
|Importing PostScript Printer Description files
|-
|[[IBM SDK/DDK Notices|Notices]]
|-
|[[IBM SDK/DDK Glossary|Glossary]]
|}
''By [[IBM]]''
 
'''Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation'''
=Importing PostScript Printer Description files=
PostScript Printer Description (PPD) files describe the fonts,paper sizes, resolution capabilities, and other features that are standard for your PostScript printer.


PPD files are used by PostScript printer drivers to determine how to print your document (if you do not print using the correct PPD file, your document may not print correctly or all of the printer's features may not be available when you print).
PPD files are used by PostScript printer drivers to determine how to print your document (if you do not print using the correct PPD file, your document may not print correctly or all of the printer's features may not be available when you print).
Line 66: Line 37:
Now spanish2.ppd can be copied into your PPD directory (as d:\PSDRIVER\PPD) and then you can import the PPD files into the PSCRIPT driver (see steps 3-6 below).
Now spanish2.ppd can be copied into your PPD directory (as d:\PSDRIVER\PPD) and then you can import the PPD files into the PSCRIPT driver (see steps 3-6 below).


=== Importing a New PPD (Using PIN.EXE) ===
==Importing a New PPD (Using PIN.EXE)==
PIN.EXE is a utility to add new or upgrade device support in the Postscript driver by importing PPD files. The PPD file is usually created and provided by your PostScript printer manufacturer.
PIN.EXE is a utility to add new or upgrade device support in the Postscript driver by importing PPD files. The PPD file is usually created and provided by your PostScript printer manufacturer.


Syntax:
Syntax:
::<code>PIN.EXE</code>
PIN.EXE
Currently, the only supported command is "PPD".
Currently, the only supported command is "PPD".


Syntax of command 'PPD' arguments:
Syntax of command 'PPD' arguments:
::<code>PIN.EXE PPD</code>
PIN.EXE PPD
The first argument is the directory path where PPD files to be imported are stored. The second argument is the path to the driver (including the driver file name) where the PPD files will be imported.
The first argument is the directory path where PPD files to be imported are stored. The second argument is the path to the driver (including the driver file name) where the PPD files will be imported.


Line 80: Line 51:


===Suggested usage scenario===
===Suggested usage scenario===
1) Create directory where you will store all of the PSCRIPT files.
# Create directory where you will store all of the PSCRIPT files.
::<code>>mkdir d:\PSDRIVER</code>
#:<tt>>mkdir d:\PSDRIVER</tt>
2) Put PIN.EXE in this directory.
# Put PIN.EXE in this directory.
::<code>>copy PIN.EXE d:\PSDRIVER</code>
#:<tt>>copy PIN.EXE d:\PSDRIVER</tt>
3) Create 3 subdirectories in d:\PSDRIVER directory.
# Create 3 subdirectories in d:\PSDRIVER directory.<tt>
<code>
#:>cd d:\PSDRIVER
::>cd d:\PSDRIVER
#:>mkdir BAK
::>mkdir BAK
#:>mkdir PPD
::>mkdir PPD
#:>mkdir OUT</tt>
::>mkdir OUT
#:The BAK directory will be the backup driver files - the original, unmodified driver. Copy the unmodified driver files here.
</code>
#:The PPD directory will contain the PPD files for your new printer devices that you want imported into the driver.
The BAK directory will be the backup driver files - the original, unmodified driver. Copy the unmodified driver files here.
#:The OUT directory will be where you build your driver which contains the new devices to be imported for immediate use or distribution.
 
#:To import new devices into the driver, perform the following steps:
The PPD directory will contain the PPD files for your new printer devices that you want imported into the driver.
# Clean the output directory.
 
#:<tt>>del OUT\*</tt>
The OUT directory will be where you build your driver which contains the new devices to be imported for immediate use or distribution.
# Copy the unmodified driver files from the backup (BAK) to the OUT directory.
 
#:<tt>>copy BAK\* OUT\</tt>
To import new devices into the driver, perform the following steps:
# Run the PIN utility to import the PPDs.
 
#:<tt>>PIN.EXE PPD PPD\ OUT\pscript.drv</tt>
4) Clean the output directory.
#:"PPD" is command that tells PIN.EXE what to do.
::<code>>del OUT\*</code>
#:"PPD\" is path to directory with the source PPD files.
5) Copy the unmodified driver files from the backup (BAK) to the OUT directory.
#:"OUT\pscript.drv" is the driver file name where the PPDs are going to be imported into.
::<code>>copy BAK\* OUT\</code>
#The driver in the OUT\ directory now will have the imported PPDs!
6) Run the PIN utility to import the PPDs.
::<code>>PIN.EXE PPD PPD\ OUT\pscript.drv</code>
:"PPD" is command that tells PIN.EXE what to do.
:"PPD\" is path to directory with the source PPD files.
:"OUT\pscript.drv" is the driver file name where the PPDs are going to be imported into.
7) The driver in the OUT\ directory now will have the imported PPDs!
 
You can install it or distribute it to users.
You can install it or distribute it to users.


'''IMPORTANT:''' After the resources are imported to the printer driver, you can't just 'add' on top of that. If you add a new PPD to the directory and want to make use of it, you have to start with a "fresh" driver and import all of the devices at once, as previously done. It is required that you delete all of the files in the output directory (step 3) and copy the driver from the backup directory (step 4) to perform device importing - every time.
;IMPORTANT: After the resources are imported to the printer driver, you can't just 'add' on top of that. If you add a new PPD to the directory and want to make use of it, you have to start with a "fresh" driver and import all of the devices at once, as previously done. It is required that you delete all of the files in the output directory (step 3) and copy the driver from the backup directory (step 4) to perform device importing - every time.


=== Using the Driver with Imported Devices in a Network Environment ===
==Using the Driver with Imported Devices in a Network Environment==
There is a known problem with updating drivers in a network environment. If you put the driver with imported PPDs on a print server, and distribute it to requesters, then upgrade the server with the same driver with some new PPDs imported, the new devices will not be automatically distributed to requesters.
There is a known problem with updating drivers in a network environment. If you put the driver with imported PPDs on a print server, and distribute it to requesters, then upgrade the server with the same driver with some new PPDs imported, the new devices will not be automatically distributed to requesters.


Line 120: Line 84:


For now, if you update the driver (import new PPDs) you will have to distribute the updated driver to clients by some other means.
For now, if you update the driver (import new PPDs) you will have to distribute the updated driver to clients by some other means.
[[Category:Printer Device Driver Reference]]

Latest revision as of 21:16, 12 November 2018

Printer Device Driver Reference

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation

PostScript Printer Description (PPD) files describe the fonts, paper sizes, resolution capabilities, and other features that are standard for your PostScript printer.

PPD files are used by PostScript printer drivers to determine how to print your document (if you do not print using the correct PPD file, your document may not print correctly or all of the printer's features may not be available when you print).

Your printer manufacture is ultimately responsible for creating and providing the correct PPD file for your printer (you can usually find the PPD file on the floppy disk or CD-ROM included with your printer or visit manufactures Web site to download the PPD file you need, contact the customer support department of your printer manufacturer to find out how to obtain PPD file.)

If you have a device not supported by OS/2 PostScript printer driver, you can "import" a PPD file to add your device using the PIN.EXE utility (see section #Importing a New PPD (Using PIN.EXE) for details). Upgrading devices is supported. If you have a newer version of a PPD for a device that is already supported in the driver and import a newer PPD, the newer version of the PPD will take precedence over the current device.

Converting PPDs with Special Characters (Using PPDENC.EXE)

PPD files are usually provided in IsoLatin1 and WindowsANSI encoding, which are not compatible with the OS/2 code page. Of course, this only affects languages that make use of special characters - like French or Spanish. If you only use English PPDs, you will not need to use this utility.

If PPDs are used for the languages that contain these special characters, conversion of the PPD file to an OS/2 compatible codepage will be required before importing. Failure to do so will result in the display of incorrect characters in OS/2.

NOTE: This step needs to be completed before importing the PPDs into the driver (before you copy the downloaded PPD files into your PPD\ directory).

PPDENC
can convert single file:
>PPDENC.EXE <input_ppd_file> <output_ppd_file>
The input file will be read and the output file will be created. The output file name must be different than the input file name.
PPDENC
can convert multiple files in one directory, writing the converted files to the destination directory (directory must exist):
>PPDENC.EXE -d <source_directory> <dest_directory>
Files (*.PPD) in the source directory will be processed file by file and the output files will be created in destination directory.

Currently supported PPD encoding standards are "IsoLatin1" and "WindowsANSI". PPDENC will automatically detect encoding in PPD from which to convert.

When the PPD is converted, the output file will have its *LanguageEncoding set to "OS2-850" to indicate that it's been processed. If the PPDENC utility later sees this, it will not attempt to change the encoding and will copy the file intact. Similar, if the PPD encoding is not recognized, the PPD file will just be copied over without modification.

PPDENC does not modify it's input files in any way.

Sample scenario

You have a Spanish PPD that has been downloaded from the WWW and want to include it in your driver distribution. First, you need to convert it to an OS/2 codepage.

>PPDENC IsoLatin1 spanish.ppd spanish2.ppd

This will create spanish2.ppd that will be encoded in an OS/2 codepage.

Now spanish2.ppd can be copied into your PPD directory (as d:\PSDRIVER\PPD) and then you can import the PPD files into the PSCRIPT driver (see steps 3-6 below).

Importing a New PPD (Using PIN.EXE)

PIN.EXE is a utility to add new or upgrade device support in the Postscript driver by importing PPD files. The PPD file is usually created and provided by your PostScript printer manufacturer.

Syntax:

PIN.EXE

Currently, the only supported command is "PPD".

Syntax of command 'PPD' arguments:

PIN.EXE PPD

The first argument is the directory path where PPD files to be imported are stored. The second argument is the path to the driver (including the driver file name) where the PPD files will be imported.

One or multiple PPDs can be imported at once.

Suggested usage scenario

  1. Create directory where you will store all of the PSCRIPT files.
    >mkdir d:\PSDRIVER
  2. Put PIN.EXE in this directory.
    >copy PIN.EXE d:\PSDRIVER
  3. Create 3 subdirectories in d:\PSDRIVER directory.
    >cd d:\PSDRIVER
    >mkdir BAK
    >mkdir PPD
    >mkdir OUT
    The BAK directory will be the backup driver files - the original, unmodified driver. Copy the unmodified driver files here.
    The PPD directory will contain the PPD files for your new printer devices that you want imported into the driver.
    The OUT directory will be where you build your driver which contains the new devices to be imported for immediate use or distribution.
    To import new devices into the driver, perform the following steps:
  4. Clean the output directory.
    >del OUT\*
  5. Copy the unmodified driver files from the backup (BAK) to the OUT directory.
    >copy BAK\* OUT\
  6. Run the PIN utility to import the PPDs.
    >PIN.EXE PPD PPD\ OUT\pscript.drv
    "PPD" is command that tells PIN.EXE what to do.
    "PPD\" is path to directory with the source PPD files.
    "OUT\pscript.drv" is the driver file name where the PPDs are going to be imported into.
  7. The driver in the OUT\ directory now will have the imported PPDs!

You can install it or distribute it to users.

IMPORTANT
After the resources are imported to the printer driver, you can't just 'add' on top of that. If you add a new PPD to the directory and want to make use of it, you have to start with a "fresh" driver and import all of the devices at once, as previously done. It is required that you delete all of the files in the output directory (step 3) and copy the driver from the backup directory (step 4) to perform device importing - every time.

Using the Driver with Imported Devices in a Network Environment

There is a known problem with updating drivers in a network environment. If you put the driver with imported PPDs on a print server, and distribute it to requesters, then upgrade the server with the same driver with some new PPDs imported, the new devices will not be automatically distributed to requesters.

This is an issue with the code that implements automatic network update. We are currently working on a solution.

For now, if you update the driver (import new PPDs) you will have to distribute the updated driver to clients by some other means.