We use in our company for opening pdf files your perfect product PDF-XChange Viewer 2.5 (build 195).
In my web application I generate programatically pdf file (via Telerik Reporting dlls) and then it's embedd into web page through this:
Code: Select all
<object><embed width="100%" type="application/pdf" id="pdfObject" runat="Server"></embed></object>
1st - add print preview on pdf file open - this property works properly with PDF-Xchange Viewer
2nd - change zoom value (decrease to e.g. 70%) on initial opening of pdf file: this.zoom=70;
- this works just in Adobe Acrobat Reder, but not in PDX-Xchange Viewer
Here is the C# code declaration which I use:
Code: Select all
Hashtable deviceInfo = new Hashtable();
deviceInfo["JavaScript"] = "this.print({bUI: true, bSilent: true, bShrinkToFit: true});this.zoom=70;";
ReportProcessor reportProcessor = new ReportProcessor();
RenderingResult result = reportProcessor.RenderReport("PDF", reportToExport, deviceInfo);
It would be perfect If PDF-XChange Viewer can accept this.zoom property. Of course there are other javascript properties which will be fine if your product supports them (zoomtype.fitP;zoomtype.fitW;zoomtype.fitH, etc.)
I've attached an example file which has set property this.zoom=10;
Please help me to solve this issue.
Best regards
Vasssek