I am taking an image of a page and placing the image onto a into a new document page.
I create the new document with no margins
docImage = new PdfDocument();
docImage.PageSettings.Margins = new PdfMargins(0,0,0,0);
I save the page from the original doc image to disk.
Image image = originalDoc.SaveAsImage(x);
image.Save(sImageName);
I then load the image with PDFImage from disk
PdfImage pdfimage = PdfImage.FromFile(sImageName);
float fitWidth = pdfimage.PhysicalDimension.Width;
float fitHeight = pdfimage.PhysicalDimension.Height;
I create a new page based on the size of the originating document
PdfPageBase page = docImage.Pages.Add(originalDoc.Pages[x].Size);
Then draw the image on the new page.
page.Canvas.DrawImage(pdfimage, 0, 0, fitWidth, fitHeight);
ISSUE:
The image is padding left about about 10px.
If you check out the attached pdf, the evaluations should lay on top of each other and the doc is being cropped on the right...
How can I get the document to draw at top 0, left 0?
CANNOT ADD A 2.5MB ZIP, PLEASE SEND AN EMAIL REQUEST FOR DOC
(HOW ABSURD!)