i have a huge single pdf and i want to print it in DIN A4 Format.
For that it has to be scaled, keep its aspect ratio and be splitted.
This is my Code so far wich is working but its only for a single page and is not splitting the rest of the page. It just cut it off.
- Code: Select all
if (PdfDocument != null)
{
var pdialog = new PrintDialog();
if (pdialog.ShowDialog() == DialogResult.OK)
{
// Costume Scale to print Page Size (DINA4)
float costumeScale = PdfDocument.PageSettings.Width / PdfDocument.PrintSettings.PaperSize.Width;
PdfDocument.PrintSettings.PrinterName = pdialog.PrinterSettings.PrinterName;
PdfDocument.PrintSettings.SelectSinglePageLayout(Spire.Pdf.Print.PdfSinglePageScalingMode.CustomScale, false, (costumeScale * 100));
PdfDocument.Print();
}
}
I need something like:
- Code: Select all
PdfDocument.PrintSettings.SelectSplitPageLayout(Spire.Pdf.Print.PdfSinglePageScalingMode.CustomScale, false, (costumeScale * 100));
See a sample pdf attached.
Please Help
Greetings
Fabian