Add table in Footer of existing PDF using C# with Aspose.PDF for .NET

Hi Aslam,

I do also need to add a table to an existing pdf file. You mentioned a new issue PDFNEWNET-34055. Do you have any updates about how and when this new feature will be available?

Many thanks in advance,

Mike

Hi Mike,

Thanks for your inquiry. I’m afraid, the requested feature is still not planned due to some other priority tasks. However, I have requested the team for ETA and as soon as I get a feedback I will update you via this forum thread.

Thanks for your patience and understanding.

<span style=“font-size:10.0pt;line-height:115%;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:Calibri;mso-ansi-language:EN-US;mso-fareast-language:
EN-US;mso-bidi-language:AR-SA”>Best Regards

Hi Mike,


Thanks for your patience.

In order to accomplish the requirement of adding table in Footer of existing PDF file, please try using the following code snippet.

[C#]

string inFile = “c:/pdftest/MinRow_34042.pdf”;<o:p></o:p>

string outFile = "c:/pdftest/MinRow_34042_WithTable.pdf";

Document doc = new Document(inFile);

// Test table

Aspose.Pdf.Table table = new Aspose.Pdf.Table();

table.ColumnWidths = "50 50";

Aspose.Pdf.Row row = new Aspose.Pdf.Row();

row.Cells.Add("row1 cell 1");

row.Cells.Add("row1 cell 2");

table.Rows.Add(row);

row = new Aspose.Pdf.Row();

row.Cells.Add("row2 cell 1");

row.Cells.Add("row2 cell 2");

table.Rows.Add(row);

Aspose.Pdf.HeaderFooter footer = new Aspose.Pdf.HeaderFooter();

footer.Paragraphs.Add(table);

Aspose.Pdf.MarginInfo margin = new Aspose.Pdf.MarginInfo();

// footer size 60 pixels

margin.Bottom = 60;

margin.Left = 40;

foreach (Page page in doc.Pages)

{ page.Footer = footer; page.PageInfo.Margin = margin; }

doc.Save(outFile);

The issues you have found earlier (filed as PDFNEWNET-34055) have been fixed in Aspose.Pdf for .NET 7.7.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(7)