Hi,
I need to get the text of a pdf file grouped by their fontsize.
I used the following code to get all available fonts:
foreach my $fontname (sort $pdf->getFontNames(1)) {
my $font = $pdf->getFont(1, $fontname);
print $fontname."\n";
}
I was also able to get the complete text of a pdf page with:
my $page1 = $pdf->getPageContent(1);
print $pdf->getPageText();
How can I get the text together with the font. I need to find keywords in headings or bold text.
So it would be nice if there is a possibility to get all text with OPBaseFont0, all with
OPExtFont0, all with OPExtFont1 and so on...
I would be happy about some help with this.
Thank you