Saving to file

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
alexmak
Posts: 12
Joined: Mon Jan 23 2006

Saving to file

Post by alexmak »

Hello, I am using PDF Creator Developer version to append x amount of pdf files together to send to printer that needs to be in a certain order. I am developing in powerbuilder 9. I have created my ole object and am opening the first file in the array of file paths and then appending the rest of the files in the arrary. I then save to a file to be printed. This works fine until I are loading in more than a few pdfs. I am testing loading in only 9 pdf files and the appending process is working fine, but the save seems to hang powerbuilder. Any thoughts on why? The pdf files being appended are not huge, < 300kb.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

There is no specific limit on the number of PDFs you can append. But I suggest that you save the resulting file during the process (when appending 5 documents lets say) and then you append the rest to the saved file and there it goes.

Hope this helps.
alexmak
Posts: 12
Joined: Mon Jan 23 2006

Post by alexmak »

I have tried saving after every append as well as every 4th append and the save still seems to freeze the app. Any other suggestions?
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

As I understand from your first post, the save is not freezing the application each time you call Save() function, this is freezing when appending more than 9 documents, am I right?

Did you try to replace the document at which the application is freezing by antother one? Maybe there is a problem with a specific pdf file.

I am assuming that you are using the latest version 2.0f of the PDF Creator.
alexmak
Posts: 12
Joined: Mon Jan 23 2006

Post by alexmak »

My code as follows:

Code: Select all

//open first pdf, must have at least 1 pdf for printing
if upperbound(ls_print_order) > 0 then
	ole_pdf.object.zoomfactor = 100
	ole_pdf.object.open(ls_print_order[1], "")
	
	j = 0
	//append files for printing
	for i = 1 to (upperbound(ls_print_order) - 1)
		ole_pdf.object.append(ls_print_order[i + 1], "")
		j++
		if j = 5 then
			ole_pdf.object.save(ls_temp, 0)
			for l = 1 to i
				ole_pdf.object.clearpage(l)
			next
			j = 0
		end if
	next
	
	ole_pdf.object.save(ls_temp, 0)
In the for loop save, it saves the first time fine, but freezes the second time in. Also have tried to replace the rest of the pdf files in the array with ones in the first 6 pages, and still get freezing.

My pdf files are a combination of powerbuilder datawindow pdf saves and client given pdf scans.

I have tried to save with all datawindow pdfs and can save fine, I believe this is b/c these pdfs have little to no formatting whereas the client pdfs have lots of formatting. Is this a limitation of appending and saving pdf files with lots of formatting in them?

I am using 2.0f of the dll.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

If the save() is hanging on a specific file or kind of files than it could be that there is a feature in this file that is not supported by the PDF Creator.
I can't confirm this issue unless i check he file and try to append it.

If you can please send us a sample pdf file that is freezing the save method to support@amyuni.com so we can check it.
Post Reply