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
2.0g: Deleting page breaks Save function
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?
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?
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
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