Home > AS/400 Tips > iSeries programmer tips > Convert spooled files to PDF using Java
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

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


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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 ...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Application Development
iSeries calling an .exe
Top 10 programmer tips
Formatted work job scheduler
Convert system date and time
Mixing free format code with embedded SQL
SQL update a field in one file from a field in another file
Webcasts for iSeries programmers
Programming advice from the pros
Easy code copying via the drag and drop method
Setting FTP time-outs

iSeries programmer tips
Enhancing RPG with external SQL stored procedures
Tracking data changes on IBM i with triggers
Introduction to SQLRPGLE on IBM i: Making a report
Implementing a browser interface in COBOL: Displaying database fields
Taking advantage of CL advancements, starting with V5R3
TAATOOL: Useful tools for programmers on IBM i
Implementing a browser interface in COBOL: Creating your graphic Web page
Implementing a browser interface in COBOL: Getting started
Making the most of RPG data handling on IBM i
Groovy programming on IBM i

iSeries CL programming
Taking advantage of CL advancements, starting with V5R3
Checking in on your IBM i authorization lists
Running PHP open source applications: NOBODY needs authority
Simplify the process of converting a spool file from iSeries into an Excel spreadsheet
CL program for daily backups
An automated CL method of moving a query from AS/400 to Excel
Changing user password expiration
Eight steps for creating program documentation using AS/400 utilities
DAYSPAST CLLE program for AS/400: Compares object creation date with today's date
Advanced Job Scheduler help

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


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


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
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 technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts