Sign In  Sign Up Live-Chat

ExtractBookMarks doesn"t run with some Pdf

Last post 10-31-2007, 6:56 AM by forever. 13 replies.
Sort Posts: Previous Next
  •  07-17-2007, 2:13 AM 84369

    ExtractBookMarks doesn"t run with some Pdf

    Hi,

    I've got an InvalidCastException in Aspose.Pdf.Kit.dll assembly with a multi-levels bookmarked Pdf. Then i tried with another Pdf (single level bookmark) and it runs without any exception.

    Here's the stack if it can help you :

    x22bcffa34b42a390.x93baed8933778e80.x41b1a34077c4ae7a(x5bdee61ea12b1569 xccb63ca5f63dc470, Int32 x66bbd7ed8c65740d, IList x9961d01c6815ef17, BookMarks xf69c6c8125cda4f8)
       x22bcffa34b42a390.x93baed8933778e80.x2f1891c297bf7100()
       Aspose.Pdf.Kit.PdfContentEditor.ExtractBookMarks()

    Tom.

     

     
  •  07-17-2007, 2:36 AM 84375 in reply to 84369

    Re: ExtractBookMarks doesn"t run with some Pdf

    Hi,

    Thank you for considering Aspose.

    Could you please share you code and Pdf document that can reproduce this problem and let us check it.

    Thanks.

    Adeel Ahmad
    Support Developer
    Aspose Changsha Team
    http://www.aspose.com/Wiki/default.aspx/Aspose.Corporate/ContactChangsha.html

     
  •  07-17-2007, 4:23 AM 84390 in reply to 84375

    Re: ExtractBookMarks doesn"t run with some Pdf

    Attachment: Present (inaccessible)

    Here is my code:

    Aspose.Pdf.Kit.PdfContentEditor edit = new Aspose.Pdf.Kit.PdfContentEditor();

    edit.BindPdf(pdfpath);

    Aspose.Pdf.Kit.BookMarks bms = edit.ExtractBookMarks();

    But i can't send you the pdf. The file is confidential and too big (50Mb)

    Thus i send you another Pdf that does not throw an InvalidCastException, but an ArgumentOutOfRangeException with the same code

    Tom.

     

     
  •  07-17-2007, 8:08 AM 84420 in reply to 84390

    Re: ExtractBookMarks doesn"t run with some Pdf

    Hi,

    I am able to reproduce this error. I will discuss this with the developers and we will let you know as soon as solution is found.

    Thanks.

    Adeel Ahmad
    Support Developer
    Aspose Changsha Team
    http://www.aspose.com/Wiki/default.aspx/Aspose.Corporate/ContactChangsha.html

     
  •  10-17-2007, 7:32 AM 98953 in reply to 84420

    Re: ExtractBookMarks doesn"t run with some Pdf

    Hi,

    Have you done something about bookmarks extraction ?

    Thank you.

    Tom.

     

     
  •  10-17-2007, 7:28 PM 99082 in reply to 98953

    Re: ExtractBookMarks doesn"t run with some Pdf

    Hi,

    Yes, this bug has been fixed already. Please download the latest version.

    Thanks.
     
  •  10-18-2007, 7:31 AM 99167 in reply to 99082

    Re: ExtractBookMarks doesn"t run with some Pdf

    Hi,

    It's OK with the PDF i had posted previously.

    But not with my first post that i had not sent to you because of the document privacy.

    I have found out the problem. It seems your bookmark extractor engine don't support "named destinations" (PDF 1.2 feature). That's why it throws an InvalidCastException trying to cast a Named Destination as a Page Destination.

    I hope this feature would be added in earlier Aspose.Pdf.Kit versions.

    Tom.

     

     
  •  10-18-2007, 8:01 AM 99175 in reply to 99167

    Re: ExtractBookMarks doesn"t run with some Pdf

    Hi,

    I am not sure about this issue, kindly if you can send me your pdf document at adeel.ahmad@aspose.com and let me check this issue, so i can discuss this with the developer and will ask if we can support this feature in new version as well. if the size is big, then just split it and then send us that document that can reproduce this error.

    Thanks.

     
  •  10-18-2007, 8:42 AM 99181 in reply to 99175

    Re: ExtractBookMarks doesn"t run with some Pdf

    Hi,

    I've found a PDF that throw the same System.InvalidCastException :

       at x22bcffa34b42a390.x93baed8933778e80.x41b1a34077c4ae7a(x5bdee61ea12b1569 xc
    cb63ca5f63dc470, Int32 x66bbd7ed8c65740d, IList x9961d01c6815ef17, BookMarks xf6
    9c6c8125cda4f8)
       at x22bcffa34b42a390.x93baed8933778e80.x2f1891c297bf7100()
       at Aspose.Pdf.Kit.PdfContentEditor.ExtractBookMarks()

    Please try the PDF at :

    http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference_1-7.pdf

    Tom.

     

    PS: You would also notice that the process use much resources for a while (100% CPU and up to 620Mb memory used)

     
  •  10-18-2007, 3:53 PM 99257 in reply to 99181

    Re: ExtractBookMarks doesn"t run with some Pdf

    Hi,

    I am able to reproduce this error with the Pdf file you have mentioned and logged it as issue # PDFKITNET-3921. I will discuss this with the developer and we will let you know as soon as solution is found.

    Thanks.

     

     
  •  10-18-2007, 9:32 PM 99282 in reply to 99167

    Re: ExtractBookMarks doesn"t run with some Pdf

    Hi intphant,
    I have checked the error, The problem is as you say, Now the bookmark extractor engine don't support "named destinations" . That's why it throws an InvalidCastException trying to cast a Named Destination as a Page Destination.
    I will fix this bug in four days.

     


    Allen Wen
    Developer
    Aspose Changsha Team

     
  •  10-28-2007, 10:00 PM 100372 in reply to 99282

    Re: ExtractBookMarks doesn"t run with some Pdf

    This bug has been fixed. Please download hotfix 2.6.4.0.

    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  10-31-2007, 3:16 AM 100730 in reply to 100372

    Re: ExtractBookMarks doesn"t run with some Pdf

    Hi,

    Thank you, the bug is fixed. But the process uses too much resources (100% CPU, 600Mb Memory on a 21Mb PDF).

    Tom.

     

     
  •  10-31-2007, 6:56 AM 100755 in reply to 100730

    Re: ExtractBookMarks doesn"t run with some Pdf

    We have planed to improve the performance and reduce the memory but I am afraid we can't finish this task in short time. Sorry for the inconvenience.

    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
View as RSS news feed in XML