Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #10325 Reply

    Viktor

    Hi,

    We have an issue with importing a lot of bookmarks at one time into PlugPDFDocument in our project.
    As we found only one way to import bookmarks with - (void)addOutlineItemWithTitle: (NSString*)title pageIdx: (NSInteger)pageIdx parent: (PlugPDFOutlineItem*)parent after:(PlugPDFOutlineItem*)after; we have to do it in a for loop.
    But it takes considerable time to import all bookmarks (about 300 items) into document as it seems that the document rebuilds the bookmarks tree each time we add a new bookmark. We think it’s reasonable but not suitable for our purpose as we’re doing something like bulk import there. Besides each time we also need to seek for ‘parent’ and ‘after’ items among the existing items in the tree. So each time we have to call ‘- (NSArray*)outlines;’ method from document in order to get actual ‘parent’ and ‘after’ bookmarks which also consumes some time.

    So in a nutshell it would be great to have a method which would import an array of bookmarks in one transaction. Something like updateOutline (List< OutlineItem > list) in Android library.

    We also noticed that there’s PlugPDFOutlineTree type in the SDK but couldn’t find where and how to use it. So if we could use it as an alternative and construct our own tree and then import it – that would also help us a lot.

    Could you please advise if there anything we can do to improve bookmarks import performance? Are there any plans for adding methods for bookmarks bulk insert to iOS library in the near future?

    Thanks,
    Viktor.

    #10342 Reply

    Dr. Plug
    Moderator

    Hi, Viktor

    Thank you for the inquiry.
    We’ll try to make that feature by next Friday.
    So could you wait for a few days? After making a new feature, I’ll let you know through this forum.

    Best Regards,
    Dr.Plug

    #10407 Reply

    Viktor

    Hi,

    Sure, I’ll wait as this might be important for our project. Thank you for considering the issue.

    Thanks,
    Viktor.

    #10453 Reply

    Dr. Plug
    Moderator

    Hi, Viktor

    Thank you for the waiting.
    We made that feature and release a new version.
    There is a method – (void)updatePdfOutlineTree: (NSArray*)itemArray in PlugPDFDocument.

    This is a sample code to use that method.
    1. 2. making a plain outlines.

    2. making a child outlines.

    Could you check it? This is a download link.
    https://plugpdf.com/thank-you/

    Best Regards,
    Dr.Plug

    #10469 Reply

    Sergey

    Hi, Dr. Plug
    I tested new lib and new function updatePdfOutlineTree doesn’t work

    #10470 Reply

    Sergey

    Hi, Dr. Plug
    I tested new lib and new function updatePdfOutlineTree and it doesn’t work.
    Actually Your example doesn’t work. It doesn’t add/update any outline. Tested with new version of lib and standard pdf file.
    Thanks,
    Sergey.

    #10473 Reply

    Dr. Plug
    Moderator

    Hi, Sergey

    Thank you for the feedback.
    Could you test at a viewDidLoad with a temp version?
    This is a download link of temp version.
    https://plugpdf.com/sdkfile/PlugPDF_iOS.zip
    And this is sample code/

    Best Regards,
    Dr.Plug

    • This reply was modified 1 year, 1 month ago by  Dr. Plug.
    #10477 Reply

    Sergey

    Hi, Dr. Plug
    Thanks a lot. Seems, that new version started working

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: iOS multiple bookmarks import
Your information: