Set "fit one full page" view when saving word to PDF

Hi there,

sometimes when I open PDF that I download it is displayed in acrobat with "Fit one full page to window" display setting, but when I use DocToPDFConverter I get default view in acrobat (I must manually pick it in Acrobat)
Is there an option to set the view that will be shown when I open PDF saved via DocToPDFConverter?

Best regards,
Tomasz

3 Replies

MR Manikandan Ravichandran Syncfusion Team April 3, 2020 08:35 AM UTC

Hi Tomasz,

Thank you for contacting Syncfusion support.

Yes, you can achieve your requirement “display the PDF with ‘Fit one full page to window’ mode in default” using the following code example.
 
WordDocument document = new WordDocument(@"Sample.docx");
document.ChartToImageConverter =
new ChartToImageConverter();
DocToPDFConverter converter =
new DocToPDFConverter();           
PdfDocument pdf = converter.ConvertToPDF(document);
pdf.ViewerPreferences.CenterWindow =
true;
pdf.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage;
pdf.Save(
"Output.pdf");
pdf.Close();
converter.Dispose();
document.Close();
 

Please let me know if you have any concern on this

Regards,
Manikandan Ravichandran



TJ Tomasz Jagusz April 3, 2020 08:50 AM UTC

Hi Manikandan,

this is exactly what I was looking for.
Thank you!

Best regards,
Tomasz


PN Preethi Nesakkan Gnanadurai Syncfusion Team April 6, 2020 05:01 AM UTC

Hi Tomasz, 
  
Most welcome. 
  
Regards, 
Preethi 


Loader.
Up arrow icon