[iText-questions] Tomcat and PDF

2007-10-22 Thread Sieglen

We have a form-server system providing a lot of pdf-forms to the German
administrations. This system is running on Linux with Tomcat as application
server. Now this system shall be exported to Hungary.

There are a lot of character-encoding problems, the most of which are
solvable. But there remains one problem we do not understand: If one is
changing the language settings of Linux for example from [EMAIL PROTECTED] to
[EMAIL PROTECTED], the resultinig pdf-output also changes. Our hypotheses is, 
that
this is a problem of Tomcat, who is replacing characters in accordance with
the language settings of Linux. The question now is: How can we prevent
Tomcat from replacing characters (all encoding operations should be done by
the Java-code inside Tomcat, not by Tomcat itself)?
-- 
View this message in context: 
http://www.nabble.com/Tomcat-and-PDF-tf4669021.html#a13337688
Sent from the iText - General mailing list archive at Nabble.com.


-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Certificate failed: Cannot be verified against the KeyStore or the certificate chain

2007-10-22 Thread Harakiri
I suggest you doing a bit of research how to validate
X.509 signatures, you need the whole certificate chain
in java (bc) to validate the (math) signature and the
certificate itsel.


--- Fionn Ziegler [EMAIL PROTECTED] wrote:

 
 Hi all,
 i just managed correct signing for PDF-Document with
 an extern smardcard.
 Now i want to verify it, but i get the following
 message:
 Certificate failed: Cannot be verified against the
 KeyStore or the
 certificate chain
 This is a Debug from the 

http://itextpdf.sourceforge.net/howtosign.html#howtoverify
 howtosign 
 examples(howtoverify).
 Here is the code for signing:
 
 // get certificate
 X509Certificate tSigningCertificate =
 Gov2SmartCardHelper.getInstance()
 .getSignatureX509Certificate();
 
 PdfStamper tStamper =
 PdfStamper.createSignature(tReader, tOutStream,
 '\0');
 PdfSignatureAppearance tSignatureAppearance =
 tStamper.getSignatureAppearance();
 
 // set certificate from smardcard to the signed
 document
 tSignatureAppearance.setCrypto(null,
new Certificate[]
 { tSigningCertificate},
null,
   
 PdfSignatureAppearance.WINCER_SIGNED);
 
 // Show signature in PDF-File
 tSignatureAppearance.setVisibleSignature(new
 Rectangle(100, 100, 400,
 130), tReader
 .getNumberOfPages(), null);
 tSignatureAppearance.setExternalDigest(new
 byte[512], new byte[20],
 RSA);
 Calendar cal = Calendar.getInstance();
 tSignatureAppearance.setSignDate(cal);
 System.out.println(set SignDate:
 +cal.getTime().toLocaleString());
 
 tSignatureAppearance.preClose();
 
 // Get the bytes from the pdf-document that must
 be signed.
 InputStream tInputStream =
 tSignatureAppearance.getRangeStream();
 byte tMessagesDigest[] =
 getMessageDigest(tInputStream);
 
 // get signature dictionary from PDF-Document to
 add an external
 sugnature
 PdfSigGenericPKCS tDocumentSignatureDic =
 tSignatureAppearance.getSigStandard();
 tDocumentSignatureDic.setDate(new
 PdfDate(Calendar.getInstance()));
 // get content-literal to get the size
 PdfLiteral tPDFLiteral = (PdfLiteral)
 tDocumentSignatureDic.get(PdfName.CONTENTS);
 byte[] tOutBytes = new
 byte[(tPDFLiteral.getPosLength() - 2) / 2];
 
 // Gets actual signing class instance to set
 extern bytes
 PdfPKCS7 tSigner =
 tDocumentSignatureDic.getSigner();
 
 // get signature from smard-card
 byte[] tSignedBytes =

Gov2SmartCardHelper.getInstance().sign(tMessagesDigest);
 
 // set our digest to the signature
 tSigner.setExternalDigest(tSignedBytes,
 tMessagesDigest, RSA);
 byte[] tFinishedSignature =
 tSigner.getEncodedPKCS7();
 // copy
 System.arraycopy(tFinishedSignature, 0,
 tOutBytes, 0,
 tFinishedSignature.length);
 
 PdfDictionary tPDFDic = new PdfDictionary();
 tPDFDic.put(PdfName.CONTENTS, new
 PdfString(tOutBytes).setHexWriting(true));
 tSignatureAppearance.close(tPDFDic);
 
 here the verify-code:
 
 KeyStore kall = PdfPKCS7.loadCacertsKeyStore();
   PdfReader reader = new PdfReader(aFile);
   AcroFields af = reader.getAcroFields();
   ArrayList names = af.getSignatureNames();
   for (int k = 0; k  names.size(); ++k) {
  String name = (String)names.get(k);
  System.out.println(Signature name:  + name);
  System.out.println(Signature covers whole
 document:  +
 af.signatureCoversWholeDocument(name));
  System.out.println(Document revision:  +
 af.getRevision(name) +  of
  + af.getTotalRevisions());
  // Start revision extraction
  FileOutputStream out = new
 FileOutputStream(revision_ +
 af.getRevision(name) + .pdf);
  byte bb[] = new byte[8192];
  InputStream ip = af.extractRevision(name);
  int n = 0;
  while ((n = ip.read(bb))  0)
 out.write(bb, 0, n);
  out.close();
  ip.close();
  // End revision extraction
  PdfPKCS7 pk = af.verifySignature(name);
  Calendar cal = pk.getSignDate();
  System.out.println(SignDate:
 +cal.getTime().toLocaleString());
  Certificate pkc[] = pk.getCertificates();
  System.out.println(Subject:  +

PdfPKCS7.getSubjectFields(pk.getSigningCertificate()));
  System.out.println(Document modified:  +
 !pk.verify());
  Object fails[] =
 PdfPKCS7.verifyCertificates(pkc, kall, null, cal);
  if (fails == null)
  System.out.println(Certificates verified
 against the KeyStore);
  else
  System.out.println(Certificate failed:  +
 fails[1]);
   }
 
 Output:
 set SignDate: 18.10.2007 15:11:46 correct time!!
 sign data: null - SHA1withRSA
 verify:
 Signature name: Signature1
 Signature covers whole document: true
 Document revision: 1 of 1
 SignDate: 18.10.2007 16:11:46 one hour later, why??
 Subject: {CN=[NKS 05 A 01489], C=[DE]}
 Document modified: false
 Certificate failed: Cannot be verified against the
 KeyStore or the
 certificate chain
 

