Cant add PDF objects. Another processing strategy may be needed

Hello,

I’m using Aspose.Pdf.Kit.dll version 5.5. I downloaded the DLLs today.

The problem I am having is when I try to open a PDF file and attach bookmarks to it using the XML file created by the ExportBookmarksToXML function. The exception is thrown when I call PdfBookmarkEditor.Save method. The exception says, “Can’t add pdf objects, probably another processing stategy must be used.

The PDF that I am trying to attach bookmarks to is a different version of the same file used to extract the bookmarks. Both have the same number of pages. The PDF that I am trying to attach bookmarks to is about 150MB in size. Here’s my code:

http://pastebin.com/T2dzwrwi

Any ideas why this may be happening?

Hi Ryan,

Please share the input PDF and XML files with us, so we could investigate the issue at our end. We’ll update you with the results the earliest possible.

We’re sorry for the inconvenience and looking forward to help you out.
Regards,

Is there a way that I can share this file with you? It’s 211MB.

Hrm. Today, the error message has seemingly changed to an out of memory error when calling the Save method.

I even started a new project, with minimal code, for testing just this one task. The code is here:

http://pastebin.com/Q343YGyX

The PDF I’m working with is 150MB. Is this too large?

Ryan

Hi Ryan,

We need to investigate the issue at our end. Sometimes the file size might cause such problems, but some other times the reason for such issues could be different. You may use Dropbox or Google Drive to share both of these files with us, so we could look into them in detail at our end. You’ll be updated with the results accordingly.

We’re sorry for the inconvenience.
Regards,

I’d rather not pay for Banckle.


Anyways, I was seeing the out of memory error and research told me that .NET has a 2GB memory limit on 32-bit compiled apps, so I changed it to compile for 64-bit and I no longer get the out of memory error. It looks like Aspose needs slightly more than 2GB of RAM when importing bookmarks on a PDF that is 150MB in size. Wow!

Hi Ryan,

Actually, sometimes due to the complex structure of the PDF files, the component might cause memory increase. However, with some tweaking in the component to cater the particular scenario such issues can be handled appropriately; this kind of issues do not occur with all the files of the same size. That’s why I wanted you to share the sample PDF with us, so we could investigate your scenario.

As far as sharing the PDF is concerned, Dropbox or Google Drive accounts can be created for free, so you don’t need to buy the account at the moment. Anyway, if you find any further issues and want to share the PDF file, you may use some other free file sharing service or your own FTP etc.

If you find any further questions, please do let us know.
Regards,