Print Page | Close Window

Recommendation needed?

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=850
Printed Date: 15 May 24 at 3:40AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Recommendation needed?
Posted By: mapperkids
Subject: Recommendation needed?
Date Posted: 30 Dec 07 at 4:37PM
Hi,
 
Since the QuickPDF is no support offically and could someone suggest any other product that can do do what quickpdf did, my project is in VB6 and VB.NET
 
Just want to create pdf file in the application by populate the values from db.
 
Thanks!
 



Replies:
Posted By: Ingo
Date Posted: 30 Dec 07 at 5:45PM
Sorry... you won't find any product with the same enfolding sum of functions.
...And "just want to create pdf-files" is one of the most difficult things in ;-)
But there are a lot of products on the market ... for a very different price.
Have a look at:
http://www.planetpdf.com/
http://www.publishing-worker.com/

Best regards,
Ingo



Posted By: mapperkids
Date Posted: 30 Dec 07 at 8:05PM
Thanks Ingo,

But I need some product that can let me generate the PDF file FAST, right now I'm using the Quickpdf and it tooks 3 hours to generated a 100 pages pdf in my VB6 application. it is too long, since I have 1000 of those pdf to generate.

May be the new Quad Core CPU can speed it up. I don't know, what I'm using is Pentium4 - 2.4 Mhz

Any one have any idea how to improve the speeds for generate the pdf ?

Thanks!





Posted By: Ingo
Date Posted: 31 Dec 07 at 6:59AM
Hi!
A faster machine can't be the solution - you don't know what your customers are using. Don't beat me: Perhaps it's not necessary that your app needs three hours? Perhaps you can post essential code-parts here ... so somebody can have a look over it?
Best regards,
Ingo



Posted By: mapperkids
Date Posted: 31 Dec 07 at 10:30AM
Hi,
 
Here is example of my code and just repeat the same thing again and again to populate all the data into the page,
 
I tested it out by rem out all statements that write the text to pdf, then the same process only takes 1 mintue, so I can be sure is not the process of the application needed that much time. 
 
 
B2form = QP.NewFormField("PAGE#", 1)
B2form = QP.SetFormFieldStandardFont(1, 1)
B2form = QP.SetFormFieldBounds(1, 525, 673, 30, 40)
B2form = QP.SetFormFieldValueByTitle("PAGE#", pageno)
B2form = QP.FlattenFormField(1)
B2form = QP.NewFormField("TOTPAGE#", 1)
B2form = QP.SetFormFieldStandardFont(1, 1)
B2form = QP.SetFormFieldBounds(1, 565, 673, 30, 40)
B2form = QP.SetFormFieldValueByTitle("TOTPAGE#", totpageno)
B2form = QP.FlattenFormField(1)
 
'Section 5 - Office NO
B2form = QP.NewFormField("OFFICE_NO", 1)
B2form = QP.SetFormFieldStandardFont(1, 1)
B2form = QP.SetFormFieldBounds(1, 270, 648, 40, 40)
B2form = QP.SetFormFieldValueByTitle("OFFICE_NO", iportcode)
B2form = QP.FlattenFormField(1)
 
'Section 6 - Transaction No
B2form = QP.NewFormField("TRAN_NO", 1)
B2form = QP.SetFormFieldStandardFont(1, 1)
B2form = QP.SetFormFieldBounds(1, 320, 648, 250, 40)
B2form = QP.SetFormFieldValueByTitle("TRAN_NO", itransno)
B2form = QP.FlattenFormField(1)
 
Thanks!!
 
 


Posted By: chicks
Date Posted: 31 Dec 07 at 11:59AM
OK, this code makes no sense. Why would you create a form field, fill it with text, then immediately flatten it? No wonder this is slow. Whey not just draw text directly on the page, and skip all the form field stuff? I think you'll find it to be much faster.

Faster yet (probably) would be to create a template (once) with all the required form fields. Each time you need to produce a PDF, simply load the template, fill and flatten the fields with your data, and save it with a new name.


Posted By: mapperkids
Date Posted: 01 Jan 08 at 12:20PM
Originally posted by chicks chicks wrote:

