Hi, I need to print package labels from a pdf document. The papersize of the PDF is Width = 13.96 and the height 3.99
The height and widt are not the problem these are adjusted nicely. However the text of the labels is shifting of the page. See atached xps file and the correct pdf input file.
This is how my code looks
viewer.PrinterJobName = DocName;
viewer.AutoResize = false;
viewer.AutoRotate = false;
viewer.PrintPageDialog = false;
System.Drawing.Printing.PrinterSettings ps = new System.Drawing.Printing.PrinterSettings();
System.Drawing.Printing.PageSettings pgs = new System.Drawing.Printing.PageSettings();
System.Drawing.Printing.PrintDocument prtdoc = new System.Drawing.Printing.PrintDocument();
pgs.PaperSize = new System.Drawing.Printing.PaperSize("Custom", Convert.ToInt16(this.pageWith * 100), Convert.ToInt16(this.pageHeight * 100));
pgs.Margins = new System.Drawing.Printing.Margins(Convert.ToInt32(leftMargin * 100),Convert.ToInt32(rightMargin * 100), Convert.ToInt32(topMargin * 100),Convert.ToInt32(bottomMargin * 100));
ps.PrinterName = "Microsoft XPS Document Writer";
ps.PrintToFile = true;
ps.PrintFileName = @"d:\Temp\opan300.xps";
I've tried the other options such as
viewer.AutoResize = true; This makse the characters incredible small (6 pts or so)
viewer.AutoRotate = true; Printed the report landscape and we don't want that.
Basically We need to print an exact copy of the PDF.
Any help on this issue is appriciated.