Re: [iText-questions] Tomcat and PDF

2007-10-22 Thread Paulo Soares
I think that's a question that you should ask in a Tomcat mailing list.
iText only works with Java strings, it's always Unicode, whatever
happened was before getting to the PDF generation section.

Paulo 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Sieglen
 Sent: Monday, October 22, 2007 8:07 AM
 To: itext-questions@lists.sourceforge.net
 Subject: [iText-questions] Tomcat and PDF
 
 
 We have a form-server system providing a lot of pdf-forms to 
 the German
 administrations. This system is running on Linux with Tomcat 
 as application
 server. Now this system shall be exported to Hungary.
 
 There are a lot of character-encoding problems, the most of which are
 solvable. But there remains one problem we do not understand: 
 If one is
 changing the language settings of Linux for example from [EMAIL PROTECTED] to
 [EMAIL PROTECTED], the resultinig pdf-output also changes. Our 
 hypotheses is, that
 this is a problem of Tomcat, who is replacing characters in 
 accordance with
 the language settings of Linux. The question now is: How can 
 we prevent
 Tomcat from replacing characters (all encoding operations 
 should be done by
 the Java-code inside Tomcat, not by Tomcat itself)?


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: 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Need Help ASAP

2007-10-22 Thread Paulo Soares
iText can't extract text. Look for jpedal and pdfbox.

Paulo 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Sameet Lal
 Sent: Monday, October 22, 2007 1:28 AM
 To: itext-questions@lists.sourceforge.net
 Subject: Re: [iText-questions] Need Help ASAP
 
 Bruno Lowagie (iText bruno at lowagie.com writes:
 
  
  Sameet Lal wrote:
   Hi,

   I am using iText. I am creating a PDF file using 
 PdfWriter. It works fine.
   Now I need to read the contents of above created file, 
 for this I am 
   using PdfReader, but it gives me lot of extra characters.
   I also bought your iText in Action online book and am not 
 able to find 
   any help as it gives only incomplete code.

   Can you please post me the code that I can use to read 
 contents of the 
   above pdf file without the extra characters?
  
  Have you read the last sentence of 3.2.1 on p80?
  In short, creating traditional PDF is a one-way process.
  The long explanation can be found in section 18.2:
  Extracting and editing text
  
  Based on the very limited information you are giving,
  I have the impression you are retrieving the content stream
  of a page containing the PDF operators and operands that
  describe how the content has to be rendered.
  
  Of course, you're not telling us what extra characters
  you are getting, so I'm not sure if the fact that you
  mistake PDF for a Word processing format is really
  your problem.
  
  br,
  Bruno
  
  
 --
 ---
  This SF.net email is sponsored by: Microsoft
  Defy all challenges. Microsoft(R) Visual Studio 2005.
  http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
  ___
  iText-questions mailing list
  iText-questions at lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/itext-questions
  Buy the iText book: http://itext.ugent.be/itext-in-action/
  
  
 
 ok, here' are the extra characters:
 
 q BT 36 806 Td 0 -18 Td /F1 12 Tf (template test)Tj ET Q
 
 I extract them using the following code segment:
 
 PdfReader pdfr = new PdfReader(fullFileName);   
 int fileLen = pdfr.getFileLength();   
 HashMap hm = new HashMap();   
 hm = pdfr.getInfo();   
 int pages = pdfr.getNumberOfPages();   
 byte b [] = pdfr.getPageContent(1);
 String str = new String(b);   
 return str;
 
 All I want is to read contents of PDF file i created using 
 iText without junk 
 characters and display them in web page. Please help.


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: 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] one font containing all styles emulate bold, italic or bolditalic

2007-10-22 Thread Peter van Raamsdonk
Hi,
 
I'm using the Microsoft Sans Serif true type font in my code and I want to 
emulate bold or italic. I use Graphics2D to paint my text and I don't use chunk.
 
I found this message in the forum what exactly describes the problem but the 
solution is unclear to me.
 
http://threebit.net/mail-archive/itext-questions/msg04147.html
 
I create the awt font from file and use the name to register it to pdf.
 
For the pdf font mapping pseudo code;
 
String formName = somelocation/fonts/MICROSS.TTF;
 
 
PdfTemplate template = contentByte.createTemplate(rect.width(), rect.height());
DefaultFontMapper mapper = new DefaultFontMapper();
 
 
FontFactory.register(fontName);
 

BaseFont pdfFont = BaseFont.createFont(fontName, BaseFont.IDENTITY_H, 
BaseFont.EMBEDDED);
Object allNames[] = {pdfFont.getPostscriptFontName(), 
pdfFont.getFamilyFontName(), pdfFont.getFullFontName()};
mapper.insertNames(allNames, fontName);
 
 
Graphics2D g2d = template.createGraphics(rect.width(), rect.height(), mapper);
 
 
When I watch the Set of FontFactory.getRegisteredFamilies() I see the styles 
missing compared to Arial.
 
