I'm trying to print pdf's (in this case photo's saved in pdf-format) A4 size.
I load the document into a Sprire pdf document and try to influence the way the document is printed by using this statement
I then save the document to a memorystream and send it back to the frontend as a byte[].
- Code: Select all
PdfDocument doc = new PdfDocument(document);
doc.PrintSettings.SelectSinglePageLayout(Spire.Pdf.Print.PdfSinglePageScalingMode.FitSize, true, 100f);
MemoryStream docstream = new MemoryStream();
doc.SaveToStream(docstream);
return docstream.ToArray();
The frontend uses PdfToPrinter to actually send the document to the printer.
However, no matter how I change the printsettings, PdfToPrinter keeps printing multiple pages on one page.
So the final question is: Are the printsettings actually stored in the document itself of is that simply a wrong assumption?