Hello, I have an existing pdf file, that I need to open, push all existing content down, and in the created space create a heading. This is the code that I use:
var doc = new Document(output);
var pg = doc.Pages[1];
Heading hd1 = new Heading(2);
hd1.Margin.Top = 10;
hd1.Text = “Submittals”;
hd1.TextState.FontSize = 30;
hd1.HorizontalAlignment = HorizontalAlignment.Center;
pg.Paragraphs.Insert(0, hd1);
doc.Save(output);
Unfortunately, it does push the existing content down, but puts the heading text on top of it:
image.png (110.6 KB)
I’ve attached a sample pdf if you need to try it on something. AE-200A_Submittal.pdf.pdf (1013.4 KB)
Please let me know how can I accomplish this.
Thank you