I'm trying to retrieve things like height, width, isLandscape, and rotation but it seems that when I load a document all these values are at a set value. No matter what PDF I load, it seems that pageinfo shows the height as 842 and the width as 595. I believe this is in points which would convert to an A4 size piece of paper. isLandscape is always false and rotation is always none.
These data need to add a watermark on the first page to specific coordinates.
Document pdfDocument = new Document(@"D:\PDF's\input.pdf");
Artifact artifact = new Artifact(Artifact.ArtifactType.Pagination, Artifact.ArtifactSubtype.Watermark);
FormattedText ft = new FormattedText("E-2015-001240-DIPON", System.Drawing.Color.LightGray, "Helvetica-Bold", EncodingType.Winansi, false, 16);
artifact.SetText(ft);
artifact.Position = new Aspose.Pdf.Point(40, pdfDocument.PageInfo.Height - 40);
artifact.Rotation = 0;
pdfDocument.Pages[1].Artifacts.Add(artifact);
pdfDocument.Save(@"D:\PDF's\output.pdf");
But since the height values of different PDF are different, the watermark has a variable position in the PDF documents.
Thank you for any help you can provide us.
Jonthan