User Tools

Site Tools


pub:ipdf

[ Up To Main Index]

iPDF for System i

The current version is 5.2 released 06.09.2014.

Installation or Upgrade Instructions

Requirements: iSeries operating system version V5R4M0 or later. PASE is not required. QShell is required to run the installation routine.

Download the compressed file to the root directory of your PC.

Use Winzip or other tool to extract the files. Winzip is available from http://www.winzip.com/. A shareware archive utility that will process zip archives can be downloaded for free from http://www.7-zip.org/. Extract the files to the root directory of your pc.

The unpacked archive will contain the following files: 1. A savefile, the name of which will vary. 2. A readme.txt file that refers the user to this site.

Use binary FTP to upload the ipdf.savf to your iSeries:

  • Open a DOS command shell.
  • C: <enter> to make certain that you are using the C drive.
  • Cd \ <enter> to change to the root directory.
  • ftp <your iSeries IP address> <enter>
  • log in as any user profile with adequate authority to library QGPL to upload a file.
  • Quote site namefmt 1 <enter> to use the integrated file system.
  • Cd /qsys.lib/qgpl.lib <enter> to change to the qgpl library.
  • Binary <enter> to change to binary mode.
  • Put IPDF4.savf IPDF4.savf <enter> to put the file to the iSeries. (Your savefile may have a different name).
  • Quit <enter>.

LOG on as QSECOFR.

If this is an upgrade, check to see if there are any object locks on the library of the old version: WRKOBJLCK OBJ(IPDF) OBJTYPE(*LIB)

If there any locks, you must eliminate them before proceeding.

Rename any existing installation of iPDF: RNMOBJ OBJ(IPDF) OBJTYPE(*LIB) NEWOBJ(IPDF.1)

Restore the library: RSTLIB SAVLIB(IPDF4) DEV(*SAVF) SAVF(QGPL/IPDF4) RSTLIB(IPDF) (Your savefile may have a different name)

Restore the /ipdf directory:

Attention: If you have any objects in the directory /ipdf that you would like to save, copy them to another location as IPDFSETUP will delete and recreate the /ipdf directory.

ADDLIBLE IPDF

Prompt the command IPDFSETUP and enter IPDF as the library. You may also specify which font pack to use, the LaserJet 4 font pack LJ4FONTS or the DejaVu font pack DVJFONTS. Run the command. This installs the /ipdf directory. The installation is now complete.

Applying the Key

In iDocs, apply the iPDF license key through the iDocs license manager.

Standalone for releases 2.4.22 and later, execute the command REGISTER to enter the license key as shown:

                                                                           
 Module Name. . . . . . . : IPDF                                          
                                                                           
 Registration Code. . . . : 1a1c1d2009   
                                                                           
 Status . . . . . . . . . : Module expired                    

Your key might look different from the example shown.

The key store discussed above is for iDocs keys and is used as a convenience for iPDF. It does not decrypt iPDF keys, so the iPDF key will always show as expired. The validity test of an iPDF key is that it removes the text WWW.INFORMDECISIONS.COM from atop the output.

Using iPDF with iDocs

To Use with iDocs: A copy of iPDF is integrated into iDocs. If you have installed a standalone copy of iPDF add IPDF above the iDocs library in the library list. The processing options are taken from the file /ipdf/ipdf.cfg.

Note: Added Protected PDF iDocs feature with password in the iDocs merge. New reserved mapping keyword *PDFPASWRD was introduced. (6.94) 04/20/20

Using the End User Interface STRIPDF

To Use standalone:

If you have release 2.4.21 or later for the LaserJet 4 fonts, or release 3.0 or later for the DejaVu fonts, the user may invoke the command STRIPDF (Start iPDF). This display a list of spool file both by user and by outqueue. The user may then select one of the following options on spool files to convert the spool files to PDF:

C - Convert to PDF, taking the conversion type from the spool file type. I.e. convert *USERASCII spool files with the command CPYPCLPDF, and *SCS spool files with the command SCS2PDF. The prompt for those commands follows the invocation.

CA - Convert *USERASCII spool file to PDF. This forces the use of the command CPYPCLPDF.

CS - Convert *SCS spool file to PDF. This forces the use of the command SCS2PDF .

Monitoring an OutQueue with iPDFMon

