The problem that I'm having, is that sometimes the new PDF is upside down. For example, I can take PDF-A and draw it on to PDF-TEMP and it looks perfect when I save it. If I take PDF-B and draw it on to PDF-TEMP, the resulting PDF is upside down. Both PDF-A and PDF-B are right side up.
The original PDF's are provided by our art department, so I'm assuming that there is something different about them, but I have no idea what it would be or how to detect the difference so I know how to handle it.
Code: Select all
GdPicturePDF artPDF = new GdPciturePDF();
GdPicturePDF tempPDF = new GdPicturePDF();
GdPictureStatus status = new GdPictureStatus();
status = artPDF.LoadFromFile(ImageFile.FullName, true);
artPDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitInch);
status = artPDF.SelectPage(1);
status = artPDF.SaveToFile("newFolder\\TEST.PDF");
status = tempPDF.NewPDF();
tempPDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitInch);
status = tempPDF.NewPage(5.78f, 15.71f);
float left = (5.78 - artPDF.GetPageWidth()) / 2; // This usually ends up being approximately -.15
status = tempPDF.DrawPage(artPDF, 1, left, 0f, artPDF.GetPageWidth(), artPDF.GetPageHeight());
status = tempPDF.SaveToFile("newFolder\\TEMP.PDF");
Hopefully, this all makes sense to you. As you can tell, the app is written in C#. We're using .NET 4.5 and GdPicture 11. We've tested GdPicture 10, but got the same results. We haven't tried GdPicture 12 yet, but we're working on it.
Thanks for your help.