I am also having some trouble with watermarks and signatures.  Currently
I get the signed document from the Content Store then watermark it,
encrypt it and then create a new version and add it back to the content
store. E only problem is I do not want to encrypt a document was never
encrypted to begin with.  HOW DO I TELL IF A DOCUMENT IS ALREADY
PASSWORD PROTECTED?

Winston Spencer.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, July 07, 2006 5:43 AM
To: itext-questions@lists.sourceforge.net
Subject: iText-questions Digest, Vol 2, Issue 19

Send iText-questions mailing list submissions to
        itext-questions@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/itext-questions
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of iText-questions digest..."


Today's Topics:

   1. Re: Image and absolutePosition (bruno)
   2. How to include tab characters in a PDF? (Juan Carrasco)
   3. Re: How to include tab characters in a PDF? (bruno)
   4. Re: iText (bruno)
   5. Re: How to include tab characters in a PDF? (Raphael Watier)
   6. Watermark and Signatures (mohan alagurajan)
   7. Re: Watermark and Signatures (Paulo Soares)


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

Message: 1
Date: Fri, 07 Jul 2006 09:13:20 +0200
From: bruno <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] Image and absolutePosition
To: Post all your questions about iText here
        <itext-questions@lists.sourceforge.net>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii; format=flowed

Raphael Watier wrote:

> Hi Everybody,
>
> I just have to generate a simple PDF document with texts and images.

OK,
if it's a simple PDF document, you can work with Chunk, Paragraph,
Image,...
Create these objects and use Document.add.
http://itextdocs.lowagie.com/tutorial/objects/index.html

> Could you explain me how works absolutePosition (units, and sens) ?

If you use document.add, you normally don't have to worry about
absolute positions...

> Could you give me the position of top left and bottom right for a A4 
> page ?

PageSize.A4 is a Rectangle object, you can ask it for its height and
width.
The origin of the coordinate system is at the bottom left of the page.
http://itextdocs.lowagie.com/tutorial/directcontent/coordinates/

> Are these Units the same for chunk.setSpacingBefore and
setSpacingAfter ?

Yes.
1 inch is 72 units by default.
(Since PDF1.6 you can change this default, but for simple PDFs that
won't be necessary.)
br,
Bruno



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

Message: 2
Date: Fri, 7 Jul 2006 09:21:31 +0200
From: "Juan Carrasco" <[EMAIL PROTECTED]>
Subject: [iText-questions] How to include tab characters in a PDF?
To: <itext-questions@lists.sourceforge.net>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

Hi to all. I want to write some tab characters in a PDf, but I can't
find
the method to do that at documentation system. 

Can everyone tell me how I can put tab characters in the PDF?

 

Thanks.

 

 

Juan Carrasco Moya
[EMAIL PROTECTED]
961718257
IDEAL. Grupo PALLUC

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://sourceforge.net/mailarchive/forum.php?forum=itext-questions/attac
hments/20060707/ce26fbf3/attachment.html 

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

Message: 3
Date: Fri, 07 Jul 2006 09:22:23 +0200
From: bruno <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] How to include tab characters in a PDF?
To: Post all your questions about iText here
        <itext-questions@lists.sourceforge.net>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=windows-1252; format=flowed

Juan Carrasco wrote:

> Hi to all. I want to write some tab characters in a PDf, but I can?t 
> find the method to do that at documentation system.
>
> Can everyone tell me how I can put tab characters in the PDF?
>
PDF doesn't have the concept of tabs (nor has iText).
Try using a PdfPtable instead.
br,
Bruno



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

Message: 4
Date: Fri, 07 Jul 2006 09:25:11 +0200
From: bruno <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] iText
To: Post all your questions about iText here
        <itext-questions@lists.sourceforge.net>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

rakib islam wrote:

> Hi
>     I am RAKIB trying to use iText Library.To install iText library i 
> follow the rules written by "*Christoph Bartnick*".But when i create 
> the "*CLASSPATH*" variable with the value of iText Jar File's 
> destination path I can compile every java program but fail to run any 
> java program.When i run any program an exception is thrown each time 
> that is *"java.lang.NoClassDefFoundError".*
> ** 
> *   * But if i delete the *"CLASSPATH" *varible i can able to compile 
> and run all the* *Java program  which are not related to itext
library.
>  
>     i am using J2SE 5.0, TextPad 4.5, windows 2000 professional.

Try to find out more about the concept 'CLASSPATH'.
I guess you are not including the current directory '.' (= dot)
into your classpath. Anyway, this question is off-topic as
it has nothing to do with iText; only with compiling and
running a java program that uses a jar.
br,
Bruno



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

Message: 5
Date: Fri, 07 Jul 2006 09:45:03 +0200
From: Raphael Watier <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] How to include tab characters in a PDF?
To: Post all your questions about iText here
        <itext-questions@lists.sourceforge.net>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="windows-1252"

Just a suggestion ...
I used the character '\n' in some Chunks ... Maybe the '\t' works well 
... ???

br
Raphael
France

bruno a ?crit :

>Juan Carrasco wrote:
>
>  
>
>>Hi to all. I want to write some tab characters in a PDf, but I can?t 
>>find the method to do that at documentation system.
>>
>>Can everyone tell me how I can put tab characters in the PDF?
>>
>>    
>>
>PDF doesn't have the concept of tabs (nor has iText).
>Try using a PdfPtable instead.
>br,
>Bruno
>
>Using Tomcat but need to do more? Need to support web services,
security?
>Get stuff done quickly with pre-integrated technology to make your job
easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=12164
2
>_______________________________________________
>iText-questions mailing list
>iText-questions@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/itext-questions
>
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://sourceforge.net/mailarchive/forum.php?forum=itext-questions/attac
hments/20060707/ae2ac016/attachment.html 

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

Message: 6
Date: Fri, 7 Jul 2006 02:39:20 -0700 (PDT)
From: mohan alagurajan <[EMAIL PROTECTED]>
Subject: [iText-questions] Watermark and Signatures
To: itext-questions@lists.sourceforge.net
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii


Hi All,

I am new to iText. I have a requirement where I have to apply watermark
to
an existing PDF, the PDF has digital signatures. 

I am using PdfStamper to apply the watermark, the code snippet is as
follows:

PdfReader reader = new PdfReader("C:/form.pdf");
int n = reader.getNumberOfPages();
FileOutputStream stampOutput = new FileOutputStream("C:/stamp.pdf");
PdfStamper stamper = new PdfStamper(reader, stampOutput);
PdfContentByte under;
PdfContentByte over;
BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI,
BaseFont.EMBEDDED);

int i = 0;
while (i < n) {
    over = stamper.getOverContent(i);
    over.beginText();
    over.setFontAndSize(bf, 8);
    over.setTextMatrix(30, 30);
    over.showText("Watermark Text");
    over.setFontAndSize(bf, 8);
    over.endText();
}
stamper.close();

The watermark works fine, but I face issue with the signatures, the
digital
signature becomes invalid. When I try to view the signature in the
output
PDF I get the following error:

Error during signature verification.  

Unexpected byte range values defining scope of signed data.
Details: byte range of signature is invalid

I also noticed that the ouput file(87 KB) is smaller in size than the
input
file(103 KB).

Can anyone point out why the signature becomes invalid, what is wrong
with
the code and what is the right approach?

And also why the size of the output file decreases?

You help is very much appreciated!

Thanks in advance!

Regards,
Mohan Alagurajan
-- 
View this message in context:
http://www.nabble.com/Watermark-and-Signatures-tf1905401.html#a5214379
Sent from the iText - General forum at Nabble.com.




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

Message: 7
Date: Fri, 7 Jul 2006 10:42:37 +0100
From: "Paulo Soares" <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] Watermark and Signatures
To: "Post all your questions about iText here"
        <itext-questions@lists.sourceforge.net>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
        reply-type=original

The signature is there to show that the document was not changed. If you

change the document the signature becomes invalid. It's not rocket
science.

Paulo

----- Original Message ----- 
From: "mohan alagurajan" <[EMAIL PROTECTED]>
To: <itext-questions@lists.sourceforge.net>
Sent: Friday, July 07, 2006 10:39 AM
Subject: [iText-questions] Watermark and Signatures


>
> Hi All,
>
> I am new to iText. I have a requirement where I have to apply
watermark to
> an existing PDF, the PDF has digital signatures.
>
> I am using PdfStamper to apply the watermark, the code snippet is as
> follows:
>
> PdfReader reader = new PdfReader("C:/form.pdf");
> int n = reader.getNumberOfPages();
> FileOutputStream stampOutput = new FileOutputStream("C:/stamp.pdf");
> PdfStamper stamper = new PdfStamper(reader, stampOutput);
> PdfContentByte under;
> PdfContentByte over;
> BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA,
BaseFont.WINANSI,
> BaseFont.EMBEDDED);
>
> int i = 0;
> while (i < n) {
>    over = stamper.getOverContent(i);
>    over.beginText();
>    over.setFontAndSize(bf, 8);
>    over.setTextMatrix(30, 30);
>    over.showText("Watermark Text");
>    over.setFontAndSize(bf, 8);
>    over.endText();
> }
> stamper.close();
>
> The watermark works fine, but I face issue with the signatures, the 
> digital
> signature becomes invalid. When I try to view the signature in the
output
> PDF I get the following error:
>
> Error during signature verification.
>
> Unexpected byte range values defining scope of signed data.
> Details: byte range of signature is invalid
>
> I also noticed that the ouput file(87 KB) is smaller in size than the 
> input
> file(103 KB).
>
> Can anyone point out why the signature becomes invalid, what is wrong
with
> the code and what is the right approach?
>
> And also why the size of the output file decreases?
>
> You help is very much appreciated!
>
> Thanks in advance!
>
> Regards,
> Mohan Alagurajan
> -- 
> View this message in context: 
> http://www.nabble.com/Watermark-and-Signatures-tf1905401.html#a5214379
> Sent from the iText - General forum at Nabble.com.
>
>
> Using Tomcat but need to do more? Need to support web services,
security?
> Get stuff done quickly with pre-integrated technology to make your job

> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions 




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

Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

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

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


End of iText-questions Digest, Vol 2, Issue 19
**********************************************

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to