Alternative Outputs (long)

Darren Reely darren.reely at latticesemi.com
Tue Apr 11 14:02:50 CDT 2006


With the PDF thread going I thought I'd mention my experience.

Three years ago I was asked to insert graphics into a text output file. 
While since ascii text files don't support decent graphics, I choose PDF 
as my final product, but took an indirect path to delivery. I found the 
work that I'd have to do to insert EPS files a heavy burden that as 
usual, I didn't have the time to commit too.

Enter Postscript and Ghostscript. I used a tool on our Sun box to 
convert a text sample file to PS. I then stripped out the header that 
would be repeated and saved it as an input source for a final PS file. I 
also created a custom PS source file for a couple of shapes we use. I 
get my graphic right from the marketing people but that needs some basic 
parsing (via a custom parser) to be compatible with my Postscript. It 
then gets entered into the Oracle database as a LONG type ready for use. 
Because placement and need are dynamic, I altered the report to contain 
some hints for my Perl parser code I had to write.

So now I only have a few easy steps that I wrote into my reporting code; 
1. print the ascii report with the hints to a file, 2. read the EPS 
graphics into a text file, 3. parse that via a Perl script into 
Postscript code converting hints into placements and references to the 
graphic routines, 4. via the same Perl script, combine all into an 
appropriate order and finish off the Postscript code, 5. send the 
Postscript to a printer if requested, else convert to PDF using 
Ghostscript. The user only has to request the report and output destination.

We now have a relatively portable file capable of communicating our 
varying logo layout requirements to the vendors who do the actual work. 
The purpose was to reduce errors that were occurring. It is very time 
consuming and costly to fix top marking of silicon packages.

The best part for me was I got to go off of the regular path to learn 
something new and different. In the end I even received acknowledgment 
for a job well done from both the user base, and management. :)

Darren



More information about the powerh-l mailing list