 |
 |
| iSeries 400 Tips: |
|
 |
 |

ISERIES PROGRAMMER TIPS
Convert spooled files to PDF using Java
Manolis Mariakakis 09.03.2002
Rating: -4.33- (out of 5) Hall of fame tip of the month winner




|
The iSeries command SPLTOPDF is presented which converts spooled files to PDF files.
The command has the following features:
1. Embedding of true type font of any language. To embed a font, you just have to copy a ttf font file, which is existed in windows font folder environment, to an iSeries folder.
2. Measuring of true type text in order to create the correct width and height of the PDF page, according to the number of rows and columns of the spooled file. Prerequisite is the usage of a fixed characters width font, like Courier.
3. Usage of PDF footer with notes given from the command prompt.
4. Usage of watermark on every PDF page. To embed a watermark, you just have to copy a jpg figure to an iSeries folder.
5. The PDF internal stream objects are compressed and the PDF format is just a canvas where text and graphics are placed without any structure information. This means that text and graphics are read only.
The following two Java libraries are used:
1. The IBM Toolbox for Java access classes.
2. The iText free Java-PDF library that allows generating PDF ...
To continue reading for free, register below or login
To read more you must become a member of Search400.com
');
// -->

files on the fly. You can upload the library to iSeries from here. The feature list of the library is plenty, you can add to the PDF Documents Chunks, phrases, paragraphs, anchors, lists, annotations, hypertext links, header footers, chapters, sections, graphics, tables, images, fonts, barcodes and events. There are many advanced features to layout the referenced objects and also you can concat, split, handout and encrypt the PDF files.
Preparation steps:
1. On iSeries create the folder /spltopdf
2. Upload the spltopdf.java into the /spltopdf
3. Upload a courier ttf windows font file into the /spltopdf and name it courier.ttf
4. Upload a small jpg logo-file into the /spltopdf and name it watermark.jpg
5. Upload the iText library com.lowagie... into the /spltopdf
6. Upload the iText.jar, iTextHYPH.jar and iTextXML.jar files into the /spltopdf
7. Be sure that jt400Native.jar exists into the folder /QIBM/ProdData/OS400/jt400/lib
8. Create the spltopdf.class using the crtclasscl CLP
9. Create the command spltopdf using the spltopdfcl CLP and spltopdf CMD
 |

|
|
 |
|
 |
 |
 |
 |
| TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of . |
|
| |
All Rights Reserved, , TechTarget |
|
|
|
|
|