For an existing PDF file, how do I find out what fonts used for each
page and font size. Are there any Java API I can use to find out thest
style information (font, font size, line spacing, page margin ...) of
a PDF file?
Thanks,
George Shi
gshi@ekagrasoft.com
|
|
0
|
|
|
|
Reply
|
gshi
|
2/20/2004 8:25:56 PM |
|
gshi@ekagrasoft.com (George Shi) wrote:
>For an existing PDF file, how do I find out what fonts used for each
>page and font size. Are there any Java API I can use to find out thest
>style information (font, font size, line spacing, page margin ...) of
>a PDF file?
A little background on PDF structures may help you: reading the PDF
Reference is strongly recommended. Here are some tips.
Fonts are indeed stored in a PDF by name, and per page.
Fonts are scaled as they are needed on the page.
Line spacing is not a concept in PDF terms. Each character is on the
page is like a graphic. Some characters are further apart horzontally;
we see these as "spaces" or perhaps "tabs" or "columns". The
separation between characters in the vertical direction is likely to
be perceived as line spacing, but calculating it can be very
difficult, especially if there are superscripts or subscripts.
Pages do not have margins. There are just areas around most pages
where there happens to be no content.
----------------------------------------
Aandi Inston quite@dial.pipex.com http://www.quite.com
Please support usenet! Post replies and follow-ups, don't e-mail them.
|
|
0
|
|
|
|
Reply
|
quite
|
2/20/2004 9:06:24 PM
|
|