arial=[Arial, Arial Bold, Arial Italic, Arial Bold Italic]
 
microsoft sans serif=[Microsoft Sans Serif]
 
How can I set these styles using FontFactory to emulate bold or italic?
 
Hopefully this is possible,
 
:Peter
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] tables and tagged PDF

2007-10-22 Thread Johannes Hahn
Hi all!

I'm trying to extend my existing iText code in order to get a legal 
tagged PDF. I had no problems creating a simple (tagged) text document 
by adding marked content and writing text to the direct content as 
described in the appendix F in the iText in action manual.
But my document contains some complex table structure which I cannot 
easily create using the low level contructs of iText. The high level 
api, which I use to construct my tables, however, does not allow me to 
add tags. So my question is if there's any possibility to combine the 
construction of marked content sequences with the high level contructs 
in order to add pdf tags to the content in (nested) table cells? Would 
it for example be possible to implement an PdfCellEvent that accesses 
the text canvas of the cell and uses it to add the pdf structure 
elements to the direct content?
If not, is there any other possibility to create tagged content in 
tables without having to draw the table all by myself?

Thanks for help!

Regards,
Johannes

-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] extracting page that contains AcroFields

2007-10-22 Thread Charles Ohana
Hello,
I'm extracting a page from a PDF form that has AcroFields (data entry fields).
The problem is that the fields do not get extracted. Is there a workaround for 
that.
The same problem happens when appending a page to the document.
Any hint would be appreciated. If you have snippet even better.

Thanx
-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] extracting page that contains AcroFields

2007-10-22 Thread Paulo Soares
You need PdfCopyFields.

Paulo 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Charles Ohana
 Sent: Monday, October 22, 2007 3:41 PM
 To: itext-questions@lists.sourceforge.net
 Subject: [iText-questions] extracting page that contains AcroFields
 
 Hello,
 I'm extracting a page from a PDF form that has AcroFields 
 (data entry fields).
 The problem is that the fields do not get extracted. Is there 
 a workaround for that.
 The same problem happens when appending a page to the document.
 Any hint would be appreciated. If you have snippet even better.
  
 Thanx
 
 


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: 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] one font containing all styles emulate bold, italic or bolditalic

2007-10-22 Thread Paulo Soares
I think that the latest iText version already does the style emulation
in Graphics2D.

Paulo 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Peter van Raamsdonk
 Sent: Monday, October 22, 2007 3:08 PM
 To: itext-questions@lists.sourceforge.net
 Subject: [iText-questions] one font containing all styles 
 emulate bold,italic or bolditalic
 
 Hi,
  
 I'm using the Microsoft Sans Serif true type font in my 
 code and I want to emulate bold or italic. I use Graphics2D 
 to paint my text and I don't use chunk.
  
 I found this message in the forum what exactly describes the 
 problem but the solution is unclear to me.
  
 http://threebit.net/mail-archive/itext-questions/msg04147.html
  
 I create the awt font from file and use the name to register 
 it to pdf.
  
 For the pdf font mapping pseudo code;
  
 String formName = somelocation/fonts/MICROSS.TTF;
  
  
 PdfTemplate template = 
 contentByte.createTemplate(rect.width(), rect.height());
 DefaultFontMapper mapper = new DefaultFontMapper();
  
 
 
  
 
 FontFactory.register(fontName);
 
  
 
 BaseFont pdfFont = BaseFont.createFont(fontName, 
 BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
 
 Object allNames[] = {pdfFont.getPostscriptFontName(), 
 pdfFont.getFamilyFontName(), pdfFont.getFullFontName()};
 
 mapper.insertNames(allNames, fontName);
 
  
  
 Graphics2D g2d = template.createGraphics(rect.width(), 
 rect.height(), mapper);
  
  
 When I watch the Set of FontFactory.getRegisteredFamilies() I 
 see the styles missing compared to Arial.
  
 arial=[Arial, Arial Bold, Arial Italic, Arial Bold Italic]
  
 microsoft sans serif=[Microsoft Sans Serif]
  
 How can I set these styles using FontFactory to emulate bold 
 or italic?
  
 Hopefully this is possible,
  
 :Peter


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: 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Wrap text around image in RTF not working

2007-10-22 Thread Henrik Otgard
Hello,

I have added some text and an image to a new RTF document, and now I
want to wrap the text around the image and align it to the right.

Image.TEXTWRAP is not working. When I change my code to PDF export, it
works right away. I believe I have tried everyting to make the text go
around the picture in RTF using TEXTWRAP in different ways.

As a last solution I changed my code to use an RtfShape, hoping that I
could add my image as an RtfShape. However, in this case I get a
NullPointerException:

Exception in thread main java.lang.NullPointerException
at com.lowagie.text.rtf.graphic.RtfImage.writeContent(Unknown Source)
at com.lowagie.text.rtf.graphic.RtfShapeProperty.writeContent(Unknown
Source)
at com.lowagie.text.rtf.graphic.RtfShape.writeContent(Unknown Source)
at com.lowagie.text.rtf.document.RtfDocument.add(Unknown Source)
at com.lowagie.text.rtf.RtfWriter2.add(Unknown Source)
at com.lowagie.text.Document.add(Unknown Source)
at GenerateRtf.main(GenerateRtf.java:30)


Here is my code:


public static void main(String[] args) throws Exception{
  String text = ;
  for (int i = 0; i200; i++)
text += ttt tt  ;

  Document document = new Document();
  RtfWriter2.getInstance(document,
new FileOutputStream(/home/henrik/testRTFdocument.rtf, false));
 document.open();

  Image image = Image.getInstance(/home/henrik/rtfTest.jpeg);
  RtfShapePosition position = new RtfShapePosition(3000, 6000, 10500,
4500);
  RtfShape shape = new RtfShape(
RtfShape.SHAPE_RECTANGLE, position);
  shape.setWrapping(RtfShape.SHAPE_WRAP_LEFT);
  shape.setProperty(
new RtfShapeProperty(RtfShapeProperty.PROPERTY_IMAGE, image));

  document.add(shape);
  Paragraph main = new Paragraph();
  main.add(text);
  document.add(main);
  document.close();
}

Any suggestions will be greatly appreciated!

Best regards
Henrik Otgard


-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] URGENT - Image.getInstance error

