Rotate and save

73 views
Skip to first unread message

Tehila Horvitz

unread,
Sep 26, 2016, 12:53:07 PM9/26/16
to PDFTron WebViewer

Hello

When I Rotate all pages(button exits in toolbar) and save it with this command:

var annotManager = readerControl.docViewer.getAnnotationManager();

                        var options = { "xfdfString": annotManager.exportAnnotations() };

                        doc.getFileData(options).then(function (data) {

                            var encoded = arrayBufferToBase64(data);

}

The rotate didn't save.


 But when I rotate with custom button and rotate one page the rotate is saving

I rotate with this command:

readerControl.docViewer.getDocument().rotatePages([readerControl.docViewer.getCurrentPage()], CoreControls.PageRotation.e_270);


What I need to do?


Thank

Matt Parizeau

unread,
Sep 27, 2016, 9:12:08 PM9/27/16
to PDFTron WebViewer
Hi,

The buttons for rotating that are in the toolbar only apply the rotation to the viewer and it's not actually applied to the underlying document. The rotatePages function on the document will actually apply it to the underlying document which is why it works when you save the file data.


Matt Parizeau
Software Developer
PDFTron Systems Inc.

Tehila Horvitz

unread,
Sep 28, 2016, 1:27:05 PM9/28/16
to PDFTron WebViewer
Thank

בתאריך יום שני, 26 בספטמבר 2016 בשעה 19:53:07 UTC+3, מאת Tehila Horvitz:
Reply all
Reply to author
Forward
0 new messages