Thanks a lot Mark. Your fix has worked amazingly well. Many thanks and regards
  Murthy

Mark Storer <[EMAIL PROTECTED]> wrote:
      And that works in Reader 7?  Huh.
   
  Looking at the "Manipulating existing PDF documents" example, 
"AddWatermarkPageNumbers" in the tutorial section, I see that you've neglected 
calls to under.beginText() and under.endText()... which is pretty basic and I'm 
a bit embarassed I didn't catch it earlier.
   
  So your code should look something like:
   
  under = stamp.getUnderContent(1);
  under.beginText();  // new *******
  under.setFontAndSize(bf, 9);
  under.showTextAligned(PdfContentByte.ALIGN_LEFT, "TEST", 320.0f,730.0f, 0);
  under.endText();  // new *******
stamp.close();

  Your form may still be Reader Enabled, meaning you'll have to strip out the 
ability to save the form from reader and such things that may be present in a 
federal form... again, reffer to the previously mentioned thread:
   
  "Acrobat 8 & Some PDFs", starting February 17th by Edwin S. Ramirez.  Here's 
the archive link:
  http://news.gmane.org/gmane.comp.java.lib.itext.general
   
   
  --Mark Storer 
  Senior Software Engineer 
  Cardiff.com
  #include <disclaimer> 
typedef std::Disclaimer<Cardiff> DisCard; 
    -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of murthy gandikota
Sent: Tuesday, February 20, 2007 4:00 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Acrobat Reader 7 vs. Acrobar Reader 8


   I don't know what "reader enabled" means. To guess, the form can be opened 
in Acrobat reader. In fact it is a (US) Federal application which is 
distributed all over the WWW. 
   
  Basically, I am stuck with that form and FDF is not an option. 
   
  The error I get in Acrobat 8 is:
  "An Error Exists on this Page; Acrobat may not display the page 
correctly"

  When I open the what I think is the filled form, all I see is the original 
form without the text stamped on it.

Mark Storer <[EMAIL PROTECTED]> wrote:
      This sounds an awful lot like something that just came up.  Is the form 
in question "Reader Enabled"?
   
  iText breaks 'enabled' forms, any change will, unless you know exactly how to 
update the docment-level rights.  iText does not, Acrobat 8 does.
   
  Option 1: Remove the rights from the source form.
  Option 2: Remove them programatically within iText.  Check the list archives 
over the last week, the details are there.
   
  If you're stuck with that particular form, and need to set values, you might 
be able to use an FDF instead of creating an entire PDF.  FDF files contain 
field/value pairs and a URL to the source form.  You can stuff other things in 
them as well, but that's what they're used for most often.
   
  If your source form is not reader-enabled, then we'll need more information.  
Can you tell us the exact text of the error message from reader 8?  A URL to a 
copy of your modified form would also be helpful.
   
  --Mark Storer 
  Senior Software Engineer 
  Cardiff.com
  #include <disclaimer> 
typedef std::Disclaimer<Cardiff> DisCard; 
    -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of murthy gandikota
Sent: Tuesday, February 20, 2007 3:32 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Acrobat Reader 7 vs. Acrobar Reader 8


  I start with a PDF form. Here is how the code looks:
             String pdfApp="form.pdf";
              String pdfFile="filledform.pdf";
             PdfReader reader = new PdfReader(pdfApp);
              int n = reader.getNumberOfPages();
            PdfStamper stamp = new PdfStamper(reader, new 
FileOutputStream(pdfFile));
            PdfContentByte under;
            BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, 
BaseFont.WINANSI, BaseFont.EMBEDDED);
            under = stamp.getUnderContent(1);
             under.setFontAndSize(bf, 9);
               under.showTextAligned(PdfContentByte.ALIGN_LEFT, "TEST", 
320.0f,730.0f, 0);
             stamp.close();
Mark Storer <[EMAIL PROTECTED]> wrote:
      I'm afraid we need a LOT more information if we're going to help you.  
What did you start with, what are you trying to build, how?
   
  We have no crystal balls here.  Help us help you.
   
  --Mark Storer 
  Senior Software Engineer 
  Cardiff.com
  #include <disclaimer> 
typedef std::Disclaimer<Cardiff> DisCard; 
    -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of murthy gandikota
Sent: Tuesday, February 20, 2007 3:19 PM
To: iText-questions@lists.sourceforge.net
Subject: [iText-questions] Acrobat Reader 7 vs. Acrobar Reader 8


  The PDF's generated open fine in Acrobat Reader Version 7 but not in Acrobat 
Reader Version 8. Does anyone have this problem?
   
  Murthy
    
---------------------------------
  Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

    
---------------------------------
  Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

    
---------------------------------
  It's here! Your new message!
Get new email alerts with the free Yahoo! 
Toolbar.-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


 
---------------------------------
Don't get soaked.  Take a quick peak at the forecast 
 with theYahoo! Search weather shortcut.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to