Hi,
I am making an application that is merging pages from different existing PDF documents and afterwards saving to a new PDF document, which is silent printed.
My problem is that some of the merged pages isn't A4 format. I want to either resize when creating the new PDF, or resize when the new PDF is printed.
Can you please help with any solution on this?
Code used for merging pages into new PDF:
PdfDocument PdfToPrint = new PdfDocument();
PdfToPrint.PageSettings.Size = PdfPageSize.A4;
PdfLoadedDocument LoadedPdf = new PdfLoadedDocument(Filepath);
PdfToPrint.ImportPageRange(LoadedPdf, FromPage - 1, ToPage - 1);
PdfToPrint.Save("Generated files/" + Itemnumber + ".pdf");
Code used for printing the new PDF:
PdfDocumentView viewer = new PdfDocumentView();
viewer.Load("Generated files/" + filename + ".pdf");
PrintDialog dialog = new PrintDialog();
dialog.Document = viewer.PrintDocument;
dialog.Document.Print();
viewer.Dispose();