I'm trying to print out a pdf in both A3 and A4.
Using the following code:
private void PrintFile(string FullPath, bool colour = false, bool A3 = false, short Quantity = 1)
{
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(FullPath);
doc.PrintSettings.PrinterName = PrinterCB.Text;
PaperSize paper;
if (A3)
{
paper = new PaperSize("A3", (int)PdfPageSize.A3.Width, (int)PdfPageSize.A3.Height)
{
RawKind = (int)PaperKind.A3
};
doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.FitSize, true, 100f);
}
else
{
paper = new PaperSize("A4", (int)PdfPageSize.A4.Width, (int)PdfPageSize.A4.Height)
{
RawKind = (int)PaperKind.A4
};
doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.FitSize, true, 100f);
}
doc.PrintSettings.PaperSize = paper;
doc.PrintSettings.Copies = Quantity;
doc.PrintSettings.Color = colour;
doc.PrintSettings.Collate = true;
PrintController printController = new StandardPrintController();
doc.PrintSettings.PrintController = printController;
doc.Print();
}
However in both A3 and A4 it is only using 70% of the page - see attached.
I can't workout what I am doing wrong. Any help you can give me would be appreciated.