Hi.
Hi Michael,
Thanks for your inquiry. You may accomplish your requirement with the PrintRange property of the PrinterSetting object. Please check the Aspose.Pdf printing options and the sample code snippet to use the subjected properties.
// Create objects for printer and page settings and PrintDocument
System.Drawing.Printing.PrinterSettings ps = new System.Drawing.Printing.PrinterSettings();
System.Drawing.Printing.PageSettings pgs = new System.Drawing.Printing.PageSettings();
// Specify your printer name
ps.PrinterName = myPrinterName;
ps.PrintRange = System.Drawing.Printing.PrintRange.SomePages;
ps.FromPage = 1;
ps.ToPage = 2;
// Set PageSize (if required)
pgs.PaperSize = new System.Drawing.Printing.PaperSize("A4", 827, 1169);
// Set PageMargins (if required)
pgs.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
// Here you can set the PaperSource which you want to use as per your printer.
pgs.PaperSource = ps.PaperSources[1];
// Print document using printer and page settings
<>
Please feel free to contact us for any further assistance.
Best Regards,
Thank you. I know set FromPage and ToPage solve the first problem(Pages to print),but how to set Multiple and page order? I found PdfFileEditor had MakeNUp function .So why PdfViewer din’t fount this function?
lucy1667008715:
Thank you. I know set FromPage and ToPage solve the first problem(Pages to print),but how to set Multiple and page order? I found PdfFileEditor had MakeNUp function .So why PdfViewer din't fount this function?
I had some pdf file and I want to print the pdf file.But I must setting Print properties.Some pdf file only setting Pages to print.Some paf file only setting Multiple (Pages per sheet and page order).Some pdf file setting Pages to print and Multiple.
Hi Michael,