PDFsharp & MigraDoc Foundation

Auto print
Page 1 of 1

Author:  BrianTheK [ Mon Nov 26, 2018 3:03 pm ]
Post subject:  Auto print

Hi. I'd like to create a pdf using Migradoc and have the print dialog automatically pop up when the pdf is opened. With iTextSharp we used to do:
PdfWriter.AddJavaScript(PdfAction.JavaScript("this.print(true);\r", pdfW));

I found this post on StackOverflow where someone opened an existing pdf and modified it. I'd like to do it as the pdf is created, hopefully with MigraDoc since that is what I am using to create the pdf.

https://stackoverflow.com/questions/616 ... lly-prints


Author:  TH-Soft [ Mon Nov 26, 2018 7:45 pm ]
Post subject:  Re: Auto print

MigraDoc uses PDFsharp to generate the PDF file. You will have to use PDFsharp for special requirements like yours.

You can make the changes after rendering the PDF file with MigraDoc, but before saving it, so the file will be saved only once.
Use the PdfDocument property of the PdfDocumentRenderer class.


Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group