2007-10-22 Thread Dilip.Patel
Hi,

I am using iText to generate dynamic pdf. I am trying to use method
Image.getInstace(URL). I am getting error: 
The url is correct, if I put that url on browser, it opens the image.
But it is not working in Java Code.
Please help me as soon as possible. It is very urgent. I will be greatly
appreciate.

Caused by: java.net.SocketException: Connection timed out:could be due
to invalid address
at java.net.PlainSocketImpl.socketConnect(Native Method)
at
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java(Compiled Code))
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java(Compiled
Code))
at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java(Compiled Code))
at java.net.Socket.connect(Socket.java(Compiled Code))
at java.net.Socket.connect(Socket.java(Compiled Code))
at java.net.Socket.init(Socket.java(Compiled Code))
at java.net.Socket.init(Socket.java(Inlined Compiled Code))
at com.ibm.jsse.bv.init(Unknown Source)
at com.ibm.jsse.JSSESocketFactory.createSocket(Unknown Source)
at
com.sun.net.ssl.internal.www.protocol.https.HttpsClient.doConnect([Dasho
Pro-V1.2-120198])
at
com.sun.net.ssl.internal.www.protocol.https.NetworkClient.openServer([Da
shoPro-V1.2-120198])
at
com.sun.net.ssl.internal.www.protocol.https.HttpClient.l([DashoPro-V1.2-
120198])
at
com.sun.net.ssl.internal.www.protocol.https.HttpClient.init([DashoPro-
V1.2-120198])
at
com.sun.net.ssl.internal.www.protocol.https.HttpsClient.init([DashoPro
-V1.2-120198])
at
com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1.2
-120198])
at
com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1.2
-120198])
at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connect([
DashoPro-V1.2-120198])
at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInputS
tream([DashoPro-V1.2-120198])
at java.net.URL.openStream(URL.java:942)

Thank you,
Dilip Patel
Web Developer
-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] URGENT - Image.getInstance error

2007-10-22 Thread wasegraves
Try Image.getInstance(URL) isnatead of Image.getInstace(URL)

Other than that, your priority does not coincide with mine.

Cheers,
Bill Segraves


-- Original message from [EMAIL PROTECTED]: -- 


Hi, 
I am using iText to generate dynamic pdf. I am trying to use method 
Image.getInstace(URL). I am getting error: 
The url is correct, if I put that url on browser, it opens the image. But it is 
not working in Java Code. 
Please help me as soon as possible. It is very urgent. I will be greatly 
appreciate. 
snip-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Printing problem on PS driver

2007-10-22 Thread Matthew Darlison
Dear List,

Firstly - iText is a great tool - *thanks* to the developers!

After extensive fiddling around to get colourspaces and font quality 
issues right, I can create a sequence of coloured barcharts in jFreeChart 
and move them into iText without loss of quality in their font rendering 
and without the colours all acquiring a strong blue cast.

However, the resulting PDFs create an error when I try to print them from 
Acrobat 7.0.9 on a mono laser printer (specifically a Samsung ML-7050) 
via the PS driver, but then print happily on the same printer using a PCL 
5 or 6 driver.

The error message is in two parts - first a window pops up with an 
exclamation mark an The document could not be printed and an OK button, 
which when clicked displays another message (without an icon) Could not 
start print job and an OK to acknowledge.

Adobe's website lists a series of workarounds involving flattenign etc at
http://kb.adobe.com/selfservice/viewContent.do?externalId=316508 but I'd 
like to avoid that kind of post-processing if I can... can anyone shed 
any light on this...? I'm using the newest 1.6 JDK and iText and 
jFreechart built from their SVN repositories at the end of last week...

Thanks in advance for any advice!

Yours,

Matthew Darlison


-- 
Mr. Matthew Darlison BA MA [EMAIL PROTECTED]
Senior Research Fellow, Clinical  Applied Bioinformatics
UCL Centre for Health Informatics and Multiprofessional Education (CHIME)
WHO Collaborating Centre for the Community Control of Inherited Disorders
APoGI on the Web at http://www.chime.ucl.ac.uk/APoGI/



-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] URGENT - Image.getInstance error

2007-10-22 Thread Schalk Neethling
Hi there Dilip,

 

Just a stab in the dark but, I see you are running over https, so could
there be certificate or access problems when your apps try to
communicate with the endpoint?

The reason I say this is because the error message stats that it could
be due to an invalid address but, as you know this not to be the case, I
am thinking it might be a communication issue that does not have
anything to do with the path being invalid.

 

Regards,

Schalk

 

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 22 October 2007 02:21 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] URGENT - Image.getInstance error

 

Hi, 

