PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)
Moderators:PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
We just discussed this with one of my colleagues, and he advised that this JS method should work, but using it after undo/redo could cause unpredictable results.
We will see if we can get some further info here.
The other option is to work with temporary files, then you'll have this CropBox for sure and you can e.g. crop a selected area from one of previous states. Since there is this function on the navigation bar, it would be easier to use this native one...
The operations I do are: cropping an area out of a document (after that action you see the cropped area as a new document), putting a border around a document (an annotation in form of a rectangle is created), scaling it. That's all.
Now I'm trying to implement the functionality with the Memento pattern. The problem is, if I load a document having several pages and then cut out an area of it, I delete the rest of pages. How could I reverse deleting pages? How is that issue solved in your application programatically?
Sorry, it is impossible because the 'delete pages' operation is irreversible currently - you may only re-open document without saving.
But you will be able to undo it in the new version of this SDK - V3. Please wait..
Best
Regards.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.