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!
Wrapping paragraphs on template PDFs |
Post Reply |
Author | |
jabaltie
Senior Member Joined: 08 Nov 05 Location: Brazil Status: Offline Points: 138 |
Post Options
Thanks(0)
Posted: 23 Jan 06 at 6:50AM |
Say that I have a template PDF, that is, a PDF with empty form fields, which is a contract.
On this contract, there are several paragraphs with empty spaces where the form fields will be drawn. After filling the form fields, sometimes there is blank empty space left. Is there a way to wrap or squash these paragraphs ? I'm using OpenOffice to draw the template PDFs and there is a special field type there : Text with MultiLine and Text with Multiline formatted. Could it be the solution for the wrap paragraph problem ? |
|
FKirch
Team Player Joined: 29 Oct 05 Location: Germany Status: Offline Points: 23 |
Post Options
Thanks(0)
|
Hi Jabaltie,
I have no answer to your question, but you wrote, that you are using OpenOffice to draw the template PDF. Can you tell the forum users the steps in OpenOffice to create such a template pdf? In my humble opinion this would be of great interest for all of us. Maybe the forum administrators can put your small tutorial to the sample code section of this forum. Fritz |
|
jabaltie
Senior Member Joined: 08 Nov 05 Location: Brazil Status: Offline Points: 138 |
Post Options
Thanks(0)
|
Hi FKirch
As a matter of fact, using Open Office to create template PDFs is very simple. First, you need to get latest stable version of it, which I think it's version 2.0.1. Then, open and draw your document as usual. When the layout is OK and you're about to add the form fields, do the following : 1) Click on View / ToolBars / Form Controls 2) Certify that this ToolBar is ON. There's a button on it that toggles between ON and OFF. You can see when it is off because their items are grayed. 3) Click on the place where you want to add your form field. 4) Then click on the toolbar item that corresponds to a TextBox field. There's "ABC" on it. 5) Drag and drop a rectangle of the field over your document. 6) Double click on the rectangle. You'll have the field properties. The most important of all is the Name of the field. Put something there. I suggest you to adopt a standard. In my case it always begins with TCO (from Template Character Output) and it must be on uppercase. 7) This properties box is somewhat weird. There is not OK or SAVE button. You simply abandon it and properties are saved. I think it is very weird but it is how it works. 8) Then click on the PDF button or go to File / Export As PDF. 9) It's done. Other suggestions : 1) Go simple at first. Add just one or two fields and test them. Then go to more elaborated types of fields. So far I only use Text ones. 2) Here on our installation, which is a University, I have strongly recomended that the final users draw the document. I dont want that us developers have to spend time designing it. So, help desk team should offer support to the final users and I expect to receive the OO document ready to be exported to PDF, including form fields with their properties already settled down. 3) Using QuickPDF later is pretty easy. You have to study the form fields functions. There's a trick : I have done my field substitution from bottom up because once you replace a field, it's index disappear. So the remaining fiels are renumbered. Be aware of that. I have some VBSCRIPT samples, should you need it. It's simple. Dont forget to flatten form fields too. 4) Also, I have built an utility of my own that "reads" the template PDF and generates the source code to populate the fields. This makes the developer work pretty easy. He/she only needs to copy/paste to the original code. Unfortunatelly, this utility is written in XBase++, a Clipper sucessor which is the language that we use here. Ah, by the way, the Company is there from Germany (www.alaska-software.com). This program of mine generates source code in XBase++ itself (Clipper) and in Cobol too . I can share it with you if you want. 5) You may want to enhance form field properties, by adding font colors, types, size and etc. But I would expect that final users, with the help-desk team, take care of the design, as I said. I dont want to spend my day wondering "which font type suits better of my shirt today ?", which is typically a woman concern. Got it ? Ah, I have also added dynamic images, those ones that have to be deducted or "calculated" on-the-fly. Example : student's photo. This is no Open Office trick. You just reserve an area to be filled later with a FitImage function call. I'll be on vacation from January 27 th up to February 28 th (Carnival) . So, I'll be back only after Carnival, on March. Let me know if I can help any further but remember I'm here only up to tomorrow. BTW, how are the football stadiums there in Germany ? Ready ? We brazilians should give you a show this year :-) |
|
shelby
Beginner Joined: 13 Jan 06 Location: United States Status: Offline Points: 13 |
Post Options
Thanks(0)
|
I think I would be interested in ANY script code. If not for the purpose you stated, then to see some methods, etc in use in ways I had not seen.
Also, if you can give us the utility code, we (I) can convert that to a vbscript function to simulate. I also use AutoIt and have started working to do some quickpdf usage from there.
OH, and, be care of that "woman concern" stuff - it can get you hurt worse than football!
|
|
To Err is to try. To fail is to err and not try again
|
|
jabaltie
Senior Member Joined: 08 Nov 05 Location: Brazil Status: Offline Points: 138 |
Post Options
Thanks(0)
|
1) There's a simple test VBSCRIPT on the zip file that I mention below (http://www.DES.online.unimep.br/au/showkit.zip)
2) I like to test the concepts or QuickPDF features using VBScript BEFORE I do it officially using my language (XBase++). I think VBScript is very, very handy to err and try like you said. When I'm sucessfull, then I do it officially within my original project. This practice saves a lot of time. Also think that VBScript should be the official language for the purpose of this site... I'm not fluent on it but I think it is very easy. You VB masters out there could point me some good tutorials/books for a quick start... 3) I've buit a .ZIP with the source code of my utility called SHOWPDFFIELDS. It not only Shows the fields but also generates a) a TXT file with the fields list; b) a XML file with a relation of field name/field value pairs (let me know if you wanna know what a h.... XML is doing here); c) a COBol source file; d) the PRG file, which is the Clipper source code. I've put some comments within the source to help you out too. Also added to the ZIP file a sample of the generated files. Please get your kit from here : http://www.DES.online.unimep.br/au/showkit.zip 4) As for the woman concern, sorry. I'm not a design guy and I dont like to spend my time drawing forms. I'm a programming guy. Love to think about abstract data structures. 5) Just remembering that I'll be on vacation from tomorrow up to the end of February, that coincidentally is Carnival. So, I'll be back only on March. Good luck ! Ah, let me know if you found something to improve it. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store