We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Fit one full page to window

Hi - I looked at and experimented with the properties for Aspose.Pdf.Document, but I’m not able to find a property which allows me to preset the view to “Fit one full page to window” - that is, to fit pages such that they are viewed at full size (vs. full width). The corresponding buttons in Adobe reader are attached as an image. They are the 3rd to last grouping. I’m interested in full size rather than full width. Thanks.

Hi Adam,


Thanks for contacting support.

Please visit the following link for required details on how to Set Document Window and Page Display Properties

Hey, Nayyer:

I saw this great documentation before, but none of those options/properties do what I need. Would you happen to know which one I need?

Hi Adam,


Thanks for sharing the details.

In order to accomplish your requirement, please set PageLayout as single.

pdfDocument.PageLayout = Aspose.Pdf.PageLayout.SinglePage;

In case you encounter any issue, please share your resource/input PDF document.

[C#]

//Open document<o:p></o:p>

Document pdfDocument = new Document("c:/pdftest/TopNews Dec-2014.pdf");

//pdfDocument.Pages.Add();

//pdfDocument.Pages[1].Paragraphs.Add(new TextFragment("Hello WOrld..."));

//Set different document properties

//Specify to position document's window - Default: false

pdfDocument.CenterWindow = true;

//Predominant reading order; determins the position of page

//when displayed side by side - Default: L2R

pdfDocument.Direction = Direction.R2L;

//Specify whether window's title bar should display document title

//if false, title bar displays PDF file name - Default: false

pdfDocument.DisplayDocTitle = true;

//Specify whether to resize the document's window to fit the size of

//first displayed page - Default: false

pdfDocument.FitWindow = true;

//Specify whether to hide menu bar of the viewer application - Default: false

pdfDocument.HideMenubar = true;

//Specify whether to hide tool bar of the viewer application - Default: false

pdfDocument.HideToolBar = true;

//Specify whether to hide UI elements like scroll bars

//and leaving only the page contents displayed - Default: false

pdfDocument.HideWindowUI = true;

//Document's page mode. specify how to display document on exiting full-screen mode.

pdfDocument.NonFullScreenPageMode = Aspose.Pdf.DOM.PageMode.UseNone;

//Specify the page layout i.e. Default, SinglePage, OneColumn, TwoColumnLeft, TwoColumnRight, TwoPageLeft, TwoPageRight

pdfDocument.PageLayout = Aspose.Pdf.PageLayout.SinglePage;

//Specify how the document should display when opened

//i.e. show thumbnails, full-screen, show attachment panel

pdfDocument.PageMode = Aspose.Pdf.DOM.PageMode.UseNone;

//Save updated PDF file

pdfDocument.Save(“c:/pdftest/Resultant_output.pdf”);