Synchronizing document page order with the image order.

Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.

Moderator: Alex

Post Reply
IntegraHarlan
Posts: 84
Joined: Fri Jan 24, 2020 3:37 am

Synchronizing document page order with the image order.

Post by IntegraHarlan »

HI,
In our application we have an ImageViewer and a ThumbnailViewer. The ThumbnailViewer has the ImageViewer set for the MasterViewer propery.
When the document is loaded we also create PdfDocument from the ImageViewer.
_pdfDocument = PdfDocumentController.GetPageAssociatedWithImage(_documentViewer.Images[0]).Document;

Every thing seems to update correctly when we make updates in the ImageViewer the PdfDocument is updated with the exception of the page order.
When we change the page order in the ThumbnailViewer, the order of the Images for the ImageViewer and ThumbnailViewer are updated correctly.
However, the page order of the PDFDocument is not updated. The page order of the Document properties of the PdfAnnotaion is also not updated.
Is there a way to synchronize the Document page order with the Image order?

Thanks
Harlan.
Alex
Site Admin
Posts: 2307
Joined: Thu Jul 10, 2008 2:21 pm

Re: Synchronizing document page order with the image order.

Post by Alex »

Hi Harlan,

When PDF document is loading to a viewer, the SDK does the following steps:
  • SDK loads PDF document into memory
  • For each page in PDF document
    • SDK creates a VintasoftImage object, which is associated with PDF page, and loads VintasoftImage object to the viewer's image collection
    • Viewer renders VintasoftImage object and displays PDF page
Viewer does not know about PDF document, viewer knows about image collection only. Image collection also does not know about PDF document, image collection knows about VintasoftImage objects only.

Please save reordered image collection to the source PDF document and your reorder changes will be saved to PDF document.

Best regards, Alexander
Post Reply