Op 2/08/2012 17:04, Robert Bowen schreef:
Is there any way to get all the 'Oval blocks' - the 6 lines, from
'116.28 662.58 m' to 'b*' ? From the Dictionary? Catalog?
I'm not saying it's impossible, but it's close to impossible.
You'd have to write a custom content stream parser to detect specific
sequences (moveTo, curveTo, curveTo,...).
You'd have to keep track of the coordinates to:
1. see if they are really ovals (and not some other curved shape with a
different meaning),
2. find out the right order of the ovals on the page.
That's very difficult. An example of a custom content parser can be
found here:
http://itext.svn.sourceforge.net/viewvc/itext/trunk/xtra/src/main/java/com/itextpdf/text/pdf/ocg/
It looks for Optional Content Groups with a specific name and then
removes all the objects that belong to that group.
You'd have to parse the content more than once:
1. to identify the ovals and their order,
2. to change the fill color of a specific oval.
That's a huge work. If you don't have to many forms, I'd suggest you
take Acrobat and add fields over the ovals, then fill out the fields.
That's much easier (and the better solution).
------------------------------------------------------------------------------
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