I am planning to do something conceptually simple: Find the <? and ?>
enclosing tags in a user designed pdf and replace it with input from a
database while maintaining kerning and tracking intact. Whatever is inside
<? ?> will be of a single font and single tracking.
Can this be done easily with the parser classes?
I ordered the book. I hope it has some good examples.
Your help is appreciated.
On Sat, Feb 12, 2011 at 4:25 AM, 1T3XT BVBA <[email protected]> wrote:
> Wyatt Biker wrote:
> > So I have a PDF that I read the contents. I didnt make this PDF but I I
> > get in the text the following two escape characters: \222 and \036
>
> Those are indeed octals.
>
> > \222 seems to be the single quote (') and \036 seems to be something
> > with the letter (f)
>
> That's possible, although the actual glyphs depends on the encoding.
>
> > These codes appear in several places however the Acrobat Reader displays
> > it correctly. Here is some partial examples.
>
> OK, so there's no problem.
>
> > I thought these are supposed to be Ascii Octal codes but they don't
> > match ASCII. Is there a different way of decoding them?
>
> In your code snippet, I see: /T1_1 1 Tf
> /T1_1 is a reference to a font dictionary. You can find the object
> number of that font in the /Resources of the /Page dictionary.
> If you look at the font dictionary, you'll find the encoding that is
> needed, for example MacRomanEncoding, MacExpertEncoding,
> WinAnsiEncoding,...
>
> > Here is the code I use to read.
> >
> > PdfReader reader = new PdfReader(filein);
> > byte[] streamBytes = reader.getPageContent(1);
> > StringBuffer buf = new StringBuffer();
> > String contentStream = new String(streamBytes);
>
> Are you going to parse the PDF syntax yourself?
> If so, how come you don't know about font dictionaries?
> Did you try the com.itextpdf.text.pdf.parser classes?
> If so, did they generate the correct output?
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php