2.0g: Deleting page breaks Save function

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
beandog
Posts: 33
Joined: Wed Dec 14 2005

2.0g: Deleting page breaks Save function

Post by beandog »

Well, to go along with my earlier post about renaming bookmarks breaking the Save functionality of the PDF Creator, deleting a page from a document does the same thing. The following code causes the PDF Viewer ActiveX control to hang:

PDF.Open("D:\\My Documents\\Visual Studio Projects\\PDF\\PDF Creator Developer Manual.pdf", "");
PDF.DeletePage(2, TRUE);
PDF.Save("temp.pdf", CPdfcreactivex1::acFileSaveDefault);

This happens regardless of whether I delete the page with or without the Undo parameter set. I absolutely need this functionality.



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

Post by Joan »

Hello,

This function is working properly.

The error happens maybe because you are using the manual file as an example. I will investigate this issue further.

I am sure however that if you create a multiple pages pdf file using the PDF Creator and then you open it and delete a page from it you will not get an error on the save command.

What is the application you are developing using the PDF Creator?
beandog
Posts: 33
Joined: Wed Dec 14 2005

Post by beandog »

We are developing a PDF viewer/editor for paperless office use. Typical usage scenarios for our application include:

Viewing/printing/faxing/emailing PDF's.
Rearranging/deleting pages in PDF's before sending them out.
Assembling new PDF's with pages taken arbitrarily from other PDF's.
Adding light markup to documents (highlight, "sign here" images, etc.)

Typically, our users will never create a PDF from scratch except from a scanner. They will be operating exclusively on existing PDF's. However, they will often produce new documents by "assembling" them from the pages of other documents, so full bookmark creation/editing capabilities are very important.

Hence all the questions about saving individual pages to temp files repeatedly (to assemble using Append), adding images on mouse clicks, programmatically creating highlights, rearranging and renaming bookmarks, etc. etc. I do appreciate your patience with my many questions.

I use the developer and user manuals for the PDF creator as test documents frequently because:
* They are fairly large
* They load and display quickly in the PDF control
* I know that you'll have the same document if something goes wrong

In any case, the code given hangs on the user manual as well as the developer manual, but not on the license agreement. When you say, "This function is working properly", do you mean in general, or do you mean on the developer manual as I gave it? If it works on the developer manual on your machine, perhaps I'm using the wrong C runtime libraries or something. When it hangs, it looks like one thread is inside _unlock, in a LeaveCriticalSection() call, in mlock.c.



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

Post by Joan »

Hello Ben,

I mean this function is working properly using other files or files that you create using the Creator.

I am not sure why this is not working when using the manuals files. Our developers are currently checking this.

Hope this helps.
Post Reply