I am using Aspose.PDF api to analyse pdf file content, and I met two issues can’t find solution until now;
1.How to get heading content:
I found there are APIs to create heading, but did not find API how to get exist heading content, can you show me some light?
2. How to get table head row:
You know, in office word, if I insert one table, I can define the first row as header row, so does Aspose.PDF have api to check if this table has header row.
@imran.rafique,
Imran, thanks for you response! My requirement is to get the heading content, not header and footer, I found this API as below:
Aspose.Pdf.Heading heading = new Aspose.Pdf.Heading(1);
But, I didn’t find any API which can get existing heading object and get the heading content, do you know about this?
For table, my requirement is to get the head row, which define the table column name, if I use TableAbsorber, I can get every row’s value, but I can’t check if the first row is head row or just data row.
A feature request to retrieve headings from the PDF document has already been logged under the ticket ID PDFNET-35058 in our issue tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.
After retrieving a table row, you can iterate through the text elements of each cell and find the font of text. If the font is bold, then you can determine that it is the heading row. The TextFragment instance, helps to retrieve the font of text. Please refer to this help topic: Replace fonts in existing PDF file
We are afraid that the feature request PDFNET-35058 has not been supported yet so headings may not be differentiated for now. We have logged your concerns and will let you know as soon as some significant updates will be available.