I am using iText to generate dynamic pdf. I am trying to use method
Image.getInstace(URL). I am getting error: 
The url is correct, if I put that url on browser, it opens the image.
But it is not working in Java Code. 
Please help me as soon as possible. It is very urgent. I will be greatly
appreciate. 

Caused by: java.net.SocketException: Connection timed out:could be due
to invalid address 
at java.net.PlainSocketImpl.socketConnect(Native Method) 
at
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java(Compiled Code)) 
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java(Compiled
Code)) 
at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java(Compiled Code)) 
at java.net.Socket.connect(Socket.java(Compiled Code)) 
at java.net.Socket.connect(Socket.java(Compiled Code)) 
at java.net.Socket.init(Socket.java(Compiled Code)) 
at java.net.Socket.init(Socket.java(Inlined Compiled Code)) 
at com.ibm.jsse.bv.init(Unknown Source) 
at com.ibm.jsse.JSSESocketFactory.createSocket(Unknown Source) 
at
com.sun.net.ssl.internal.www.protocol.https.HttpsClient.doConnect([Dasho
Pro-V1.2-120198]) 
at
com.sun.net.ssl.internal.www.protocol.https.NetworkClient.openServer([Da
shoPro-V1.2-120198]) 
at
com.sun.net.ssl.internal.www.protocol.https.HttpClient.l([DashoPro-V1.2-
120198]) 
at
com.sun.net.ssl.internal.www.protocol.https.HttpClient.init([DashoPro-
V1.2-120198]) 
at
com.sun.net.ssl.internal.www.protocol.https.HttpsClient.init([DashoPro
-V1.2-120198]) 
at
com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1.2
-120198]) 
at
com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1.2
-120198]) 
at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connect([
DashoPro-V1.2-120198]) 
at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInputS
tream([DashoPro-V1.2-120198]) 
at java.net.URL.openStream(URL.java:942) 

Thank you, 
Dilip Patel 
Web Developer 


This email and all content are subject to the following disclaimer:

http://content.momentum.co.za/content/legal/disclaimer_email.htm


-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] one font containing all styles emulate bold, italic or bolditalic

2007-10-22 Thread Peter van Raamsdonk
Hi Paulo,

It can't be done with older versions using FontFactory? I will try the new 
version out and see if it works, thank you.

Bye Peter


- Original Message - 
From: Paulo Soares [EMAIL PROTECTED]
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Sent: Monday, October 22, 2007 5:07 PM
Subject: Re: [iText-questions] one font containing all styles emulate 
bold,italic or bolditalic


I think that the latest iText version already does the style emulation
in Graphics2D.

Paulo

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Peter van Raamsdonk
 Sent: Monday, October 22, 2007 3:08 PM
 To: itext-questions@lists.sourceforge.net
 Subject: [iText-questions] one font containing all styles
 emulate bold,italic or bolditalic

 Hi,

 I'm using the Microsoft Sans Serif true type font in my
 code and I want to emulate bold or italic. I use Graphics2D
 to paint my text and I don't use chunk.

 I found this message in the forum what exactly describes the
 problem but the solution is unclear to me.

 http://threebit.net/mail-archive/itext-questions/msg04147.html

 I create the awt font from file and use the name to register
 it to pdf.

 For the pdf font mapping pseudo code;

 String formName = somelocation/fonts/MICROSS.TTF;


 PdfTemplate template =
 contentByte.createTemplate(rect.width(), rect.height());
 DefaultFontMapper mapper = new DefaultFontMapper();





 FontFactory.register(fontName);



 BaseFont pdfFont = BaseFont.createFont(fontName,
 BaseFont.IDENTITY_H, BaseFont.EMBEDDED);

 Object allNames[] = {pdfFont.getPostscriptFontName(),
 pdfFont.getFamilyFontName(), pdfFont.getFullFontName()};

 mapper.insertNames(allNames, fontName);



 Graphics2D g2d = template.createGraphics(rect.width(),
 rect.height(), mapper);


 When I watch the Set of FontFactory.getRegisteredFamilies() I
 see the styles missing compared to Arial.

 arial=[Arial, Arial Bold, Arial Italic, Arial Bold Italic]

 microsoft sans serif=[Microsoft Sans Serif]

 How can I set these styles using FontFactory to emulate bold
 or italic?

 Hopefully this is possible,

 :Peter


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: 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@lists.sourceforge.net
 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Printing problem on PS driver

2007-10-22 Thread Leonard Rosenthol
IIRC, Samsung doesn't use Adobe Postscript - it uses a clone.  I  
suspect you are running into issues/bugs/errors in their implementation.

Trying telling Acrobat to dumb down the Postscript by choosing a  
lower PS level in the printer settings.

Leonard


On Oct 22, 2007, at 12:32 PM, Matthew Darlison wrote:

 Dear List,

 Firstly - iText is a great tool - *thanks* to the developers!

 After extensive fiddling around to get colourspaces and font quality
 issues right, I can create a sequence of coloured barcharts in  
 jFreeChart
 and move them into iText without loss of quality in their font  
 rendering
 and without the colours all acquiring a strong blue cast.

 However, the resulting PDFs create an error when I try to print  
 them from
 Acrobat 7.0.9 on a mono laser printer (specifically a Samsung ML-7050)
 via the PS driver, but then print happily on the same printer using  
 a PCL
 5 or 6 driver.

 The error message is in two parts - first a window pops up with an
 exclamation mark an The document could not be printed and an OK  
 button,
 which when clicked displays another message (without an icon)  
 Could not
 start print job and an OK to acknowledge.

 Adobe's website lists a series of workarounds involving flattenign  
 etc at
 http://kb.adobe.com/selfservice/viewContent.do?externalId=316508  
 but I'd
 like to avoid that kind of post-processing if I can... can anyone shed
 any light on this...? I'm using the newest 1.6 JDK and iText and
 jFreechart built from their SVN repositories at the end of last  
 week...

 Thanks in advance for any advice!

 Yours,

 Matthew Darlison


