Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > General Discussion
  New Posts New Posts RSS Feed - Template PDFs with paragraphs that
  FAQ FAQ  Forum Search   Register Register  Login Login

Template PDFs with paragraphs that "wrap"

 Post Reply Post Reply
Author
Message
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Topic: Template PDFs with paragraphs that "wrap"
    Posted: 31 Aug 06 at 9:16AM
I have a .DOC that I want to transform into a PDF template, that is, I have a PDF with empty form fields that I replace on-the-fly.

However, while drawing this template, there are some issues that I can't cope with.

The .DOCument can be get from here :

http://www.DES.online.unimep.br/au/debts.doc

The problems are :

1) How can I have a paragraph that "wraps" on the fields in RED. That is, how can I add the fields STUDENTS NAME, MARITAL STATUS , etc AND have those fields wrapping the paragraph ? This is pretty easy when using Word. Can I do the same using PDF templates ?

2) The "Payment Date" line is a replicant one. It can vary from 1 to 12 lines. Which is the best approach, design 12 different fields or is there some sort of table concept (an array of fields) ?

Thanks in advance for your support !

By the Way, I'm not using Word. I'm using Open Office to draw my templates. Cause Open Office has a button called "PDF" that allows one to directly EXPORT it's documents to PDF, preserving , that is, keeping form fields intact.

Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 31 Aug 06 at 12:47PM
You can't reflow the fields, they're fixed. Better way would be to use the automation interfaces of Open Office to fill the fields and save to PDF.

A VB example of saving to PDF via automation with OO is here:

http://www.kalitech.fr/clients/doc/VB_APIOOo_en.html

I'm sure filling the fields is as easy...
Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 31 Aug 06 at 4:03PM
Hello Chicks

Thanks 4 your help !

Can you tell me if this is a "massive" approach ?

That is, if I have 20 K documents to be merged and printed, this is a PROfessional approach ? Or is it just something that would be done for one contract, on one desktop ?
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 31 Aug 06 at 4:23PM
It's clearly more desktop oriented.

If you need to merge, reflow and print 20K documents all at once, you need to look at commercial variable-data publishing, like Scriptura-XSL or XSLfast http://www.xslfast.com/ among others.

An open-source solution at this level would most likely involve xml data, xsl-fo formatting, and the fop rendering engine (Java commandline).

Not sure, but I think OpenOffice might export xsl-fo. Altova used to have a free "personal" version of StyleVision, which is a premier stylesheet designer for xsl-fo, among other formats.
Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 01 Sep 06 at 7:20AM
Hi Chicks

Thanks again 4 your support !

I think the KEYWORD is REFLOW, isnt it ?

Is REFLOW some sort of text realignment ?

If so, that's what I need....
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 01 Sep 06 at 1:46PM
When you populate your form in Word, the entire paragraph will REFLOW to fill in the gaps when the field data is shorter than the fields. Paragraphs below will also reflow by shifting up or down as necessary.

You can't do that with PDF form fields, which have fixed locations and sizes, and whose surrounding text knows nothing about the fields, unlike Word.

Another workflow you may want to consider:

1. Export your Word document, with merge fields, to Word's WordML XML format. This becomes your template.

2. Use whatever language you normally use to populate the template's merge fields with your data.

3. Send the populated WordML file(s) to a hotfolder of AltSoft's Xml2PDF service, which is the lowest-cost commercial engine of its kind I've come across:

http://www.alt-soft.com/products_xml2pdf_hotfolder.jsp

The merged WordML file will be transformed to PDF and spit out the other side of the engine. Simple workflow, looks to be a pretty nice product (can't vouch for it, since I haven't tried it - don't have .NET installed).

If OpenOffice does produce XSL-FO (not sure), you could do the same thing with it, as Xml2PDF also accepts XSL-FO as input.

Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 01 Sep 06 at 1:56PM
Chicks :

Thanks again. Your answers are really, really very helpful. I dont know how to thank you :-)

Well, for me XML is a piece of cake. I love it. No problem with it at all.

As for transforming XML to PDF , I really would like some product similar to QuickPDF.

That is, some library that I could embed on my applications.

Why ?

Because I need to pouplate those templates randomly on a wide range of desktops out there. And print them right away. Wonder that a student talks to the clerk and he/she will print his/her contract right away. A single one.

However, on server side, I do the same thing, generating PDFs and stuffing them into student's folders. And I do it massively, that is, for 20K students at once.

That product seems more suited for server side.

As for desktop random printing....

But, let us see. Now things are becoming clearer.

Thanks again !
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 01 Sep 06 at 2:12PM
About the only way to accomplish this with QuickPDF is to use the DrawHTMLTextBox() function on the entire paragraph, including the filled form fields.

You would need to leave blank space for the paragraph on your PDF template, and would need to know the exact coordinates for the paragraph before calling DrawHTMLTextBox() with your filled paragraph text.

The paragraphs below wouldn't adjust up or down either, unless you do the entire page as HTML, and leave the page blank in your template (except for the header, footers, etc.).

I'm guessing that you will have some sizing issues if you go this way, however, if you have some very long or very short names, for example.
Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 01 Sep 06 at 2:21PM
Looks like using QuickPDF will be cumbersome.

I meant I wanna have something similar to QuickPDF, that is, a library to be embeded on my applications where I could do this :

xml:=LoadXmlStringFromFile(afilepath)
pdf:=Get_This_XML_and_transform_it_to_a_PDF(xml)

and then

PrintThisPDFRightNow(pdf)

or

SaveThisPDFRightNow(pdf,onthisfolder)

Got it ?
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 01 Sep 06 at 2:40PM
All of the commercial Xml2PDF libraries I'm aware of are server-side only. The desktop versions are end-user applications, not libraries.

The above-mentioned fop could be run client-side, if you're willing to install the java runtime on all client machines, which I doubt.

What you're looking for doesn't exist, I'm afraid.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store