How can I get a path for each character?

Q: When I get the font object from an element, is that the actual font
containing all the characters for that font or is it a subset?

Also, I know nothing is simple with PDF :-), but is there a relatively
easy way to draw the PDF font exactly as it should appear? Get the
path for each character?
A: It depends on the embedded font. In most cases the font is
subsetted, but sometimes the entire font is embedded. Also in some
cases the font is not embedded at all.

Is there a simple way to get a path for each character?

Using PDFNet you can obtain glyph outlines for every charcode used
within a document using Font. GetGlyphPath() method (http://

For example, assuming that an 'e_text_run' element is encountered, you
can obtain glyph outlines for each charcode in the run as follows:

CharIterator itr = element.GetCharIterator();
for (; itr.HasNext(); itr.Next() {
  pos.m_h = itr.Current().x; pos.m_v = itr.Current().y;
  Matrix2D path_mtx(text_mtx * pos * font_mtx);
  font.GetGlyphPath(itr.Current().char_code, path_oprs, path_data,
true, &path_mtx);

The meaning of data stored in 'path_oprs' and 'path_data' is the same
as for the path element (returned by Element.GetPathTypes()/
GetPathPoints(); for a concrete example of how to extract the outlines
out of these arrays, please take a look at ElementReaderAdv (http:// sample project.

Also, Font.GetGlyphPath() will work regardless whether the font is
subsetted or is missing.