PDFsharp & MigraDoc Foundation http://forum.pdfsharp.de/ |
|
PDFSharp / Set Zoom on existing document http://forum.pdfsharp.de/viewtopic.php?f=2&t=1586 |
Page 1 of 1 |
Author: | jesuissur [ Thu Mar 17, 2011 2:02 pm ] |
Post subject: | PDFSharp / Set Zoom on existing document |
Hi, I have an existing document on which I set some properties. I would like to set the Zoom level but don't know how. Anybody knows if and how I can set the zoom level on an existing document with PDFSharp. This is the existing (VB) code: Code: Dim doc = PdfReader.Open(New MemoryStream(bytesContent)) doc.ViewerPreferences.CenterWindow = True doc.ViewerPreferences.FitWindow = True doc.ViewerPreferences.HideToolbar = False doc.PageLayout = PdfPageLayout.SinglePage Thank you much Phil |
Author: | Thomas Hoevel [ Thu Mar 17, 2011 4:29 pm ] |
Post subject: | Re: PDFSharp / Set Zoom on existing document |
Hi! I think that when you specify FitWindow the zoom factor should be calculated based on Window size and page size. Here's a thread with a similar question: viewtopic.php?f=2&t=723&hilit=fit And here's a sample that sets options that are not covered by PDFsharp options: http://www.pdfsharp.de/PDFsharp/index.p ... &Itemid=32 Similar to /FITV you can use "/XYZ left top zoom". You can pass "null" for left on top to use the default position. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |