Transparent and stackable paragraphs/sections


I am working on converting a Report that is an aspx page into a pdf page. One of the control on the aspx page uses Panels (or divs) to create two images, then stacks one on top of the other, with the top one having a transparent background, to form a diagram.

My question is, how can I mirror this in PDF? Is it possible to create two paragraphs or sections at the same position, one with a transparant background?



Dear Jim01,

Thank you for considering Aspose.Pdf.

Please refer to Custom Positioning.


I am trying this but it doesn’t seem to want to make the paragraphs overlap. I have the following code.

(tResponse is a Table)

Row rResponse2 = tResponse.Rows.Add();

Cell cNetDiag = rResponse2.Cells.Add();

Aspose.Pdf.Text tx1 = new Text(“Text1”, tRiskReportField);

tx1.PositioningType = PositioningType.ParagraphRelative;

tx1.Top = 0f;

tx1.Left = 0f;

Aspose.Pdf.Text tx2 = new Text(“Text2”, tRiskReportField);

tx2.PositioningType = PositioningType.ParagraphRelative;

tx2.Top = 0f;

tx2.Left = 0f;



And it still just has:

How do I get the paragraphs to lay over each other so that the text is overlapping?


OK, I figured out how to get it to work, but I think there might be a possible error in aspose.

I add the first paragraph (in this case text) to the Cell like so:

Aspose.Pdf.Text tx1 = new Text(“Text1”);
tx1.ID = “tx1”;

Then I add the second Paragraph, not to the cell, but to the section and anchor it to the first paragraph like so:

Aspose.Pdf.Text tx2 = new Text(“Text2”);
tx2.PositioningType = PositioningType.ParagraphRelative;
tx2.ReferenceParagraphID = “tx1”;
tx2.Left = 0f;
tx2.Top = 0f;

And that works fine. Originally I was adding the second paragraph to the cell and that didn’t work. But, shouldn’t it have worked? Why do I have to add the second paragraph to the section instead of the cell?



Dear Jim01,

Thank you for considering Aspose.Pdf.

Custom positioning is only supported for paragraph inside table cell. Sorry for not making this clear in the document.