Hello, is there a way to set different Height of the page. I have a feature called "Fit to Height"
so I was trying to do this:
//get Width
fPDFViewer.GetProperty('Documents[#29434].Pages.Width', vDataOut, 0);
//set fit to page
fPDFViewer.SetProperty('Documents[#29434].Pages.Zoom', '-1', 0);
//set Width as it originally was
fPDFViewer.SetProperty('Documents[#29434].Pages.Width', vDataOut, 0);
but it fails saying "The property is read only"
how to set Height of the page
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 381
- Joined: Mon Jun 13, 2011 5:10 pm
Re: how to set Height of the page
Page width and height are read-only. You need to get and set the zoom level instead.
Code: Select all
// get original zoom
fPDFViewer.GetProperty('Documents[#29434].Pages.Zoom', vDataOut, 0);
//set fit to page
fPDFViewer.SetProperty('Documents[#29434].Pages.Zoom', '-1', 0);
//set zoom as it originally was
fPDFViewer.SetProperty('Documents[#29434].Pages.Zoom', vDataOut, 0);