  | 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
|
|
|
  | | | Replacing PDF stream content | Replacing PDF stream content 2007-11-08 - By Ismael F
Back
Thanks a lot, PRStream obj_PRstream = (PRStream)obj_element_dic; obj_PRstream.setData(obj_bytes_value); It works fine! I tried the inverse way to read a PDF stream content and I found that with PdfReader.getStreamBytesRaw(obj_PRStream_element); Filter is NOT applied, and with PdfReader.getStreamBytes(obj_PRStream_element); Filter is applied That's great! Thanks again! > Date: Wed, 7 Nov 2007 12:15:24 +0100> From: bruno@(protected)> To: itext -questions@(protected)> Subject: Re: [iText-questions] Replacing PDF stream content> > Ismael F wrote:> > It's possible to make a direct replacement of stream bytes without > > changing references?> > Yes, you get the PRStream object from the PdfReader,> and the use the setData method to change the stream .> As PdfStream extends PdfDictionary, you can also add> keys to the stream dictionary (or change them).> > This is all done in PdfReader. If you use this reader> object in PdfStamper or PdfCopy, you'll see that the> object is changed .> br,> Bruno> > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- -- ---- --> This SF.net email is sponsored by: Splunk Inc.> Still grepping through log files to find problems? Stop.> Now Search log events and configuration files using AJAX and a browser.> Download your FREE copy of Splunk now >> http://get.splunk.com/> __ ____ ____ ____ ____ ____ ____ ____ ___ __ ___> 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/ __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ <html> <head> <style> .hmmessage P { margin:0px; padding:0px } body.hmmessage { FONT-SIZE: 10pt; FONT-FAMILY:Tahoma } </style> </head> <body class='hmmessage'> Thanks a lot,<BR> <BR><FONT size=2> <P align=left> PRStream obj_PRstream = (PRStream)obj_element_dic;< /P> obj_PRstream.setData(obj_bytes_value);<BR></FONT> <BR> It works fine!<BR> <BR> I tried the inverse way to read a PDF stream content and I found that with<BR> <P align=left><FONT size=2> PdfReader.<I>getStreamBytesRaw</I >(obj_PRStream_element);</FONT></P> <P align=left><FONT size=2>Filter is NOT applied, and with </P></FONT> <FONT size=2> PdfReader.<I>getStreamBytes</I>(obj_PRStream _element);</FONT><BR> <P align=left>Filter is applied</P> <P align=left> </P> <P align=left>That's great!</P> <P align=left> </P> <P align=left>Thanks again!</P> <P align=left><BR>> Date: Wed, 7 Nov 2007 12:15:24 +0100<BR>> From: bruno @(protected)<BR>> To: itext-questions@(protected)<BR>> Subject: Re: [iText-questions] Replacing PDF stream content<BR>> <BR>> Ismael F wrote:<BR>> > It's possible to make a direct replacement of stream bytes without <BR>> > changing references?<BR>> <BR>> Yes, you get the PRStream object from the PdfReader,<BR>> and the use the setData method to change the stream.<BR>> As PdfStream extends PdfDictionary, you can also add <BR>> keys to the stream dictionary (or change them).<BR>> <BR>> This is all done in PdfReader. If you use this reader<BR>> object in PdfStamper or PdfCopy, you'll see that the<BR>> object is changed.<BR>> br,<BR>> Bruno<BR>> <BR>> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- -- ---- ---- ----<BR>> This SF.net email is sponsored by: Splunk Inc.<BR>> Still grepping through log files to find problems? Stop.<BR>> Now Search log events and configuration files using AJAX and a browser.<BR>> Download your FREE copy of Splunk now >> http://get.splunk.com/<BR>> __ ____ ____ __ __ ____ ____ ____ ____ ____ ____<BR>> iText-questions mailing list<BR>> iText-questions@(protected)<BR>> https://lists.sourceforge.net /lists/listinfo/itext-questions<BR>> Buy the iText book: http://itext.ugent .be/itext-in-action/<BR></P><br /><hr />Express yourself instantly with MSN Messenger! <a href='http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/' target='_new'>MSN Messenger</a></body> </html> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ __ ____ ____ ____ ____ ____ ____ ____ ____ ____ 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/
|
|
 |