Would you have a simple example of how to remove internal rotation from a PDF produced by a scanner?
C# or VB samples welcome.
A scanned PDF is basically just a bunch of images bundled into a PDF “wrapper”, but we find that sometimes the internal structure of the PDF is not what we expect from what the user sees when they open the PDF in Adobe Acrobat Reader or Foxit PDF Reader or any such software. The user may, for example, see correctly formatted A4 Pages in a Portrait orientation, but internally the PDF may have Landscape pages with images on them rotated by 270 degrees. Obviously the Page Rotation can be set to something other than “None”
oPage.Rotate <> Aspose.Pdf.Rotation.None
And the PDF reader can handle that so that it still displays those pages to the user the way they are intended to be viewed.
But we sometimes need to convert a PDF to a “normal” state so
oPage.Rotate = Aspose.Pdf.Rotation.None
and the PDF should still be shown as identical to the original, but every approach we have tried so far results in a new PDF that is larger than the original, even after optimisation - at least a level of optimisation that doesn’t result in visible deterioration.
So I feel we’re missing a trick here. Could you provide us with a sample of code to reorient a scanned PDF to remove this internal rotation without causing a significant increase in the file size?