-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] How to sign the PDF file that has the signing permission without setting owner password

2007-10-22 Thread dhyton

I have a similar problem, I need to set the permissions for a itext generated
report for compliance rules that have to do with the Financial Planning
industry. I need the client to be able to read files I generate with out a
password but I also need limit their permissions with the file.

Is there a fast track for itext requests?


Seung Hyun Park-2 wrote:
 
 Hello.
 
 
 
 I have a question about the signing of PDF with iText.
 
 
 
 I know that PDF encryption spec. provides the permission to allow signing
 and adding annotations.
 
 
 
 I can sign a PDF file using Acrobat without typing owner password if it
 has
 the permission to allow signing.
 
 
 
 
 
 But, iText always needed owner password to sign on the PDF files, although
 they already had the signing permission, when I made some test codes and
 tried them.
 
 
 
 To be specific, PDFReader can read the PDF files encrypted without setting
 owner password but error occurs at PdfStamper.CreateSignature method.
 
 
 
 If I set owner password at the constructor of PDF reader, the error
 disappears.
 
 
 
 But, I have to insert signature without owner password at my scenario.
 
 
 
 
 
 My test codes are based on the article – How to sign a PDF using iText
 and
 iTextSharp and work well with unencrypted PDF files.
 
 
 
 
 
 How do I sign on the PDF files that they are encrypted but have signing
 permission?
 
 
 
 Strictly speaking, I want to know that it is possible to sign them with
 iText.
 
 
 
 
 I attach the sample PDF file that I have used for testing.
 
 
 
 
 
 If you could take a few minutes to answer my questions, I would really
 appreciate it.
 
 Always thank you in advance for your help.
 
 
 Best regards,
 
 S. H. Park
 
  
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2005.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 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/
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-sign-the-PDF-file-that-has-the-signing-permission-without-setting-owner-password-tf4449319.html#a13349661
Sent from the iText - General mailing list archive at Nabble.com.


-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] How to sign the PDF file that has the signing permission without setting owner password

2007-10-22 Thread Paulo Soares
There is no problem in setting permissions.

Paulo

- Original Message - 
From: dhyton [EMAIL PROTECTED]
To: itext-questions@lists.sourceforge.net
Sent: Monday, October 22, 2007 7:21 PM
Subject: Re: [iText-questions] How to sign the PDF file that has the signing 
permission without setting owner password



 I have a similar problem, I need to set the permissions for a itext 
 generated
 report for compliance rules that have to do with the Financial Planning
 industry. I need the client to be able to read files I generate with out a
 password but I also need limit their permissions with the file.

 Is there a fast track for itext requests?


 Seung Hyun Park-2 wrote:

 Hello.



 I have a question about the signing of PDF with iText.



 I know that PDF encryption spec. provides the permission to allow signing
 and adding annotations.



 I can sign a PDF file using Acrobat without typing owner password if it
 has
 the permission to allow signing.





 But, iText always needed owner password to sign on the PDF files, 
 although
 they already had the signing permission, when I made some test codes and
 tried them.



 To be specific, PDFReader can read the PDF files encrypted without 
 setting
 owner password but error occurs at PdfStamper.CreateSignature method.



 If I set owner password at the constructor of PDF reader, the error
 disappears.



 But, I have to insert signature without owner password at my scenario.





 My test codes are based on the article – How to sign a PDF using iText
 and
 iTextSharp and work well with unencrypted PDF files.





 How do I sign on the PDF files that they are encrypted but have signing
 permission?



 Strictly speaking, I want to know that it is possible to sign them with
 iText.




 I attach the sample PDF file that I have used for testing.





 If you could take a few minutes to answer my questions, I would really
 appreciate it.

 Always thank you in advance for your help.


 Best regards,

 S. H. Park


-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Limitations of Adobe

2007-10-22 Thread Paulo Soares
It can be done with lots of javascript.

Paulo

- Original Message - 
From: swapna reddy [EMAIL PROTECTED]
To: itext-questions@lists.sourceforge.net
Sent: Monday, October 22, 2007 10:11 PM
Subject: [iText-questions] Limitations of Adobe


Hi

  I am creating an editable PDF Form. The form composes of multiple control 
fields(like checkbox,selectbox,textarea,textbox) in it. I need to hide 
different control fields based on the answers provided by the user.

  I am able to disable the controls, is it possible to hide the control and 
shrink the whitespace when it is hidden? I would like to know, if this is a 
possible scenario?? If it is, is it possible with iText?

  Thanks
  Swapna.



-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Problems with printing

2007-10-22 Thread Radamés Raúl Romero López

Hi could somebody tell me how to print a PDF file in java without using a cmd line on a termic printer plizCoches nuevos, coches de ocasión, coches de Km 0 Si piensas en cambiar de coche, MSN Motor. 


-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] yet another problem with vertical alignment

2007-10-22 Thread mniki25
I have had some trouble trying to vertically center a cell.  Reading this 
mailing list it seems that I am not the only one.  In some cases the problem 
was solved by using the PdfPTable class rather than the Table class, however I 
have only been using PdfPTable.

Below is a sample program demonstrating my problem.  Notice that the first 
column seems to be vertically aligned to the bottom.  In fact no matter how I 
try to align the first cell it always seems to align to the bottom.

- mike


File file = new File( c:/temp/test.pdf );
Document document = new Document();
PdfWriter.getInstance( document, new FileOutputStream( file ) );
document.open();
PdfPTable pdfTable = new PdfPTable( 2 );

