Discussion:
[iText-questions] Itextsharp PDF Parsing Font Requirement
Ajit Makvana
2015-01-06 05:04:07 UTC
Permalink
why there is need of font files* [FontName.afm]* in itextsharp library and
without those font files can we extract text from PDF files and for newly
introduced fontface itextsharp is useful to extract text from PDF or Not?
if not then why..?
iText mailing list
2015-01-06 08:07:50 UTC
Permalink
why there is need of font files/[FontName.afm]/ in itextsharp library
Those files contain font metrics (AFM = Adobe Font Metrics). They are
needed to calculate the dimensions of snippets of text (height, width).
The 14 AFM files shipped with iTextSharp correspond with the 14 Standard
Type 1 fonts. These are fonts that any PDF viewer should be able to
render, hence there is no need to embed these fonts (unless font
embedding is a requirement, e.g. in the context of PDF/A).

Please download the free ebook "The Best iText Questions on
StackOverflow" and read the answers to the questions in the section
about fonts for more info: https://leanpub.com/itext_so
and without those font files can we extract text from PDF files and
for newly introduced fontface itextsharp is useful to extract text
from PDF or Not?
You don't need AFM files to extract text, as most the information you
need (such as the width of each glyph that is used in the document) is
stored inside the document. iTextSharp is useful to extract text from a
PDF, but sometimes it is impossible to extract text in general (no
matter which tool you're using). For a more elaborate explanation,
please watch this video:

Loading...