I have a similar problem.
I want to merge some pdfs into one pdf by looping through the source pdfs,
add an annotation for each first page of the source pdf.

I tried it like this:

  public void addComment(String text) throws Exception {
        Rectangle r = new Rectangle(doc.getPageSize());
        PdfAnnotation anno = PdfAnnotation.createText(w, r, null, text, true,
null);
        w.addAnnotation(anno);          
  }

But nothing happens. No exception is thrown, no annotation is added to the
resulting merged pdf.


Paulo Soares-3 wrote:
> 
> Make all the document and then reread it and use PdfStamper to add the
> annotations.
> 
> Paulo
> 
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On
>> Behalf Of BorisTheCat
>> Sent: Friday, September 12, 2008 2:48 PM
>> To: [email protected]
>> Subject: [iText-questions] Can I add annotation to specific page ?
>>
>>
>> I am copying an existing PDF and adding annotations to create
>> a new PDF.  I
>> am looping thru the source PDF using getImportedPage() and
>> adding that to
>> the output PDF using addTemplate().  I have a list of
>> annotations that do
>> indeed contain a page number indicator.  My question is this:
>> Can I copy all
>> the source pages first and then go back and add the
>> annotations ?  This
>> would mean that I would have to be able do some sort of "SelectPage()"
>> operation prior to adding the annotation.  This would be my
>> preferred method
>> but I understand that I could copy a page, then scan my list
>> of annotations
>> looking for any that apply to THIS page.
>>
>> So.. any way to do this in "multi-pass" sort of way like i desire ?
>>
>> Also... am i correct in assuming that coordinates are always
>> in terms of the
>> current page and in terms of the entire document ?
>>
>> Thanks !
> 
> 
> Aviso Legal:
> 
> Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
> informação confidencial ou legalmente protegida. A incorrecta transmissão
> desta mensagem não significa a perca de confidencialidade. Se esta
> mensagem for recebida por engano, por favor envie-a de volta para o
> remetente e apague-a do seu sistema de imediato. É proibido a qualquer
> pessoa que não o destinatário de usar, revelar ou distribuir qualquer
> parte desta mensagem. 
> 
> 
> 
> Disclaimer:
> 
> This message is destined exclusively to the intended receiver. It may
> contain confidential or legally protected information. The incorrect
> transmission of this message does not mean the loss of its
> confidentiality. If this message is received by mistake, please send it
> back to the sender and delete it from your system immediately. It is
> forbidden to any person who is not the intended receiver to use,
> distribute or copy any part of this message.
> 
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> 

-- 
View this message in context: 
http://www.nabble.com/Can-I-add-annotation-to-specific-page---tp19456222p19688959.html
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to