Printing PDF document and make use of a template

If you are a Power Builder developer and have any questions about using our products from Power Builder here is the place to post them.
Post Reply
vshiv
Posts: 2
Joined: Thu Jun 23 2005
Location: Lansing, MI

Printing PDF document and make use of a template

Post by vshiv » Mon Jun 27 2005

Hi all,

I maintain a web application that uses EAServer 4.2.3, PB 8.0.4, PowerDynamo, JavaScript. We have a word-processing interface to allow users to generate letters, format them (such as bolding, italicizing, etc.), display them in PDF format and print them.

The formatting is done within a TextArea inside a form on a browser. This form does not use HTML DataWindow. When the user clicks the PDF icon, the formatted text is enclosed in a <HTML>...</HTML> tags and saved as a HTML file. Then, using the 'Html2Pdf' utility provided freely by Amyuni, the HTML file is converted to PDF and is displayed to the user.

This works fine, except that these letters mostly get printed on letterheads, which have a header image and a footer image. I prefix the text with an IMG tag (for header) and append an IMG tag (for the footer) and finally enclose these in <HTML>...</HTML> tags. On the PDF output, depending on the letter content, the footer image keeps floating up or down. Also, if the letter content exceeds one page, the remaining part must be printed on a blank sheet of paper. Is there a way to accomplish this? Can I make use of an existing PDF template, which contains header and footer images and merge the letter content onto the template? Will Amyuni PDF Creator solve this problem?

Shiv.

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Wed Jun 29 2005

Hello,

I didn't get which letters do get printed on the header and footer of the PDF file.

Using the PDF Creator, you can create a PDF template and then either merge this template with another PDF file or fill some fields in this template with text and print it.

The way of using the PDF Creator depends on how you are deploying your application, is it on an internet, intranet?

vshiv
Posts: 2
Joined: Thu Jun 23 2005
Location: Lansing, MI

Post by vshiv » Fri Jul 01 2005

The letters get printed on a letterhead which has a State of Michigan seal, name of the State Department, city, the Governor and Director's names at the top (these will constitute the header) and the address, URL and phone number at the bottom (these will constitute the footer). The actual letter content goes in the space in-between.

I first build the HTML with the image element (header), followed by the letter content, followed by another image element (footer), enclose them in <HTML>...</HTML> tags, save as HTML file and use the 'Html2Pdf' utility to convert this HTML file to PDF file and display the PDF file to the user. Since HTML does not have header/footer, unlike MS-Word, I have no way of fixing the position of the footer. Depending on the letter content, the footer moves up or down. I need to fix its position.

Supposing that I already have a PDF file that contains an empty letterhead, can I use PDF Creator to "merge" letter contents onto the letterhead? What happens if the letter content exceeds one page?

This is an internet application used by state employees as well as contractors and others (Local Agencies such as cities, townships, etc).
Joan wrote:Hello,

I didn't get which letters do get printed on the header and footer of the PDF file.

Using the PDF Creator, you can create a PDF template and then either merge this template with another PDF file or fill some fields in this template with text and print it.

The way of using the PDF Creator depends on how you are deploying your application, is it on an internet, intranet?

Post Reply