I have some difficult printing a pdf with big size to a plotter (an image in attachment).
The pdf file has already right size and i not want to scale it. (In attachment the file)
I try with code below but the result show only a portion of the content.
What is the problem? What I missed?
Thanks in advance
- Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(path);
doc.PrintSettings.PrinterName = "PRINTER_NAME";
doc.PrintSettings.Copies = 1;
SizeF size = doc.Pages[0].Size;
PdfPageSettings settings = new PdfPageSettings();
settings.Size = new SizeF(size.Width, size.Height);
doc.PageSettings = settings;
PaperSize paper = new PaperSize("Custom", (int)size.Width, (int)size.Height);
paper.RawKind = (int)PaperKind.Custom;
doc.PrintSettings.PaperSize = paper;
doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.ActualSize, true);
doc.Print();