I found this thread:
http://www.opensubscriber.com/message/itext-questions@lists.sourceforge.net/4608002.html

and this example:
http://itextpdf.com/examples/iia.php?id=270

but this code throws a "Unbalanced begin/end marked content operators."

public MarkedContentTest() {
                try {
                        System.out.println("starting test");
                        Document doc = new Document(PageSize.LETTER);
                        PdfWriter writer = PdfWriter.getInstance(doc, 
System.out);
                        writer.setTagged();
                        doc.open();
                        PdfContentByte cb = writer.getDirectContent();
                        doc.add(new Paragraph("this is page 1"));
                        doc.newPage();
                        PdfReader reader = new PdfReader(EXISTING_PDF);
                        PdfImportedPage page = writer.getImportedPage(reader, 
1);
                        Image backer = Image.getInstance(page);
                        cb.beginMarkedContentSequence(new PdfName("backer"));
                        cb.addImage(backer);
                        cb.endMarkedContentSequence();
                        doc.newPage();
                        doc.add(new Paragraph("this is page 3"));
                        doc.close();
                        System.out.println("finished");
                } catch (Exception e) {
                        e.printStackTrace();
                }
        }

if I comment out "cb.endMarkedContentSequence();", it runs.  

Any hint on what I'm doing wrong?




-----Original Message-----
From: Kevin Brown [mailto:kevin.br...@xportability.com]
Sent: Wed 9/29/2010 4:28 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] how would you do.....
 
Or depending on the printer, you would use OMR marks to do all of this. 
For those that are not in this space, these are the several little lines
that are normally placed down the side of a page in those bills and other
things in your mailbox.

There are printers that react in the process to specialty marks placed
on the actual page to do things like paper-tray pulls, inserting pages,
determining start and end of collations, etc.

This type of technology has existed for many years and one would normally
start with their print vendor to determine what machinery they have that
is used for this.

Kevin Brown
Xportability LLC

----------------------------------------------------------------------


> Sounds like what you REALLY WANT is JDF
(<http://www.cip4.org/documents/jdf_specifications/index.html>), which
is the international standard used in the printing & publishing industry
for specifying this type of information with a print job.

Make sure your printer supports it - if not, find one that does - and
then just generate it along with your PDF.



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
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/




***This is a transmission from Purdue Employees Federal Credit
Union (PEFCU) and is intended solely for its authorized
recipient(s), and may contain information that is confidential
and or legally privileged.  If you are not an addressee, or the
employee or agent responsible for delivering it to an addressee,
you are hereby notified that any use, dissemination,
distribution, publication or copying of the information 
contained
in this email is strictly prohibited. If you have received this
transmission in error, please notify us by telephoning (765)
497-3328 or returning the email. You are then instructed to
delete the information from your computer.  Thank you for your
cooperation.***

<<winmail.dat>>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
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/

Reply via email to