Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Yoav Tsoref
Probably. Removing the \r did the work > On 11 Aug 2016, at 22:14, Gilad Denneboom wrote: > > So your original code had "\r\n" as the line-break? > >> On Thu, Aug 11, 2016 at 6:22 PM, Yoav Tsoref wrote: >> >> Thank you very much!!! >> I did a quick test of removing only the \r and it is worki

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Gilad Denneboom
So your original code had "\r\n" as the line-break? On Thu, Aug 11, 2016 at 6:22 PM, Yoav Tsoref wrote: > Thank you very much!!! > I did a quick test of removing only the \r and it is working for me good. > > Thank you. > Yoav > > > On 11 Aug 2016, at 19:10, Maruan Sahyoun wrote: > > > > OK - w

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Yoav Tsoref
Thank you very much!!! I did a quick test of removing only the \r and it is working for me good. Thank you. Yoav > On 11 Aug 2016, at 19:10, Maruan Sahyoun wrote: > > OK - was able to reproduce the issue. If you use \r for line breaking it will > not work. Same for combination with \r\n. You n

Re: Issue in certificate based encryption

2016-08-11 Thread Tilman Hausherr
Hi, Use single jar files, i.e. pdfbox, fontbox, commons-log and bc*.jar (see dependencies) and whatever else you need. Long explanation: The reason is that you used pdfbox-app-2.0.2.jar. I do this all the time too. Your code failed in a class that has a nice unit test, but the unit test suc

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Maruan Sahyoun
OK - was able to reproduce the issue. If you use \r for line breaking it will not work. Same for combination with \r\n. You need to use \n alone. I've created https://issues.apache.org/jira/browse/PDFBOX-3461 to improve that in a future release. Currently you need to make sure that control char

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Maruan Sahyoun
> Am 11.08.2016 um 17:53 schrieb John Hewson : > > >> On 11 Aug 2016, at 05:56, Yoav Tsoref wrote: >> >> Hi, >> >> I am using PDFBox version 2.0.1 to dynamically update the fields of an >> existing PDF document. When I'm trying to fill one of the fields with a >> String that contains New Line

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread John Hewson
> On 11 Aug 2016, at 05:56, Yoav Tsoref wrote: > > Hi, > > I am using PDFBox version 2.0.1 to dynamically update the fields of an > existing PDF document. When I'm trying to fill one of the fields with a > String that contains New Line character the following exception is thrown: > > java.lang

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Maruan Sahyoun
Hi, I did a quick test using PDFBox 2.0.3-SNAPSHOT with the folliwing lines of code: String billingAddress = "First line\nsecond line\nthird line"; PDDocument pdfDocument = PDDocument.load(new File("invoice_template.pdf")); PDAcro

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Gilad Denneboom
I just tried it with 2.0.2 and it worked... Maybe try to upgrade to that version. On Thu, Aug 11, 2016 at 5:36 PM, Yoav Tsoref wrote: > The field is set as multiline. The font is declared in the PDF - > Helvetica. I'm not changing the font programmatically... > > > On 11 Aug 2016, at 17:43, Gila

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Yoav Tsoref
The field is set as multiline. The font is declared in the PDF - Helvetica. I'm not changing the font programmatically... > On 11 Aug 2016, at 17:43, Gilad Denneboom wrote: > > Is the field set as multiline? Also, what font are you using for the text > in that field? > >> On Thu, Aug 11, 2016

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Gilad Denneboom
Is the field set as multiline? Also, what font are you using for the text in that field? On Thu, Aug 11, 2016 at 3:46 PM, Yoav Tsoref wrote: > Hi, > I placed the PDF template at: > https://drive.google.com/file/d/0B__NK1_B6ccjVXgxekNLLUxKMzMyS0c5LTBEO > VVVYUJhVk04/view?usp=sharing >

RE: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Stahle, Patrick
Just off the top of my head whenever I wrote text into a PDF using PDFBox I had to remove carriage returns / line feeds and had to do the line breaks myself by moving the start position of the next line of text. -Original Message- From: Yoav Tsoref [mailto:yoav...@intango.com] Sent: T

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Yoav Tsoref
Hi, I placed the PDF template at: https://drive.google.com/file/d/0B__NK1_B6ccjVXgxekNLLUxKMzMyS0c5LTBEOVVVYUJhVk04/view?usp=sharing (in this shared folder

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Gilad Denneboom
The new-line character is "\n", not "/n"... And maybe it will work with "\r", instead. On Thu, Aug 11, 2016 at 3:14 PM, Maruan Sahyoun wrote: > Hi, > > > Am 11.08.2016 um 14:56 schrieb Yoav Tsoref : > > > > Hi, > > > > I am using PDFBox version 2.0.1 to dynamically update the fields of an > > ex

Re: Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Maruan Sahyoun
Hi, > Am 11.08.2016 um 14:56 schrieb Yoav Tsoref : > > Hi, > > I am using PDFBox version 2.0.1 to dynamically update the fields of an > existing PDF document. When I'm trying to fill one of the fields with a > String that contains New Line character the following exception is thrown: > > java.l

Unable to Set a String containing New Line Character into PDFBox PDTextField Object

2016-08-11 Thread Yoav Tsoref
Hi, I am using PDFBox version 2.0.1 to dynamically update the fields of an existing PDF document. When I'm trying to fill one of the fields with a String that contains New Line character the following exception is thrown: java.lang.IllegalArgumentException: U+000D ('controlCR') is not available

Issue in certificate based encryption

2016-08-11 Thread scc lab
Hello PDFBox team, I am writing this email to ask for guidance about the use of PDFBox sdk. I have downloaded PDFBox sdk and tried some samples given with it. I am interested in the encryption feature. I tried the password encryption and its working fine. But when I try to do certificate based en