Skip to content

Instantly share code, notes, and snippets.

Change Settings for Opening PDF using C#. For further details: https://kb.aspose.com/pdf/net/change-settings-for-opening-pdf-using-csharp/
using Aspose.Pdf;
class Program
{
static void Main(string[] args)
{
new License().SetLicense("License.lic");
// Open document
Document pdfDocument = new Document("sample.pdf");
pdfDocument.CenterWindow = true;
pdfDocument.Direction = Direction.R2L;
pdfDocument.DisplayDocTitle = true;
pdfDocument.FitWindow = true;
pdfDocument.HideMenubar = true;
pdfDocument.HideToolBar = true;
pdfDocument.HideWindowUI = true;
pdfDocument.NonFullScreenPageMode = PageMode.UseOC;
pdfDocument.PageLayout = PageLayout.TwoColumnLeft;
pdfDocument.PageMode = PageMode.UseThumbs;
pdfDocument.Save("output.pdf");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment