Java Mailing List Archive

http://www.junlu.com/

Google
Google
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
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Subject: Re: Help with copying a page without text

Subject: Re: Help with copying a page without text

2007-10-08       - By Leonard Rosenthol

 Back
Not being a vim user, I was unable to validate this.

So that's a quite trick that it is using to decompress page content  
streams for editing...

I stand corrected about it creating invalid PDFs - though I still  
think it sets a bad precedent ;).

Leonard

On Oct 7, 2007, at 8:32 PM, William A. Segraves wrote:

> Leonard, you're advice is usually much better quality.
>
> I regret you did not try the procedure I outlined before you passed  
> judgement on it. If you had tried the procedure, I expect you would  
> have found it works just fine for the example that was used.
>
> Readers interested in the procedure outlined below, despite  
> Leonard's advice, can consult Sid Steward's excellent Pdftk web  
> site, www.accesspdf.com, for the inspiration for the below procedure.
>
> I hasten to add the Leonard is correct about editing a PDF damaging  
> it. That's why the Pdftk plugin for Vim is used, i.e., to repair  
> the damaged PDF. It's not a new idea, as it's been on Sid's site  
> since 11Feb2005, http://www.accesspdf.com/index.php?page=2.
>
> Best regards,
> Bill Segraves
> -- -- Original Message -- --
> From: Leonard Rosenthol
> To: Post all your questions about iText here
> Sent: Sunday, October 07, 2007 6:58 PM
> Subject: Re: [iText-questions] Help with copying a page without text
>
> Note that doing so will create an invalid PDF :(.
>
> Please do NOT try to edit a PDF using text editors...
>
> Leonard
>
>
> On Oct 7, 2007, at 11:36 AM, wasegraves@(protected) wrote:
>
> > Not exactly. It's not possible, except when it's possible.
> >
> > Here's an approach that works for the MyFirstTable example in the
> > iText tutorial.
> >
> >      1. Download and install Vim (This author used Vim 6.3).
> >
> >      2. Download and install Pdftk (This author used Pdftk 1.12),
> > i.e., copy pdftk.exe into the Vim plugin directory.
> >
> >      3. Download and install the Pdftk plugin in the Vim plugins
> > directory, i.e., copy pdftk.vim into the Vim plugin directory.
> >
> >      4. Open MyFirstTable.pdf with Vim.
> >
> >      5. Find the text "cell test2" in the second cell in the fourth
> > row of the table and delete the text.
> >
> >      6. Save the PDF as MyFirstTable_revised.pdf.
> >
> >      7. Open MyFirstTable_revised.pdf with Reader and see that the
> > text "cell test2" is now gone.
> >
> > Note that this procedure uses iText indirectly, as Pdftk is based
> > on iText.
> >
> > Cheers,
> > Bill Segraves
> >
> > -- ---- ------ Original message from Leonard Rosenthol
> > <leonardr@(protected)>: -- ---- ------
> >
> >
> > > No, it's not possible.
> > >
> > > Nor will you find any PDF library that will offer that due to the
> > way
> > > that PDF is structured. See the other current discussion about  
> "how
> > > to read text on a page"...
> > >
> > >
> > > Leonard
> > >
> > > On Oct 6, 2007, at 4:28 PM, Sarath Dorbala wrote:
> > >
> > > > Hello,
> > > >
> > > > I am pretty new to PDF and iText. I have a situation where I  
> need
> > > > to copy a page to another (new) page with no text from the first
> > > > page. For example, if i have a table in page 1, I need to copy
> > that
> > > > to a new page and but not text in that cell. I don't know if  
> this
> > > > is possible in iText.
> > > >
> > > > Thank you.
> > <snip>< /BLOCK QUOTE>
> >  
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> > ---
> > 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/
>
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> ---
> 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/
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> ---
> 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/


<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line
-break: after-white-space; ">Not being a vim user, I was unable to validate this
.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>So that's a quite trick
that it is using to decompress page content streams for editing...</DIV><DIV>
<BR class="khtml-block-placeholder"></DIV><DIV>I stand corrected about it
creating invalid PDFs - though I still think it sets a bad?precedent ;).</DIV>
<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Leonard</DIV><DIV><BR><DIV>
<DIV>On Oct 7, 2007, at 8:32 PM, William A. Segraves wrote:</DIV><BR class=
"Apple-interchange-newline"><BLOCKQUOTE type="cite"> <DIV><FONT face="Arial"
size="2">Leonard, you're advice is usually much better quality.</FONT></DIV>
<DIV><FONT face="Arial" size="2"></FONT>?</DIV> <DIV><FONT face="Arial" size="2"
>I regret you did not try the procedure I outlined before you passed judgement
on it. If you had tried the procedure, I expect you would have found it works
just fine for the example that was used.</FONT></DIV> <DIV><FONT face="Arial"
size="2"></FONT>?</DIV> <DIV><FONT face="Arial" size="2">Readers interested in
the procedure outlined below, despite Leonard's advice, can consult Sid Steward
's excellent Pdftk web site, <A href="http://www.accesspdf.com">www.accesspdf
.com</A>, for the inspiration for the below procedure.</FONT></DIV> <DIV><FONT
face="Arial" size="2"></FONT>?</DIV> <DIV><FONT face="Arial" size="2">I hasten
to add the Leonard is correct about editing a PDF damaging it. That's why the
Pdftk?plugin for Vim?is used, i.e., to repair the damaged PDF. It's not a new
idea, as it's been on Sid's site since 11Feb2005, <A href="http://www.accesspdf
.com/index.php?page=2">http://www.accesspdf.com/index.php?page=2</A>.</FONT><
/DIV> <DIV><FONT face="Arial" size="2"></FONT>?</DIV> <DIV><FONT face="Arial"
size="2">Best regards,</FONT></DIV> <DIV><FONT face="Arial" size="2">Bill
Segraves</FONT></DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px;
MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">  <DIV
style="FONT: 10pt arial">-- -- Original Message -- -- </DIV>  <DIV style=
"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>   <A
title="leonardr@(protected)" href="mailto:leonardr@(protected)">Leonard  
Rosenthol</A> </DIV>  <DIV style="FONT: 10pt arial"><B>To:</B> <A title="itext
-questions@(protected)" href="mailto:itext-questions@(protected)
.net">Post all your questions   about iText here</A> </DIV>  <DIV style="FONT:
10pt arial"><B>Sent:</B> Sunday, October 07, 2007 6:58   PM</DIV>  <DIV style=
"FONT: 10pt arial"><B>Subject:</B> Re: [iText-questions] Help with   copying a
page without text</DIV>  <DIV><BR></DIV>Note that doing so will create an
invalid PDF :(.<BR><BR>Please   do NOT try to edit a PDF using text editors...
<BR><BR>Leonard<BR><BR><BR>On   Oct 7, 2007, at 11:36 AM, <A href="mailto
:wasegraves@(protected)">wasegraves@(protected)</A>   wrote:<BR><BR>&gt; Not
exactly. It's not possible, except when it's   possible.<BR>&gt;<BR>&gt; Here's
an approach that works for the MyFirstTable   example in the? <BR>&gt; iText  
tutorial.<BR>&gt;<BR>&gt;????? 1. Download and   install Vim (This author used
Vim   6.3).<BR>&gt;<BR>&gt;????? 2. Download and install   Pdftk (This author
used Pdftk 1.12),? <BR>&gt; i.e., copy pdftk.exe into   the Vim plugin
directory.<BR>&gt;<BR>&gt;????? 3.   Download and install the Pdftk plugin in
the Vim plugins? <BR>&gt;   directory, i.e., copy pdftk.vim into the Vim plugin
  directory.<BR>&gt;<BR>&gt;????? 4. Open   MyFirstTable.pdf with Vim.<BR>&gt;
<BR>&gt;????? 5.   Find the text "cell test2" in the second cell in the fourth?
<BR>&gt; row   of the table and delete the   text.<BR>&gt;<BR>&gt;????? 6. Save
the PDF as   MyFirstTable_revised.pdf.<BR>&gt;<BR>&gt;????? 7.   Open
MyFirstTable_revised.pdf with Reader and see that the? <BR>&gt; text   "cell
test2" is now gone.<BR>&gt;<BR>&gt; Note that this procedure uses iText  
indirectly, as Pdftk is based? <BR>&gt; on iText.<BR>&gt;<BR>&gt;   Cheers,<BR>
&gt; Bill Segraves<BR>&gt;<BR>&gt; -- ---- ------ Original message   from
Leonard Rosenthol? <BR>&gt; &lt;<A href="mailto:leonardr@(protected)">leonardr
@(protected)</A>&gt;:   -- ---- ------<BR>&gt;<BR>&gt;<BR>&gt; &gt; No, it's
not possible.<BR>&gt;   &gt;<BR>&gt; &gt; Nor will you find any PDF library
that will offer that due   to the? <BR>&gt; way<BR>&gt; &gt; that PDF is
structured. See the other   current discussion about "how<BR>&gt; &gt; to read
text on a page"...<BR>&gt;   &gt;<BR>&gt; &gt;<BR>&gt; &gt; Leonard<BR>&gt; &gt
;<BR>&gt; &gt; On Oct 6,   2007, at 4:28 PM, Sarath Dorbala wrote:<BR>&gt; &gt;
<BR>&gt; &gt; &gt;   Hello,<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; I am pretty new
to PDF and iText. I   have a situation where I need<BR>&gt; &gt; &gt; to copy a
page to another   (new) page with no text from the first<BR>&gt; &gt; &gt; page
. For example, if   i have a table in page 1, I need to copy? <BR>&gt; that<BR>
&gt; &gt; &gt;   to a new page and but not text in that cell. I don't know if
this<BR>&gt; &gt;   &gt; is possible in iText.<BR>&gt; &gt; &gt;<BR>&gt; &gt;
&gt; Thank   you.<BR>&gt; &lt;snip&gt;&lt; /BLOCK QUOTE&gt;<BR>&gt;   -- ---- --
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --   <BR>&gt; ---<BR>
&gt; This SF.net email is sponsored by: Splunk Inc.<BR>&gt;   Still grepping
through log files to find problems?? Stop.<BR>&gt; Now   Search log events and
configuration files using AJAX and a? <BR>&gt;   browser.<BR>&gt; Download your
FREE copy of Splunk now &gt;&gt; <A href="http://get.splunk.com/">http://get
.splunk.com/</A> <BR>&gt;   __ ____ ____ ____ ____ ____ ____ ____ ____ ____<BR>
&gt; iText-questions   mailing list<BR>&gt; <A href="mailto:iText-questions
@(protected)">iText-questions@(protected)</A><BR>&gt;   <A
href="https://lists.sourceforge.net/lists/listinfo/itext-questions">https:/
/lists.sourceforge.net/lists/listinfo/itext-questions</A><BR>&gt;   Buy the
iText book: <A href="http://itext.ugent.be/itext-in-action/">http://itext.ugent
.be/itext-in-action/</A><BR><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 &gt;&gt; <A href="http://get.splunk.com/">http://get
.splunk.com/</A><BR>__ ____ ____ ____ ____ ____ ____ ____ ____ ____<BR>iText
-questions   mailing list<BR><A href="mailto:iText-questions@(protected)
.net">iText-questions@(protected)</A><BR><A href="https://lists
.sourceforge.net/lists/listinfo/itext-questions">https://lists.sourceforge.net
/lists/listinfo/itext-questions</A><BR>Buy   the iText book: <A href="http:/
/itext.ugent.be/itext-in-action/">http://itext.ugent.be/itext-in-action/</A><
/BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
margin-left: 0px; ">-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
-- ---- ------</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin
-bottom: 0px; margin-left: 0px; ">This SF.net email is sponsored by: Splunk Inc.
</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin
-left: 0px; ">Still grepping through log files to find problems?<SPAN class=
"Apple-converted-space">? </SPAN>Stop.</DIV><DIV style="margin-top: 0px; margin
-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Now Search log events and
configuration files using AJAX and a browser.</DIV><DIV style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Download your FREE
copy of Splunk now &gt;&gt; <A href="http://get.splunk.com/__ ____ ____ ____ __
__ ____ ____ ____ ____ ____">http://get.splunk.com/__ ____ ____ ____ ____ ______
__ ____ ____ _____</A></DIV><DIV style="margin-top: 0px; margin-right: 0px;
margin-bottom: 0px; margin-left: 0px; ">iText-questions mailing list</DIV><DIV
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px
; "><A href="mailto:iText-questions@(protected)">iText-questions@(protected)
.sourceforge.net</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin
-bottom: 0px; margin-left: 0px; "><A href="https://lists.sourceforge.net/lists
/listinfo/itext-questions">https://lists.sourceforge.net/lists/listinfo/itext
-questions</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin
-bottom: 0px; margin-left: 0px; ">Buy the iText book: <A href="http://itext
.ugent.be/itext-in-action/">http://itext.ugent.be/itext-in-action/</A></DIV> <
/BLOCKQUOTE></DIV><BR></DIV></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/

©2008 junlu.com - Jax Systems, LLC, U.S.A.