Floating Box Over Page (Controlling Z-Index)

How do I control Z index of a floating box? Or why does this box not show up on the attached PDF?


I’d like to eventually add a table in the box because I have a bunch of dynamic content to fill in. This content needs to be positioned so it aligns with the other content.




//intro spread pages
string introSpreadPath = Path.Combine(AssetsPath, "pages", "intro_spread.pdf");
Document introSpreadDocument = new Document(introSpreadPath);
introSpreadDocument.RemoveMetadata();
introSpreadDocument.RemovePdfaCompliance();
introSpreadDocument.OptimizeResources();
introSpreadDocument.ProcessParagraphs();

//first page of spread
Page introPage = SetPageProperties(introSpreadDocument.Pages[1]); //start with 1

//second page of spread
Page contactPage = introSpreadDocument.Pages[2];

contactPage.Flatten();
contactPage.ProcessParagraphs();

FloatingBox container = new FloatingBox(375, 575);
container.Width = 375;
container.Height = 575;
container.Left = 254.5;
container.Top = 400;
container.BackgroundColor = Color.Orange;
container.Border = new BorderInfo(BorderSide.All, 1f, Color.Black);
container.Paragraphs.Add(new TextFragment("Where did this go?"));
contactPage.Paragraphs.Add(container);

Document doc = new Document();

Page[] pages = new Page[2];
pages[0] = introPage;
pages[1] = contactPage;

doc.Pages.Add(pages);

//cleanup
introPage.FreeMemory();
contactPage.FreeMemory();
introSpreadDocument.FreeMemory();

string exportPath = Path.Combine(ExportFolderPath, "BoxOverPage.pdf");
doc.Save(exportPath);

Nevermind.


ProcessParagraphs()
dirq:
Nevermind.

ProcessParagraphs()
Hi Dirq,

Thanks for contacting support.

Do you mean the issue is resolved while using above stated method or you still facing the issue while using the API. We are sorry for this inconvenience.