Modifying ViewerPreferences of existing pdf

Modifying ViewerPreferences of existing pdf

Forum member · Nov 7, 2005
We have a document repository of PDFs and need to standardize the display of these files in IE. Specifically we need to set the HideMenubar, HideToolbar, and HideWindowUI. Assuming the PDFs are already created, my first guess was the Merger component. In my mind it isnt really a merger as I only have a single PDF file with which modify. Could someone offer a direction to accomplish this functionality? Thank you.

Re:Modifying ViewerPreferences of existing pdf

Support · Nov 7, 2005
Hello, Since you will be displaying existing PDF documents in the IE browser, you will need to use our DynamicPDF Merger for .NET product to accomplish this. Here is the code snippet: C#: MergeDocument document = new MergeDocument(@"C:\Temp\Test.pdf"); // Set the viewer preferences document.ViewerPreferences.HideMenubar = true; document.ViewerPreferences.HideToolbar = true; document.ViewerPreferences.HideWindowUI = true; VB.NET: Dim MyDocument AS MergeDocument = New MergeDocument("C:\Temp\Test.pdf") ' Set the viewer preferences MyDocument.ViewerPreferences.HideMenubar = True MyDocument.ViewerPreferences.HideToolbar = True MyDocument.ViewerPreferences.HideWindowUI = True Following is the link to the Help Documentation on our web site that shows use of ViewerPreferences class and set the desired properties: ViewPreferences Class Feel free to download fully functional evaluation version from our web site from the following link: http://www.DynamicPDF.com/Products/MergerForNET/Download.csp Thanks, ceTe Software Support Team