Chunk chunk = new Chunk( Caddyshack );
chunk.setAnchor( http://en.wikipedia.org/wiki/Caddyshack; );
Font font = chunk.getFont();
font.setColor( Color.BLUE );
font.setStyle( com.lowagie.text.Font.UNDERLINE );
chunk.setFont( font );
PdfPCell cell = new PdfPCell();
cell.addElement( chunk );
cell.setVerticalAlignment( Element.ALIGN_MIDDLE );
pdfTable.addCell( cell );

pdfTable.addCell( Chevy Chase );
document.add( pdfTable );
document.close();



-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] yet another problem with vertical alignment

2007-10-22 Thread Paulo Soares
Put a couple of \n in the second cell and see the first one align correctly.

Paulo

- Original Message - 
From: [EMAIL PROTECTED]
To: itext-questions@lists.sourceforge.net
Sent: Monday, October 22, 2007 6:51 PM
Subject: [iText-questions] yet another problem with vertical alignment


I have had some trouble trying to vertically center a cell.  Reading this 
mailing list it seems that I am not the only one.  In some cases the 
problem was solved by using the PdfPTable class rather than the Table 
class, however I have only been using PdfPTable.

 Below is a sample program demonstrating my problem.  Notice that the first 
 column seems to be vertically aligned to the bottom.  In fact no matter 
 how I try to align the first cell it always seems to align to the bottom.

 - mike


File file = new File( c:/temp/test.pdf );
Document document = new Document();
PdfWriter.getInstance( document, new FileOutputStream( file ) );
document.open();
PdfPTable pdfTable = new PdfPTable( 2 );

Chunk chunk = new Chunk( Caddyshack );
chunk.setAnchor( http://en.wikipedia.org/wiki/Caddyshack; );
Font font = chunk.getFont();
font.setColor( Color.BLUE );
font.setStyle( com.lowagie.text.Font.UNDERLINE );
chunk.setFont( font );
PdfPCell cell = new PdfPCell();
cell.addElement( chunk );
cell.setVerticalAlignment( Element.ALIGN_MIDDLE );
pdfTable.addCell( cell );

pdfTable.addCell( Chevy Chase );
document.add( pdfTable );
document.close();


-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] How to sign the PDF file that has the signing permission without setting owner password

2007-10-22 Thread dhyton

Then there is a way to set permissions with out encrypting?

Paulo Soares wrote:
 
 There is no problem in setting permissions.
 
 Paulo
 
 - Original Message - 
 From: dhyton [EMAIL PROTECTED]
 To: itext-questions@lists.sourceforge.net
 Sent: Monday, October 22, 2007 7:21 PM
 Subject: Re: [iText-questions] How to sign the PDF file that has the
 signing 
 permission without setting owner password
 
 

 I have a similar problem, I need to set the permissions for a itext 
 generated
 report for compliance rules that have to do with the Financial Planning
 industry. I need the client to be able to read files I generate with out
 a
 password but I also need limit their permissions with the file.

 Is there a fast track for itext requests?


 Seung Hyun Park-2 wrote:

 Hello.



 I have a question about the signing of PDF with iText.



 I know that PDF encryption spec. provides the permission to allow
 signing
 and adding annotations.



 I can sign a PDF file using Acrobat without typing owner password if it
 has
 the permission to allow signing.





 But, iText always needed owner password to sign on the PDF files, 
 although
 they already had the signing permission, when I made some test codes and
 tried them.



 To be specific, PDFReader can read the PDF files encrypted without 
 setting
 owner password but error occurs at PdfStamper.CreateSignature method.



 If I set owner password at the constructor of PDF reader, the error
 disappears.



 But, I have to insert signature without owner password at my scenario.





 My test codes are based on the article – How to sign a PDF using iText
 and
 iTextSharp and work well with unencrypted PDF files.





 How do I sign on the PDF files that they are encrypted but have signing
 permission?



 Strictly speaking, I want to know that it is possible to sign them with
 iText.




 I attach the sample PDF file that I have used for testing.





 If you could take a few minutes to answer my questions, I would really
 appreciate it.

 Always thank you in advance for your help.


 Best regards,

 S. H. Park
 
 
 -
 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@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-sign-the-PDF-file-that-has-the-signing-permission-without-setting-owner-password-tf4449319.html#a13354106
Sent from the iText - General mailing list archive at Nabble.com.


-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] How to sign the PDF file that has the signing permission without setting owner password

2007-10-22 Thread Leonard Rosenthol
No.   What use would a set of permissions be that enabled anyone to  
get access!??!

However, you can apply digital rights to a file via encryption  
WITHOUT requiring a password to open the file...

Leonard

