Hello,
We are adding some drawing (mostly text and rectangles) to user a uploaded pdf. We have been experiencing a problem when the pdf meta-data indicates the page should be rotated 90 degrees. As a result, the text we add, for instance, appears vertically instead of horizontally.
An example of the meta-data on one of the problem pages, extracted using a tool:
Pages: 1
Encrypted: no
Page size: 612 x 792 pts (letter) (rotated 90 degrees)
File size: 113389 bytes
Optimized: yes
PDF version: 1.4
The code we are using for drawing is something along these lines:
Code: C#
var textLayer = new PdfTextLayer
{
Font = new PdfFont("Arial", fontSize, FontStyle.Regular),
};
var textContent = new PdfTextContent(text)
{
PositionMode = PdfTextPositionMode.Offset
};
textLayer.Contents.Add(textContent);
page.Contents.Add(textLayer);
Is there a property to make EO account for this rotation, so that gets rendered looks similar to what was drawn, or anything we can do differently?
If not, is there a property in PdfDocument or any other object where we can check the meta-data and determine if the page will be rotated?
Thanks for your help!