OK, this code makes no sense. Why would you create a form field, fill it with text, then immediately flatten it? No wonder this is slow. Whey not just draw text directly on the page, and skip all the form field stuff? I think you'll find it to be much faster.

Faster yet (probably) would be to create a template (once) with all the required form fields. Each time you need to produce a PDF, simply load the template, fill and flatten the fields with your data, and save it with a new name.


Chicks,

Wow, that is good news to me, the code is create  from prior prgrammer and I have no idea why he do that, so could you show me some sample code how to do it, like draw text directly to the form?

All I need is load a template that is a pre-print form in pdf format and it need to appear on each page.

then just put the fill data on top of that form.

Thanks!



Posted By: mapperkids
Date Posted: 01 Jan 08 at 12:22PM
Originally posted by chicks chicks wrote:

OK, this code makes no sense. Why would you create a form field, fill it with text, then immediately flatten it? No wonder this is slow. Whey not just draw text directly on the page, and skip all the form field stuff? I think you'll find it to be much faster.

Faster yet (probably) would be to create a template (once) with all the required form fields. Each time you need to produce a PDF, simply load the template, fill and flatten the fields with your data, and save it with a new name.



If the fastest way is to create the template, so could you tell me know to create a template with form field and load up everytime when needed?

Thanks!



Posted By: chicks
Date Posted: 01 Jan 08 at 1:17PM
You should only need to set the font once, then use DrawTextBox function instead of all those form field functions to accomplish the same thing.

If you have a fixed number of pages to create, with static content, you generally use something like Word to create that, then distill to PDF with Adobe Acrobat, or one of the dozens of PDF "printers" available for free. Then load up this template in QuickPDF, loop through the pages and add your dynamic content with DrawTextBox. Should take a few seconds.




Posted By: mapperkids
Date Posted: 01 Jan 08 at 8:07PM
Originally posted by chicks chicks wrote:

You should only need to set the font once, then use DrawTextBox function instead of all those form field functions to accomplish the same thing.

If you have a fixed number of pages to create, with static content, you generally use something like Word to create that, then distill to PDF with Adobe Acrobat, or one of the dozens of PDF "printers" available for free. Then load up this template in QuickPDF, loop through the pages and add your dynamic content with DrawTextBox. Should take a few seconds.


Thank again, the content is dynamic getting from the database

What I'm using is

Call QP.LoadFromFile("C:\template.pdf")

then using Call QP.ClonePages(1, 1, 1) to make the page appear on each page.

Does it correct?

I tried to replace my code with this

Old code
=======

B2form = QP.NewFormField("BUSINESS#", 1)
B2form = QP.SetFormFieldStandardFont(1, 1)
B2form = QP.SetFormFieldBounds(1, 130, 743, 250, 40)
B2form = QP.SetFormFieldValueByTitle("BUSINESS#", tImporterBusiness)
B2form = QP.FlattenFormField(1)

New Code
========

B2form = QP.AddStandardFont(1)
B2form = QP.SetTextSize(10)

B2form = QP.DrawText(130, 743, tImporterBusiness)


But the problem is the even I declared both hortizontal position as 743, but it show in different position output pdf file, any reason why?

Also, the drawtext function, don't have the width. height parameters, so how can restricted the length of my text field?

Thanks!



Posted By: chicks
Date Posted: 01 Jan 08 at 10:44PM
Use DrawTextBox, not DrawText


Posted By: mapperkids
Date Posted: 01 Jan 08 at 11:58PM
Originally posted by chicks chicks wrote:

Use DrawTextBox, not DrawText


Thank a lot,  I have one more problem and don't know how to solve it,

As i said, I use loadformfile to load up the template then use qp.clone instead of qp.newpage for all the rest of the page, everything ok except on the first page of each pdf file that I produced, always contain my template form.

Try to delete the first page before save the document, but once i did that  it delete all the template on each page as well, I guess because I use the clone command to clone the first page.

Any idea how to solve this, so I can save some paper instead of waste the paper on the firstpage.

Thanks!



Posted By: marian_pascalau
Date Posted: 03 Jan 08 at 8:33AM
Maybe you should try to Draw Capture/Clone page into a new document. (This was just an idea).



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk