Post the PDF! Then we can see what you have and be able to answer your question.
-----Original Message----- From: David Hoffer [mailto:[email protected]] Sent: Sunday, September 02, 2012 8:44 AM To: [email protected] Subject: Re: [iText-questions] How to get radio button value? Thanks for the reply that is helpful but I still don't know how to get the value of the check boxes. What should I be looking for? Here is my code that created that bit of raw pdf content: byte[] pageContent = reader.getPageContent(1, new RandomAccessFileOrArray(inputBytes)); String page = new String(pageContent); So I did limit the data to page 1 only. I didn't edit that snippet of PDF syntax...it was copied as a section from the page variable in the code above. I just copied a small section thinking that must be the relevant part because it contained the relevant text. You mentioned that the check boxes might not be in the same section/flow as the text, I didn't know that...what would I look for elsewhere in the page content to find the check box info? Or is the check boxes not even in the page content? What's the way to do this? Thanks, -Dave On Sun, Sep 2, 2012 at 12:46 AM, 1T3XT BVBA <[email protected]> wrote: > On 1/09/2012 20:02, David Hoffer wrote: >> BT >> 1 0 0 1 379.32 467.28 Tm >> -0.014 Tc (Primary) Tj >> 25.44 0 Td 2.04 0 Td -0.047 Tc (Residence) Tj >> 1 0 0 1 455.04 467.28 Tm >> -0.066 Tc 0.026 Tw (Secondary Residence) Tj >> 1 0 0 1 540 467.28 Tm >> -0.051 Tc 0 Tw (Investment) Tj >> /F11 7.485 Tf >> >> However I'm not clear how I can determine if the radio button labeled >> 'Primary Residence' in this example is checked or not. > First of all: the snippet of PDF syntax you're posting here is illegal > syntax. > If you have a BT (begin text) and a Tj (show text), you need a least a > Tf (set font and size) between them. So let's rewrite the snippet: > > BT > /F11 7.485 Tf > 1 0 0 1 379.32 467.28 Tm > -0.014 Tc (Primary) Tj > 25.44 0 Td 2.04 0 Td -0.047 Tc (Residence) Tj > 1 0 0 1 455.04 467.28 Tm > -0.066 Tc 0.026 Tw (Secondary Residence) Tj > 1 0 0 1 540 467.28 Tm > -0.051 Tc 0 Tw (Investment) Tj > > Apart from the operators already mentioned, you have a Tm (set text > matrix), a Tc (set character spacing), Td (move text), and Tw (set > word > spacing) operator. None of these are text showing operators such a Tj. > In other words: the only visible content that is available in this > snippet is "Primary", "Residence", "Secondary Residence", and "Investment". > > There are NO check boxes or radio fields or any other text objects in > this (incomplete!) PDF text object. > > I think you are making one of the following (wrong) assumptions: > 1. you are assuming that the boxes you're looking are part of a text object. > 2. you are assuming that the order in which objects apart in PDF > syntax follow the logical reading order. > > Maybe the boxes are drawn using graphics state operators. > Maybe /F11 refers to a symbol font that draws check boxes (in which > case you've cut away the interesting information in your snippet). > > In any case, the snippet you've sent us is worthless because it's not > a valid text block: there's no font defined for the text that is > shown, and there's no ET operator at the end. > > ---------------------------------------------------------------------- > -------- > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions will include endpoint security, mobile security and the > latest in malware threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > iText(R) is a registered trademark of 1T3XT BVBA. > 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 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. 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 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. 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