For a product demonstration of how to use the iPDF Monitor to convert your spool files to PDF or TIF use the link below:
Convert spool files into PDF files

                                                                           
                             iPDF Monitor (IPDFMON)                             
                                                                                
 Type choices, press Enter.                                                     
                                                                                
 Outqueue Name  . . . . . . . . . > HANDOFF       Character value               
 Outqueue Library . . . . . . . . > OFFERRER      Character value               
 Output PDF Path  . . . . . . . . > '/iview/dantest/'                                      
                                                                                
                                                                                
 DataQueue Name . . . . . . . . .   @@IPDFMON     Character value               
 DataQueue Library  . . . . . . .   OFFERRER      Character value               
 Document Prefix  . . . . . . . .   YOURNEWPDF    Character value               
 Overwrite File . . . . . . . . .   *NO           *YES, *NO                     
 Converted Spool Types  . . . . .   *PDF          *PDF, *TIF                    
 Perform Archive/Delete? (Y/N)  .   Y             Y, N                          
 Archive Output Queue . . . . . .   ARCHIVE2      Name                          
   Library  . . . . . . . . . . .     OFFERRER    Name, *LIBL                   
                                                                                
                                                                                
                                                                                
                                                                         Bottom 
 F3=Exit   F4=Prompt   F5=Refresh   F10=Additional parameters   F12=Cancel      
 F13=How to use this display        F24=More keys                                             

  • Outqueue Name: Enter the name of the output queue to be monitored. One instance of iPDFMon per outqueue. Don't run iPDFMon on outqueues monitored by iDocs, iMail, or iView engines, or any dataqueue process.
  • Outqueue Library: Enter the library where the output queue resides.
  • Output PDF Path: Path for the IFS or Network output should be directed. Note that you can specify a remote networked directory as the output path using the QNTC file system. QNTC is a function of IBM i/OS and is documented here: IBM Knowledge Center
  • DataQueue Name: Specify a unique library/name for the dataqueue name. Use separate data queues for multiple monitors.
  • DataQueue Library: Specify the Data Queue library to be used.
  • Document Prefix: Option to select a file name prefix if desired for identification..
  • Overwrite File: Enter *YES to overwrite file or *NO to increment file name if existing.
  • Converted Spool Types: Select *PDF or *TIF supported formats for the output file. See Note below.
  • Perform Archive/Delete? (Y/N): N - leaves the processed file where the monitor found it; Y - with no Archive Output Queue specified deletes the processed input file; Y - with an Archive Output Queue specified archives the originating output file to the specified Archive Queue.
  • Archive Output Queue: Enter a Archive Output Queue if you wish the originating output queue to be archived.
  • Library: Enter the library location for the Archive Output Queue if specified above.
  • F10=Additional parameters: F10 and Page Down tor additional file naming parameters. If specified they will appear in the outputted file name.


Note… The output is based on the spool file that is fed into the out queue being monitored. If color PCL, then then output will be color when outputting to *PDF. If monochrome PCL, then the output will be black/white when outputting to *PDF or *TIF.

  • The output for *TIF is only in monochrome black/white
  • The output for *PDF can be monochrome black/white or color

iPDFMon SBMJOB

You can monitor an outqueue and convert all *SCS and *USERASCII spool files to pdf using IPDFMON. Invoke for example as follows:

