Article View: borland.public.jbuilder.java.language
Article #15546Re: java and pdf
From: Tad Frysinger
Date: Mon, 07 Jun 1999 00:00
Date: Mon, 07 Jun 1999 00:00
52 lines
3108 bytes
3108 bytes
In article <7jg696$vt2@forums.borland.com>, krobins@anat.uct.ac.za says... > I am currently involved with the development a Windows95/98 application > using Borland's JBuilder. However, I am relatively inexperienced with the > java language and also using pdf files so any help would be greatly > appreciated. Here is a brief explanation of what we are trying to > accomplish with the application: First, it should open an existing pdf file > created using Adobe Acrobat and print the file on a 4 by 6 in. card (Adobe > Acrobat does not appear to support these print specifications). Secondly, > it should create new pdf files from a user's input and then also be able to > print these files. I have found several java class libraries on the > internet that seem as they could be useful in enabling an application to do > both of these functions. Am I right in this assumption? The other approach > that I could take is to have the application write the textfile as if it > were going to the printer and then open that file as a pdf file? Has anyone > written a similar application using JBuilder? If so, what approach did you > use and do you have any suggestions/advice you would be willing to share > with me? > > > Having just completed this kind of exercise (we went down the path a while with one that is collaborative (and free) effort called 'pj', find it at http://www.etymon.com/pj/), perhaps I can offer a few pointers. The number one thing to determine is how complicated your documents will be. Producing PDF files from scratch is not for the faint of heart. How many different files will you be creating? How much volume of output? Does it have to be 100% Java? One solution is to render the output into a format that Acrobat Distiller can convert into a .pdf file. This is the route we went. If your rendering must be in Java, the documents are simple, and their aren't many different types, I'd look at creating .rtf templates using some external tool like Word. Then use the Java TextPane to manipulate those templates at runtime, doing text merge, etc. Then output to a printer you have set up to print to a postscript file, then move this output to the distiller in box, which it will convert to the .pdf. This works well with the following limitations: only one copy of Distiller can be used on a box at one time. So if your volume of dynamic production is high (100's or 1000's of on-demand creation), this may not scale. Or you can bite the bullet and create the templates in your own form, and output in .pdf directly using something like pj. Tad Frysinger(TeamB)
Technical Details
Message-ID:
<MPG.11c60e7cc48bd5b0989a15@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7jg696$vt2@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,914c00add57d6229 X-Google-Attributes: gidf74b3,public From: tfrysinger@earthlink.net (Tad Frysinger) Subject: Re: java and pdf Date: 1999/06/07 Message-ID: <MPG.11c60e7cc48bd5b0989a15@forums.borland.com> X-Deja-AN: 486866124 References: <7jg696$vt2@forums.borland.com> Organization: Freezone Enterprises Newsgroups: borland.public.jbuilder.java.language