I have a ballot with a bunch of different contests (President, Vice-president, 
etc.) each with its candidates. Next to each candidate is an oval. I'd like to 
use iText to check a given oval for each contest.

The ovals are not within an AcroForm, and they are not checkboxes. I opened my 
pdf with Acrobat and selected a random oval and they seem to be just normal 
objects ... perhaps graphic objects, I'm not sure, I couldn't tell.

I used a combination of PDFReader, PDFStamper and Document to uncompress the 
PDF, to be able to edit it in a normal text editor, and it seems that each oval 
looks something like this:

01 g
>89.04 650.52 41.22 24 re
>f
>1 J 1 j 0.2 w 10 M 
>1 i 
>116.28 662.58 m
>116.28 664.56 112.44 666.12 107.7 666.12 c
>102.96 666.12 99.12 664.56 99.12 662.58 c
>99.12 660.6 102.96 658.98 107.7 658.98 c
>112.44 658.98 116.28 660.6 116.28 662.58 c
>b*


and if I manually add a '0 g' between '1 i' and '116.28 662.58 m', it marks the 
oval. But if I write a program in Java to do this, to add '0 g' for each oval, 
the resulting PDF is corrupt, because ... well, you can't just edit a PDF like 
that, you have to update the stream, the dictionary, etc.

Is there a way to do this with iText?

Cheers.
------------------------------------------------------------------------------
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
iText-questions@lists.sourceforge.net
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

Reply via email to