Sample code? How about half the source in com.lowagie.text.pdf.*? >rummage rummage<
Huh?! We don't have any samples under http://itextdocs.lowagie.com/tutorial/ that use the low-level PDF object classes? Wow. In this particular case, if all you want is the MCID value, that's pretty easy: PdfDictionary markedDict = myContentParser.readDictionary(); ... Wait. Looking at the source for PdfContentParser, I'm not sure you should call readDictionary directly. I'm not even sure ANYONE should call readDictionary directly. It looks like you should call parse() over and over until the command (the last entry in the ArrayList) is a PdfLiteral of type PdfContentParser.COMMAND_TYPE, such that "BDC".equals(command.toString()) Once you find a BDC command (the ArrayList will be 3 entries long), you should look at the middle entry, which will be a PdfDictionary: PdfDictionary mcDic = (PdfDictionary)commandArray.get( 1 ); int mcIndex /*not Identity, INDEX*/ = mcDic.getAsNumber( PdfName.MCID ).intValue(); --Mark Storer Senior Software Engineer Cardiff.com #include <disclaimer> typedef std::Disclaimer<Cardiff> DisCard; > -----Original Message----- > From: newoutlook [mailto:[email protected]] > Sent: Wednesday, September 30, 2009 3:19 PM > To: [email protected] > Subject: [iText-questions] Looking for sample code to use > readDictionary > of PDfcontentParser > > > > Anybody out there has any sample code to use readDictionary of > PDFcontentParser. I am trying to read "<< MCID 0 >>" > dictionary entry from > content stream. please help. > > > -- > View this message in context: > http://www.nabble.com/Looking-for-sample-code-to-use-readDicti > onary-of-PDfcontentParser-tp25690052p25690052.html > Sent from the iText - General mailing list archive at Nabble.com. > > > -------------------------------------------------------------- > ---------------- > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. > Jumpstart your > developing skills, take BlackBerry mobile applications to > market and stay > ahead of the curve. Join us from November 9-12, 2009. > Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