SBMJOB
CMD(IPDFMON OUTQ(HANDOFF) OUTQLIB(OFERRER) OUTPATH('/iview/dantest/files') PREFIX(YOURNEWPDF) OVERWRITE(*NO) OUTTYPE(*PDF) ARCHIVE(Y) ARCHOUTQ(OFERRER/ARCHIVE2) SPFRMTYP(*NO) SPUSRPRF(*NO) SPJOBNAM(*NO) SPJOBNBR(*NO) SPFILNAM(*NO) SPFILNBR(*NO) SPUSRDTA(*NO)
JOB(IPDFMONTQ)
LOG(0 0 *NOLIST) LOGCLPGM(*NO)

This invocation monitors outqueue OFERRER/HANDOFF running in a batch job.
This invocation creates dataqueue OFERRER/@@ipdfmon to use for the outqueue monitoring. If this dataqueue is in used by another process iPDFMon will be unable to run.
All *SCS and *USERASCII spool files are converted to PDF and saved into the /iview/dantest directory in the IFS.
All file names are prefixed with YOURNEWPDF.
No logging is done.
The JOB(IPDFMONTQ) names the batch job, names it IPDFMONTQ in this example. You can use this parameter to give unique names to multiple instances of iPDFMon. For example: INVOICES, STATEMENTS, BRANCH1, etc.

Note that iPDFMON distinguishes between *SCS and *USERASCII spool files and invokes the correct conversion.

Also Note:
You may have as many jobs of iPDFMon running at once as your System i resources will permit.
You can only have 1 instance of iPDFMon attached to an outqueue, but you may have an unlimited number of instances outputting to a particular directory.
iPDFMon creates a data queue and attaches the dataqueue to the outqueue.
This may conflict with other programs that use dataqueues, so each invocation of iPDFMon should watch its own outqueue and have its own dataqueue.
Please note also that iDocs, iView, and iMail engines are dataqueue engines and therefore will not share outqueues with iPDFMon.

Important:

  • One instance of iPDFMon per outqueue.
  • Don't run iPDFMon on outqueues monitored by iDocs, iMail, or iView engines, or any dataqueue process.
  • Specify a unique library/name for the dataqueue name.

Manually Invoking Conversions

Otherwise manually invoke one of the following commands as appropiate:

CPYPCLPDF - Converting *USERASCII Spool Files to PDF

Use the command CPYPCLPDF to specify the *USERASCII PCL spool file to convert (for which you have to specify the job ID information) and the full path of the output PDF file. The output PDF file is in the IFS. IPDF must be in the library list. This command takes processing options from /ipdf/ipdf.cfg. Review the file to specify processing options.

Example use of CPYPCLPDF:

                    Copy PCL Spool File to PDF (CPYPCLPDF)                    
                                                                              
Type choices, press Enter.                                                    
                                                                              
Spooled File Name  . . . . . . .   fmglaser      Name                         
Job Name . . . . . . . . . . . .   qpadev0006    Name, *                      
  User Name  . . . . . . . . . .     dyokana     Name                         
  Job Number . . . . . . . . . .     956345      000000-999999                
Spooled File Number  . . . . . .   *last         1-999999, *ONLY, *LAST       
IFS output file name . . . . . .   /home/dyokana/mydoc.pdf                    
                                                                              
                                                                              
Command Option 1 . . . . . . . .                                              
                                                                              
                                                                              
                                                                              
Command Option 2 . . . . . . . .                                              
                                                                              
                                                                              
                                                                              

SCS2PDF - Converting *SCS Spool Files to PDF

SCS2PDF is a preprocessor to iPDF. It takes an *SCS spool file and outputs as a pdf document to the IFS. To invoke, prompt the command SCS2PDF and complete the parameters.

                     Copy SCS Spool File to PDF (SCS2PDF)                      
                                                                               
Type choices, press Enter.                                                     
                                                                               
Spooled File Name  . . . . . . .                 Name                          
Job Name . . . . . . . . . . . .                 Name, *                       
  User Name  . . . . . . . . . .                 Name                          
  Job Number . . . . . . . . . .                 000000-999999                 
Spooled File Number  . . . . . .   *LAST         1-999999, *ONLY, *LAST        
Paper Type . . . . . . . . . . .   L             L=Legal T=Letter D=Ledger     
Page Orientation . . . . . . . .   L             L=Landscape P=Portait         
Default Courier Font Pitch . . .   10            06, 08, 10, 12, 14, 16, 18... 
Default Line Spacing . . . . . .   08            06, 08, 06, 07, 08, 09, 10... 
IFS output file name . . . . . .   '/SCSPDF.PDF'                               

In particular if you are running STRIPDF and also if you are not, you must set the prompt information correctly. STRIPDF sets the spool file ID information for you but does not set any other parameters.

Note: this function was greatly changed and simplified for iPDF version 4. The prior version remains available in the package as the command SCS2PDF2.

The maximum width of a *SCS spool file convertible under SCS2PDF is 378 characters.

CPYPCLFILE - Converting Stream Files to PDF

(iPDF 4.0) You can also convert ascii pcl stream files in the IFS. You can invoke CPYPCLFILE on one file or on a directory in which case the command will process all files in the entire directory concatenating the results into one pdf file. It will not process subdirectories.

                        Copy PCL File to PDF (CPYPCLFILE)                       
                                                                                
 Type choices, press Enter.                                                     
                                                                                
 Ascii PCL Input Stream File  . .  /home/dyokana/
                                                                                
                                                                                
 Output PDF File  . . . . . . . .  /home/allMyDocs.pdf
                                                                                
                                                                                
 Configuration File . . . . . . .   '/ipdf/ipdf.cfg'                            
                                                                                
                                                                                
                                                                                

Conversion Options

Conversion options are specified in the /ipdf/ipdf.cfg configuration file.

To edit the configurations file, use EDTF '/ipdf/ipdf.cfg' or use iSeries Navigator to edit the file.

In general, to apply an option uncomment the line containing it. A comment line starts with a #. To disable an option, comment out the line specifying it.

Ipdf.cfg example lines:

#this is a comment line, but the next line is an option.
--option 
# the following line is a comment line
#--option

==> Note that iPDF options keywords start with a double hyphen.

==> Converter options are case sensitive.

Options to the converter:

–fontMapTable New in 2.4.19. Specifies the font file map table. Normally unnecessary to change. The installer will configure this parameter. If the file named can not be opened iPDF will use an internally specified default font mapping.

–condFontMapTable New in 2.4.19. Specifies the condensed font map table. Normally unnecessary to change. Is set by the installer. If the file named can not be opened iPDF will use an internally specified default condensed font mapping.

–fontdir /ipdf/fonts/ Location of the fonts directory. Not necessary to change unless you have moved the directory. You need the trailing '/' in the path name. This parameter must be specified unless you always run with –fontsub option. The installer will set this option.

–onepass or –twopass
Twopass option is discontinued as of release 5.20.
Make one or two passes through the file. You may specify –onepass or –twopass, and may use the –match qualifier to specify a pattern the input spool file must match for the configuration option to apply. Example: –onepass –twopass –match FMGLASER

Always put the general case first. In general pcl files with a lot of image data and little text data will get the greatest processing speed enhancement from running in onepass mode. Pcl files with a lot of text and little image will probably not see much difference in processing speeds. –onepass is almost always the safe choice, and the installer will set this option.

–fontsub Substitute Adobe Acrobat resident fonts for HP4 printer resident fonts. This will change and limit font selections but decrease output file size. Recommended unless you need specific fonts in the output.

–pageEjectOnPaperSrc
Discontinued as of release 5.20.
Do a page eject as a part of processing the PCL paper source opcode. FormsPrint output is known to require this parameter. Not needed for iDocs output.

–pageEjectOnPrtReset Page eject on printer reset. Eject the page while processing the PCL printer reset opcode. Not normally required.

–supEndBlkPag Suppress the last page if it contains only unprintable ascii text and blanks. Use of this option sets the –onepass option.

–supBlkPag New in 2.4.20. This option prevents the converter from closing the PDF page if the output to the page has only been blanks, carriage returns and line feeds. Thus a page containing only these characters will be overwritten by the contents of the following page. This does not work for the last page for which the –supEndBlkPag option must be set. If the input pcl file contains only blanks, carriage returns and line feeds the resulting pdf document with only this option set will be one blank page.

–compression 6 Specify compression as

  • 0 no compression
  • 1 best speed
  • 6 default value
  • 9 best compression

–softfontsub Substitute HP4 printer resident fonts for soft fonts. This only works if the soft font character codes correspond to the ascii character codes. This is usually not the case and the result is not readable. Most installations will not use this.

–topmarginlines ## Override pcl opcodes specifying the top margin in lines. A decimal value (9.99 format) is accepted.

–pagesize Override pcl specified pagesize. Possible values:

  • fromPCL
  • letter
  • legal
  • a4

–check Writes version string and license information to job log.

–offset 75 75 –macro 1 –match FMGLASER
This option is discontinued as of release 5.20.
New in 2.4.20. This option permits the specification of offset for text, (which does not include soft fonts in iPDF). The offsets are specified in pcl units at 75/inch. The origin, i.e. 0,0 , is at the top left in iPDF. So specify positive offsets to move the text down and to the right. The first number is the x offset, the second is the y offset. You may optionally specify the pcl macro number in which the offset is only to be applied. Macro 0 is interpreted as outside of all macros. You may also use the –match keyword to specify a case sensitive spool file match phrase to limit which spool files apply this configuration statement. This configuration parameter is beta functionality at this time.

Examples:

–offfset 75 75 to move non-softfont text down and to the right 1 inch throughout the document for all documents that iPDF processes.

–offset 75 75 –match LASERCHECK to move non-softfont text down and to the right 1 inch throughout the document for all spool files the name of which begins with LASERCHECK.

–offset -75 -75 –macro 1 to move non-softfont text up and to the left by 1 inch for all text in pcl macro 1 for all documents iPDF processes. Note that the negative sign is one leading dash immediately before the number; text formatting on this site does not always render that clearly.

This option requires some knowledge of pcl to use effectively.

–charMap <filename> New in 2.4.21. This option specifies the name of a text file containing the font symbol set / character code mappings. A sample file charmap.txt is included in the distribution. The basic idea is that the converter will map from

<font symbol set>:<character code> to <font symbol set>:<character code>

Specify the font symbol sets in alphanumeric, specify the character code in decimal numeric.

The purpose of this is to circumvent font realities. Various vendors have different ideas as to what glyphs are contained in the 15U font symbol set. It is sometimes necessary to map out of 15U to obtain the desired results.

–match qualifier

As of release 2.4.22, the –match qualifer may follow any configuration directive. When specified in the following format

–match <case sensitive splf name pattern>

iPDF will apply the configuration directive only if the spool file name equals the name pattern specified or is identical with the name pattern for the length of the name patter.

For example:

–onepass –match FMGLASER

will switch iPDF into onepass mode for the conversion if the original spool file name equals FMGLASER or starts with those characters, e.g. FMGLASER1.

–onepass –match FMGL

would likewise work for both spool files.

Notes On Fonts

This converter was written to work with HP PCL 5e. It supports all commonly used PCL and GL2 opcodes.

Fonts: The following fonts are supported as printer resident: Courier New, CG Times, Letter Gothic, Gill Sans, CG Omega, Garamond, Coronet, Clarendon Condensed Bold, Univers Medium, Antique Olive, Marigold, Arial, Albertus Medium, Times New Roman, Gill Sans Condensed, Univers Condensed,Clarendon Condensed, Arial Narrow. Line Printer font is supported as printer resident and is mapped to Courier New.

When using –fontsub, the converter maps the HP4 printer resident fonts to the Adobe Viewer fonts: Courier, Times-Roman, Coronet,and Helvetica. This feature can be disabled by commenting out the -fontSub option in /ipdf/ipdf.cfg. This is equivalent to omitting the –fontsub parameter from the direct call.

Soft Fonts: Fonts that are not HP4 printer resident are processed as soft fonts. This includes True Type and Open Type fonts. These fonts are processed as bitmap images. Using soft fonts greatly increases processing time and PDF document file size.

If you are using HP4 printer resident fonts and they are being processed as soft fonts, the reason is that the printer driver is choosing a True Type or Open Type font of the same name as the HP4 printer resident font.

Starting with iPDF 2.4.19, iPDF is being released with different font packs. This is being accomplished by creating font map files that map the font specified in the pcl to a different true type font file in the fonts directory. The font map files are user maintainable, but it is recommended that the supplied files be used. Note that font packs, such as the DejaVu font pack, that map the HP LJ 4 printer resident fonts to different fonts do not provide mappings for OCR A Extended, Wingdings, and Taxldraw fonts and at the current release there is no way to map these fonts to different fonts.

Release History

Known Issues

Conversion Fails with Font Error

Issue: Converter fails with error message that it can not find a font file. The name of the font file is enclosed in quotes.

Versions: 2.4.19

Cause: The font file names in the condensed font configuration file fontFileNamesCondensedLJ4.txt were enclosed in quotes.

Temporary Workaround: Edit the text file using EDTF and remove the quotes. For example, this line:

"GILC____.TTF","UNVR58W.TTF","GILCB___.TTF","UNVR68W.TTF",   // 14

Would be edited to:

GILC____.TTF,UNVR58W.TTF,GILCB___.TTF,UNVR68W.TTF,   // 14

Resolution: This issue is fixed in 2.4.20.

Large Input Files

The effective limit on the size on an input pcl file is 2GB - 1 byte in iPDF version 3.01 and earlier.

iPDF version 4 is compiled and completely compatible with 64 bit stream files and should support input and output files up to approximately 1 terabyte.


[ Up To Main Index]

pub/ipdf.txt · Last modified: 2022/06/25 17:02 by 127.0.0.1