On Oct 22, 2007, at 7:37 PM, dhyton wrote:


 Then there is a way to set permissions with out encrypting?

 Paulo Soares wrote:

 There is no problem in setting permissions.

 Paulo

 - Original Message -
 From: dhyton [EMAIL PROTECTED]
 To: itext-questions@lists.sourceforge.net
 Sent: Monday, October 22, 2007 7:21 PM
 Subject: Re: [iText-questions] How to sign the PDF file that has the
 signing
 permission without setting owner password



 I have a similar problem, I need to set the permissions for a itext
 generated
 report for compliance rules that have to do with the Financial  
 Planning
 industry. I need the client to be able to read files I generate  
 with out
 a
 password but I also need limit their permissions with the file.

 Is there a fast track for itext requests?


 Seung Hyun Park-2 wrote:

 Hello.



 I have a question about the signing of PDF with iText.



 I know that PDF encryption spec. provides the permission to allow
 signing
 and adding annotations.



 I can sign a PDF file using Acrobat without typing owner  
 password if it
 has
 the permission to allow signing.





 But, iText always needed owner password to sign on the PDF files,
 although
 they already had the signing permission, when I made some test  
 codes and
 tried them.



 To be specific, PDFReader can read the PDF files encrypted without
 setting
 owner password but error occurs at PdfStamper.CreateSignature  
 method.



 If I set owner password at the constructor of PDF reader, the error
 disappears.



 But, I have to insert signature without owner password at my  
 scenario.





 My test codes are based on the article – How to sign a PDF  
 using iText
 and
 iTextSharp and work well with unencrypted PDF files.





 How do I sign on the PDF files that they are encrypted but have  
 signing
 permission?



 Strictly speaking, I want to know that it is possible to sign  
 them with
 iText.




 I attach the sample PDF file that I have used for testing.





 If you could take a few minutes to answer my questions, I would  
 really
 appreciate it.

 Always thank you in advance for your help.


 Best regards,

 S. H. Park


 - 
 
 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@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/



 -- 
 View this message in context: http://www.nabble.com/How-to-sign-the- 
 PDF-file-that-has-the-signing-permission-without-setting-owner- 
 password-tf4449319.html#a13354106
 Sent from the iText - General mailing list archive at Nabble.com.


 -- 
 ---
 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@lists.sourceforge.net
 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Limitations of Adobe

2007-10-22 Thread Leonard Rosenthol
Just to clarify a few things...

First, as Paulo points out, adding intelligence to a PDF form  
involves the use of JavaScript.  That is the programming/automation  
language of PDF.

Second, there are two types of PDF forms - classic Acro Forms and  
modern XML-based XFA Forms.  Each has pros and cons, though for  
your needs it sounds like XFA Forms would be a better choice.

Leonard

On Oct 22, 2007, at 7:03 PM, Paulo Soares wrote:

 It can be done with lots of javascript.

 Paulo

 - Original Message -
 From: swapna reddy [EMAIL PROTECTED]
 To: itext-questions@lists.sourceforge.net
 Sent: Monday, October 22, 2007 10:11 PM
 Subject: [iText-questions] Limitations of Adobe


 Hi

   I am creating an editable PDF Form. The form composes of multiple  
 control
 fields(like checkbox,selectbox,textarea,textbox) in it. I need  
 to hide
 different control fields based on the answers provided by the user.

   I am able to disable the controls, is it possible to hide the  
 control and
 shrink the whitespace when it is hidden? I would like to know, if  
 this is a
 possible scenario?? If it is, is it possible with iText?

   Thanks
   Swapna.


-
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] How to sign the PDF file that has the signing permission without setting owner password

2007-10-22 Thread dhyton

indeed but when I try to reopen that file with a PDFReader, to concat it, it
complains that I am not using the correct owner password.

Leonard Rosenthol wrote:
 
 No.   What use would a set of permissions be that enabled anyone to  
 get access!??!
 
 However, you can apply digital rights to a file via encryption  
 WITHOUT requiring a password to open the file...
 
 Leonard
 
 On Oct 22, 2007, at 7:37 PM, dhyton wrote:
 

 Then there is a way to set permissions with out encrypting?

 Paulo Soares wrote:

 There is no problem in setting permissions.

 Paulo

 - Original Message -
 From: dhyton [EMAIL PROTECTED]
 To: itext-questions@lists.sourceforge.net
 Sent: Monday, October 22, 2007 7:21 PM
 Subject: Re: [iText-questions] How to sign the PDF file that has the
 signing
 permission without setting owner password



 I have a similar problem, I need to set the permissions for a itext
 generated
 report for compliance rules that have to do with the Financial  
 Planning
 industry. I need the client to be able to read files I generate  
 with out
 a
 password but I also need limit their permissions with the file.

 Is there a fast track for itext requests?


 Seung Hyun Park-2 wrote:

 Hello.



 I have a question about the signing of PDF with iText.



 I know that PDF encryption spec. provides the permission to allow
 signing
 and adding annotations.



 I can sign a PDF file using Acrobat without typing owner  
 password if it
 has
 the permission to allow signing.





 But, iText always needed owner password to sign on the PDF files,
 although
 they already had the signing permission, when I made some test  
 codes and
 tried them.



 To be specific, PDFReader can read the PDF files encrypted without
 setting
 owner password but error occurs at PdfStamper.CreateSignature  
 method.



 If I set owner password at the constructor of PDF reader, the error
 disappears.



 But, I have to insert signature without owner password at my  
 scenario.





 My test codes are based on the article – How to sign a PDF  
 using iText
 and
 iTextSharp and work well with unencrypted PDF files.





 How do I sign on the PDF files that they are encrypted but have  
 signing
 permission?



 Strictly speaking, I want to know that it is possible to sign  
 them with
 iText.




 I attach the sample PDF file that I have used for testing.





 If you could take a few minutes to answer my questions, I would  
 really
 appreciate it.

 Always thank you in advance for your help.


 Best regards,

 S. H. Park


 - 
 
 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@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/



 -- 
 View this message in context: http://www.nabble.com/How-to-sign-the- 
 PDF-file-that-has-the-signing-permission-without-setting-owner- 
 password-tf4449319.html#a13354106
 Sent from the iText - General mailing list archive at Nabble.com.


 -- 
 ---
 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@lists.sourceforge.net
 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@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-sign-the-PDF-file-that-has-the-signing-permission-without-setting-owner-password-tf4449319.html#a13356841
Sent from the iText - General mailing list archive at Nabble.com.


-
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