  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Writing meta-data while document is open? | Writing meta-data while document is open? 2007-12-03 - By Howard Shank
Back Hi Bruno/Paulo,
I am working with Mark Hall and the RTF code.
In the iText Document class why is it not possible to add meta-data once the document is opened? Is this a technical limitation or a specific design limitation?
The reason I ask is in the RTF specification, it is possible to parse document text before encountering document meta-data. With that in mind for parsing RTF it is necessary to be able to write document content and/or meta-data at any time while parsing an existing document.
Here is a valid RTF encoding of a document: -- ---- ------Start Document-- ---- ---- --- {\rtf1\ansi\ansicpg1252 Text in header\line \deff0{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\froman\fcharset0 Arial;}} {\colortbl\red0\green0\blue0;\red255\green255\blue255;\red255\green0\blue0;} {\stylesheet } {\*\listtable } {\*\listoverridetable } Text before \\info group\line {\info {\author Shank}} \paperw11907\paperh16840\margl720\margr720\margt720\margb720 \pgwsxn11907\pghsxn16840 \marglsxn720\margrsxn720\margtsxn720\margbsxn720Testing a soft linebreak\line here. With \f1 a different font and \cf2 colour.} -- ---- ------End Document-- ---- ---- ---
In line 1 there is "Text in header" with a soft line break. In line 10 there is "Text before \info group" with a soft line break In line 11 there is meta-data "Author = Shank". The text from lines 1 and 10 would be included in the document text and encountered before the meta-data element for the author. The remaining text "Testing a soft linebreak\line here. With a different font and colour." would be included in the doucment text.
Thanks for your time!
Regards, Howard Shank
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ _____ __ ____ ___ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch /category.php?category=shopping <html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head> <body><div style="font-family:times new roman, new york, times, serif;font-size :12pt"><P>Hi Bruno/Paulo,</P> <P> </P> <P>I am working with Mark Hall and the RTF code.</P> <P> </P> <P>In the iText Document class why is it not possible to add meta-data once the document is opened? Is this a technical limitation or a specific design limitation?</P> <P> </P> <P>The reason I ask is in the RTF specification, it is possible to parse document text before encountering document meta-data. With that in mind for parsing RTF it is necessary to be able to write document content and/or meta -data at any time while parsing an existing document.</P> <P> </P> <P>Here is a valid RTF encoding of a document:</P> <P>-- ---- ------Start Document-- ---- ---- ---</P> <P>{\rtf1\ansi\ansicpg1252 Text in header\line<BR>\deff0{\fonttbl{\f0\froman \fcharset0 Times New Roman;}{\f1\froman\fcharset0 Arial;}}<BR>{\colortbl\red0 \green0\blue0;\red255\green255\blue255;\red255\green0\blue0;}<BR>{\stylesheet <BR>}<BR>{\*\listtable<BR>}<BR>{\*\listoverridetable<BR>}<BR>Text before <A href ="file://\\info">\\info</A> group\line<BR>{\info {\author Shank}}<BR> \paperw11907\paperh16840\margl720\margr720\margt720\margb720<BR>\pgwsxn11907 \pghsxn16840<BR>\marglsxn720\margrsxn720\margtsxn720\margbsxn720Testing a soft linebreak\line here. With \f1 a different font and \cf2 colour.}</P> <P>-- ---- ------End Document-- ---- ---- ---</P> <P> </P> <P>In line 1 there is "Text in header" with a soft line break.</P> <P>In line 10 there is "Text before \info group" with a soft line break</P> <P>In line 11 there is meta-data "Author = Shank".</P> <P>The text from lines 1 and 10 would be included in the document text and encountered before the meta-data element for the author.</P> <P>The remaining text "Testing a soft linebreak\line here. With a different font and colour." would be included in the doucment text.</P> <P> </P> <P>Thanks for your time!</P> <P> </P> <P>Regards,</P> <P>Howard Shank</P></div><br> <hr size=1>Looking for last minute shopping deals? <a href="http://us.rd .yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php ?category=shopping"> Find them fast with Yahoo! Search.</a></body></html> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
|
|
 |