doc.Close() time?

Hi,
I’m using the PDFNetC dll and when deleting a lot of pages from a large PDF the call to doc.close() seem to take a long time.

for example with a 500 page document and deleting half the pages saving the file with doc.Save( fileName, SDFDoc::e_remove_unused, 0) takes about 6 seconds but doc.Close() is taking 45 seconds.

any ideas?

thanks,
James

Thank you for letting us know that you’re seeing this behaviour. Slow PDFDoc.Close() calls can happen if you’re running inside a debugger (which, based on your PDFDoc.Save() time, sounds likely to be the case). Even in release builds, running PDFDoc.Close() without a debugger attached is usually much faster.

Please let me know whether that helps and if you have any further questions.

There running times seem to be extremely long, so I assume you are either dealing with extremely large & strange PDF or you are running on 286 :slight_smile: If you can send us a sample document to support at pdftron and well take a look. If you are concerned about confidentiality we will destroy all files when the case is closed.

Ah! Thank you.
I retried the scenario without the debugger running and the close time dropped to 51 milliseconds!
That’s a bit faster :slight_smile:

many thanks,
James