We're currently having an issue when creating PDF's out of images.
We have a set of images and need a PDF with one image per page.
We've written a shared class that uses Syncfusion to do this.
For each path, we do:
using (var fileStream = new FileStream(path, FileMode.Open))
{
var pdfImage = PdfImage.FromStream(fileStream);
pageGraphics.DrawImage(pdfImage, CenteredRectangleThatFitsInPage(page, pdfImage));
}
CenteredRectangleThatFitsInPage computes a rectangle to center and maintain aspect ratio.
It works just fine in iOS.
In Android, pictures taken in Landscape work just fine, but pictures taken in Portrait appear rotated into Landscape once converted to the PDF.
It appears that calling
PDFImage.FromStream(fileStream)
doesn't respect the EXIF data for the orientation.
Any thoughts?