You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Frank Buss <fb...@frank-buss.de> on 2015/04/18 12:57:53 UTC

Euro not set in text field

I have a PDF document with a text field and I want to enter an euro symbol (€) with a program, but I'll get a strange character (¬). This is the code:

import java.io.*;
import org.apache.pdfbox.pdmodel.*;
import org.apache.pdfbox.pdmodel.interactive.form.*;

public class PdfTest {

	public static void main(final String args[]) throws Exception {
		// load test document
		PDDocument pdfDocument = PDDocument.load(new File("test.pdf"));
		PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog();
		PDAcroForm acroForm = docCatalog.getAcroForm();

		// get test2 field and set Euro
		PDFieldTreeNode test2 = acroForm.getField("test2");
		test2.setValue("€");

		// save as new document
		pdfDocument.save("test2.pdf");
		pdfDocument.close();
	}
}

See http://www.frank-buss.de/tmp/pdfTest.zip for the test.pdf and the generated test2.pdf. I'm using the latest snapshot (pdfbox-app-2.0.0-20150418.010411-1224.jar), but the same problem was in a snapshot from January, too. How can I solve the problem? I can try to fix it in the library, too, if someone can give me a hint where to search.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Euro not set in text field

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,

this seems to be a bug in PDFBOX 2.0.0 - I've created https://issues.apache.org/jira/browse/PDFBOX-2771 <https://issues.apache.org/jira/browse/PDFBOX-2771> for that.

BR
Maruan


> Am 19.04.2015 um 22:01 schrieb Frank Buss <fb...@frank-buss.de>:
> 
> I would expect that Arial works, most other programs can use it without problems, for example I have no problem generating PDFs with Apache FOP with Arial. But I tried other fonts, and the same problem. Looks like there are more problems with encodings in pdfbox, maybe this problem is related?
> 
> http://w3facility.org/question/pdfbox-encode-symbol-currency-euro/
> 
> I can't use the hack described in the article, because I want to programmatically type some text in a field, unless I calculate the Euro sign position and use the appendRawCommands trick to draw it, but this sounds very ugly :-)
> 
> 
>> -----Original Message-----
>> From: Gilad Denneboom [mailto:gilad.denneboom@gmail.com]
>> Sent: Sunday, April 19, 2015 10:17 AM
>> To: users@pdfbox.apache.org
>> Subject: Re: Euro not set in text field
>> 
>> Maybe try using a different font?
>> 
>> On Sun, Apr 19, 2015 at 2:51 AM, Frank Buss <fb...@frank-buss.de> wrote:
>> 
>>> When I do this, it prints this exception:
>>> 
>>> Exception in thread "main" java.lang.IllegalArgumentException: U+8364 is
>>> not available in this font's Encoding
>>>        at
>>> 
>> org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.encode(PDTrueTypeFont
>> .java:260)
>>>        at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:268)
>>>        at
>>> org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:297)
>>>        at
>>> 
>> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.
>> calculateHorizontalOffset(AppearanceGeneratorHelper.java:564)
>>>        at
>>> 
>> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.i
>> nsertGeneratedAppearance(AppearanceGeneratorHelper.java:305)
>>>        at
>>> 
>> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.
>> createAppearanceContent(AppearanceGeneratorHelper.java:228)
>>>        at
>>> 
>> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.
>> setAppearanceValue(AppearanceGeneratorHelper.java:203)
>>>        at
>>> 
>> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGenerator.genera
>> teFieldAppearances(AppearanceGenerator.java:61)
>>>        at
>>> 
>> org.apache.pdfbox.pdmodel.interactive.form.PDField.updateFieldAppearan
>> ces(PDField.java:121)
>>>        at
>>> 
>> org.apache.pdfbox.pdmodel.interactive.form.PDTextField.setValue(PDTextF
>> ield.java:286)
>>>        at PdfTest.main(PdfTest.java:15)
>>> 
>>> which looks wrong, because as you can see in the the first text field in
>>> the sample PDF, it is possible to use the Euro sign, it is part of the
>>> Arial font. And I can open Word, set Arial as the font, then type Alt-8364
>>> and the Euro sign appears, so looks like it is part of the font's Encoding.
>>> 
>>> This bug is a show stopper for my application, because the Euro sign is
>>> required for a business application.
>>> 
>>> 
>>>> -----Original Message-----
>>>> From: Gilad Denneboom [mailto:gilad.denneboom@gmail.com]
>>>> Sent: Saturday, April 18, 2015 5:39 PM
>>>> To: users@pdfbox.apache.org
>>>> Subject: Re: Euro not set in text field
>>>> 
>>>> Maybe try specifying the unicode value directly, like so:
>>>> test2.setValue("\u8364");
>>>> 
>>>> On Sat, Apr 18, 2015 at 12:57 PM, Frank Buss <fb...@frank-buss.de> wrote:
>>>> 
>>>>> I have a PDF document with a text field and I want to enter an euro
>>> symbol
>>>>> (€) with a program, but I'll get a strange character (¬). This is the
>>> code:
>>>>> 
>>>>> import java.io.*;
>>>>> import org.apache.pdfbox.pdmodel.*;
>>>>> import org.apache.pdfbox.pdmodel.interactive.form.*;
>>>>> 
>>>>> public class PdfTest {
>>>>> 
>>>>>        public static void main(final String args[]) throws Exception {
>>>>>                // load test document
>>>>>                PDDocument pdfDocument = PDDocument.load(new
>>>>> File("test.pdf"));
>>>>>                PDDocumentCatalog docCatalog =
>>>>> pdfDocument.getDocumentCatalog();
>>>>>                PDAcroForm acroForm = docCatalog.getAcroForm();
>>>>> 
>>>>>                // get test2 field and set Euro
>>>>>                PDFieldTreeNode test2 = acroForm.getField("test2");
>>>>>                test2.setValue("€");
>>>>> 
>>>>>                // save as new document
>>>>>                pdfDocument.save("test2.pdf");
>>>>>                pdfDocument.close();
>>>>>        }
>>>>> }
>>>>> 
>>>>> See http://www.frank-buss.de/tmp/pdfTest.zip for the test.pdf and
>> the
>>>>> generated test2.pdf. I'm using the latest snapshot
>>>>> (pdfbox-app-2.0.0-20150418.010411-1224.jar), but the same problem
>> was
>>>> in a
>>>>> snapshot from January, too. How can I solve the problem? I can try to
>>> fix
>>>>> it in the library, too, if someone can give me a hint where to search.
>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>>> 
>>>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>> 
>>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


RE: Euro not set in text field

Posted by Frank Buss <fb...@frank-buss.de>.
I would expect that Arial works, most other programs can use it without problems, for example I have no problem generating PDFs with Apache FOP with Arial. But I tried other fonts, and the same problem. Looks like there are more problems with encodings in pdfbox, maybe this problem is related?

http://w3facility.org/question/pdfbox-encode-symbol-currency-euro/

I can't use the hack described in the article, because I want to programmatically type some text in a field, unless I calculate the Euro sign position and use the appendRawCommands trick to draw it, but this sounds very ugly :-)


> -----Original Message-----
> From: Gilad Denneboom [mailto:gilad.denneboom@gmail.com]
> Sent: Sunday, April 19, 2015 10:17 AM
> To: users@pdfbox.apache.org
> Subject: Re: Euro not set in text field
> 
> Maybe try using a different font?
> 
> On Sun, Apr 19, 2015 at 2:51 AM, Frank Buss <fb...@frank-buss.de> wrote:
> 
> > When I do this, it prints this exception:
> >
> > Exception in thread "main" java.lang.IllegalArgumentException: U+8364 is
> > not available in this font's Encoding
> >         at
> >
> org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.encode(PDTrueTypeFont
> .java:260)
> >         at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:268)
> >         at
> > org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:297)
> >         at
> >
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.
> calculateHorizontalOffset(AppearanceGeneratorHelper.java:564)
> >         at
> >
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.i
> nsertGeneratedAppearance(AppearanceGeneratorHelper.java:305)
> >         at
> >
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.
> createAppearanceContent(AppearanceGeneratorHelper.java:228)
> >         at
> >
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.
> setAppearanceValue(AppearanceGeneratorHelper.java:203)
> >         at
> >
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGenerator.genera
> teFieldAppearances(AppearanceGenerator.java:61)
> >         at
> >
> org.apache.pdfbox.pdmodel.interactive.form.PDField.updateFieldAppearan
> ces(PDField.java:121)
> >         at
> >
> org.apache.pdfbox.pdmodel.interactive.form.PDTextField.setValue(PDTextF
> ield.java:286)
> >         at PdfTest.main(PdfTest.java:15)
> >
> > which looks wrong, because as you can see in the the first text field in
> > the sample PDF, it is possible to use the Euro sign, it is part of the
> > Arial font. And I can open Word, set Arial as the font, then type Alt-8364
> > and the Euro sign appears, so looks like it is part of the font's Encoding.
> >
> > This bug is a show stopper for my application, because the Euro sign is
> > required for a business application.
> >
> >
> > > -----Original Message-----
> > > From: Gilad Denneboom [mailto:gilad.denneboom@gmail.com]
> > > Sent: Saturday, April 18, 2015 5:39 PM
> > > To: users@pdfbox.apache.org
> > > Subject: Re: Euro not set in text field
> > >
> > > Maybe try specifying the unicode value directly, like so:
> > > test2.setValue("\u8364");
> > >
> > > On Sat, Apr 18, 2015 at 12:57 PM, Frank Buss <fb...@frank-buss.de> wrote:
> > >
> > > > I have a PDF document with a text field and I want to enter an euro
> > symbol
> > > > (€) with a program, but I'll get a strange character (¬). This is the
> > code:
> > > >
> > > > import java.io.*;
> > > > import org.apache.pdfbox.pdmodel.*;
> > > > import org.apache.pdfbox.pdmodel.interactive.form.*;
> > > >
> > > > public class PdfTest {
> > > >
> > > >         public static void main(final String args[]) throws Exception {
> > > >                 // load test document
> > > >                 PDDocument pdfDocument = PDDocument.load(new
> > > > File("test.pdf"));
> > > >                 PDDocumentCatalog docCatalog =
> > > > pdfDocument.getDocumentCatalog();
> > > >                 PDAcroForm acroForm = docCatalog.getAcroForm();
> > > >
> > > >                 // get test2 field and set Euro
> > > >                 PDFieldTreeNode test2 = acroForm.getField("test2");
> > > >                 test2.setValue("€");
> > > >
> > > >                 // save as new document
> > > >                 pdfDocument.save("test2.pdf");
> > > >                 pdfDocument.close();
> > > >         }
> > > > }
> > > >
> > > > See http://www.frank-buss.de/tmp/pdfTest.zip for the test.pdf and
> the
> > > > generated test2.pdf. I'm using the latest snapshot
> > > > (pdfbox-app-2.0.0-20150418.010411-1224.jar), but the same problem
> was
> > > in a
> > > > snapshot from January, too. How can I solve the problem? I can try to
> > fix
> > > > it in the library, too, if someone can give me a hint where to search.
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > > > For additional commands, e-mail: users-help@pdfbox.apache.org
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > For additional commands, e-mail: users-help@pdfbox.apache.org
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Euro not set in text field

Posted by Gilad Denneboom <gi...@gmail.com>.
Maybe try using a different font?

On Sun, Apr 19, 2015 at 2:51 AM, Frank Buss <fb...@frank-buss.de> wrote:

> When I do this, it prints this exception:
>
> Exception in thread "main" java.lang.IllegalArgumentException: U+8364 is
> not available in this font's Encoding
>         at
> org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.encode(PDTrueTypeFont.java:260)
>         at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:268)
>         at
> org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:297)
>         at
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.calculateHorizontalOffset(AppearanceGeneratorHelper.java:564)
>         at
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.insertGeneratedAppearance(AppearanceGeneratorHelper.java:305)
>         at
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.createAppearanceContent(AppearanceGeneratorHelper.java:228)
>         at
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.setAppearanceValue(AppearanceGeneratorHelper.java:203)
>         at
> org.apache.pdfbox.pdmodel.interactive.form.AppearanceGenerator.generateFieldAppearances(AppearanceGenerator.java:61)
>         at
> org.apache.pdfbox.pdmodel.interactive.form.PDField.updateFieldAppearances(PDField.java:121)
>         at
> org.apache.pdfbox.pdmodel.interactive.form.PDTextField.setValue(PDTextField.java:286)
>         at PdfTest.main(PdfTest.java:15)
>
> which looks wrong, because as you can see in the the first text field in
> the sample PDF, it is possible to use the Euro sign, it is part of the
> Arial font. And I can open Word, set Arial as the font, then type Alt-8364
> and the Euro sign appears, so looks like it is part of the font's Encoding.
>
> This bug is a show stopper for my application, because the Euro sign is
> required for a business application.
>
>
> > -----Original Message-----
> > From: Gilad Denneboom [mailto:gilad.denneboom@gmail.com]
> > Sent: Saturday, April 18, 2015 5:39 PM
> > To: users@pdfbox.apache.org
> > Subject: Re: Euro not set in text field
> >
> > Maybe try specifying the unicode value directly, like so:
> > test2.setValue("\u8364");
> >
> > On Sat, Apr 18, 2015 at 12:57 PM, Frank Buss <fb...@frank-buss.de> wrote:
> >
> > > I have a PDF document with a text field and I want to enter an euro
> symbol
> > > (€) with a program, but I'll get a strange character (¬). This is the
> code:
> > >
> > > import java.io.*;
> > > import org.apache.pdfbox.pdmodel.*;
> > > import org.apache.pdfbox.pdmodel.interactive.form.*;
> > >
> > > public class PdfTest {
> > >
> > >         public static void main(final String args[]) throws Exception {
> > >                 // load test document
> > >                 PDDocument pdfDocument = PDDocument.load(new
> > > File("test.pdf"));
> > >                 PDDocumentCatalog docCatalog =
> > > pdfDocument.getDocumentCatalog();
> > >                 PDAcroForm acroForm = docCatalog.getAcroForm();
> > >
> > >                 // get test2 field and set Euro
> > >                 PDFieldTreeNode test2 = acroForm.getField("test2");
> > >                 test2.setValue("€");
> > >
> > >                 // save as new document
> > >                 pdfDocument.save("test2.pdf");
> > >                 pdfDocument.close();
> > >         }
> > > }
> > >
> > > See http://www.frank-buss.de/tmp/pdfTest.zip for the test.pdf and the
> > > generated test2.pdf. I'm using the latest snapshot
> > > (pdfbox-app-2.0.0-20150418.010411-1224.jar), but the same problem was
> > in a
> > > snapshot from January, too. How can I solve the problem? I can try to
> fix
> > > it in the library, too, if someone can give me a hint where to search.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > > For additional commands, e-mail: users-help@pdfbox.apache.org
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

RE: Euro not set in text field

Posted by Frank Buss <fb...@frank-buss.de>.
When I do this, it prints this exception:

Exception in thread "main" java.lang.IllegalArgumentException: U+8364 is not available in this font's Encoding
	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.encode(PDTrueTypeFont.java:260)
	at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:268)
	at org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:297)
	at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.calculateHorizontalOffset(AppearanceGeneratorHelper.java:564)
	at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.insertGeneratedAppearance(AppearanceGeneratorHelper.java:305)
	at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.createAppearanceContent(AppearanceGeneratorHelper.java:228)
	at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.setAppearanceValue(AppearanceGeneratorHelper.java:203)
	at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGenerator.generateFieldAppearances(AppearanceGenerator.java:61)
	at org.apache.pdfbox.pdmodel.interactive.form.PDField.updateFieldAppearances(PDField.java:121)
	at org.apache.pdfbox.pdmodel.interactive.form.PDTextField.setValue(PDTextField.java:286)
	at PdfTest.main(PdfTest.java:15)

which looks wrong, because as you can see in the the first text field in the sample PDF, it is possible to use the Euro sign, it is part of the Arial font. And I can open Word, set Arial as the font, then type Alt-8364 and the Euro sign appears, so looks like it is part of the font's Encoding.

This bug is a show stopper for my application, because the Euro sign is required for a business application.


> -----Original Message-----
> From: Gilad Denneboom [mailto:gilad.denneboom@gmail.com]
> Sent: Saturday, April 18, 2015 5:39 PM
> To: users@pdfbox.apache.org
> Subject: Re: Euro not set in text field
> 
> Maybe try specifying the unicode value directly, like so:
> test2.setValue("\u8364");
> 
> On Sat, Apr 18, 2015 at 12:57 PM, Frank Buss <fb...@frank-buss.de> wrote:
> 
> > I have a PDF document with a text field and I want to enter an euro symbol
> > (€) with a program, but I'll get a strange character (¬). This is the code:
> >
> > import java.io.*;
> > import org.apache.pdfbox.pdmodel.*;
> > import org.apache.pdfbox.pdmodel.interactive.form.*;
> >
> > public class PdfTest {
> >
> >         public static void main(final String args[]) throws Exception {
> >                 // load test document
> >                 PDDocument pdfDocument = PDDocument.load(new
> > File("test.pdf"));
> >                 PDDocumentCatalog docCatalog =
> > pdfDocument.getDocumentCatalog();
> >                 PDAcroForm acroForm = docCatalog.getAcroForm();
> >
> >                 // get test2 field and set Euro
> >                 PDFieldTreeNode test2 = acroForm.getField("test2");
> >                 test2.setValue("€");
> >
> >                 // save as new document
> >                 pdfDocument.save("test2.pdf");
> >                 pdfDocument.close();
> >         }
> > }
> >
> > See http://www.frank-buss.de/tmp/pdfTest.zip for the test.pdf and the
> > generated test2.pdf. I'm using the latest snapshot
> > (pdfbox-app-2.0.0-20150418.010411-1224.jar), but the same problem was
> in a
> > snapshot from January, too. How can I solve the problem? I can try to fix
> > it in the library, too, if someone can give me a hint where to search.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > For additional commands, e-mail: users-help@pdfbox.apache.org
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Euro not set in text field

Posted by Gilad Denneboom <gi...@gmail.com>.
Maybe try specifying the unicode value directly, like so:
test2.setValue("\u8364");

On Sat, Apr 18, 2015 at 12:57 PM, Frank Buss <fb...@frank-buss.de> wrote:

> I have a PDF document with a text field and I want to enter an euro symbol
> (€) with a program, but I'll get a strange character (¬). This is the code:
>
> import java.io.*;
> import org.apache.pdfbox.pdmodel.*;
> import org.apache.pdfbox.pdmodel.interactive.form.*;
>
> public class PdfTest {
>
>         public static void main(final String args[]) throws Exception {
>                 // load test document
>                 PDDocument pdfDocument = PDDocument.load(new
> File("test.pdf"));
>                 PDDocumentCatalog docCatalog =
> pdfDocument.getDocumentCatalog();
>                 PDAcroForm acroForm = docCatalog.getAcroForm();
>
>                 // get test2 field and set Euro
>                 PDFieldTreeNode test2 = acroForm.getField("test2");
>                 test2.setValue("€");
>
>                 // save as new document
>                 pdfDocument.save("test2.pdf");
>                 pdfDocument.close();
>         }
> }
>
> See http://www.frank-buss.de/tmp/pdfTest.zip for the test.pdf and the
> generated test2.pdf. I'm using the latest snapshot
> (pdfbox-app-2.0.0-20150418.010411-1224.jar), but the same problem was in a
> snapshot from January, too. How can I solve the problem? I can try to fix
> it in the library, too, if someone can give me a hint where to search.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

RE: Euro not set in text field

Posted by Frank Buss <fb...@frank-buss.de>.
I tried it with pdfbox-app-2.0.0-20150425.060522-1249.jar and it works, thanks.


> -----Original Message-----
> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
> Sent: Saturday, April 25, 2015 5:38 AM
> To: users@pdfbox.apache.org
> Subject: Re: Euro not set in text field
> 
> Hi Frank,
> 
> the encoding issue has been fixed in the current trunk - please download the
> latest snapshot build and let us know if it works for you know.
> 
> https://issues.apache.org/jira/browse/PDFBOX-2774
> 
> BR
> Maruan
> 
> > Am 24.04.2015 um 18:40 schrieb Frank Buss <fb...@frank-buss.de>:
> >
> > Thanks. Yes, you can attach the sample files.
> >
> >> -----Original Message-----
> >> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
> >> Sent: Friday, April 24, 2015 6:19 PM
> >> To: users@pdfbox.apache.org
> >> Subject: Re: Euro not set in text field
> >>
> >> using PDTrueTypeFont.encode("€") the error occurs using
> >> PDType0Font.enode("€") the error doesn't happen - I've created an issue
> for
> >> that https://issues.apache.org/jira/browse/PDFBOX-2774. Can we attach
> the
> >> sample files there?
> >>
> >> BR
> >> Maruan
> >>
> >>
> >>> Am 22.04.2015 um 22:23 schrieb Tilman Hausherr <THausherr@t-
> >> online.de>:
> >>>
> >>> Am 18.04.2015 um 12:57 schrieb Frank Buss:
> >>>> I have a PDF document with a text field and I want to enter an euro
> >> symbol (€) with a program, but I'll get a strange character (¬). This is the
> code:
> >>>
> >>> That one has now been fixed... however now the exception mentioned
> in
> >> your second post happens :-(
> >>>
> >>> Tilman
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> >>> For additional commands, e-mail: users-help@pdfbox.apache.org
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> >> For additional commands, e-mail: users-help@pdfbox.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > For additional commands, e-mail: users-help@pdfbox.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Euro not set in text field

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi Frank,

the encoding issue has been fixed in the current trunk - please download the latest snapshot build and let us know if it works for you know.

https://issues.apache.org/jira/browse/PDFBOX-2774

BR
Maruan

> Am 24.04.2015 um 18:40 schrieb Frank Buss <fb...@frank-buss.de>:
> 
> Thanks. Yes, you can attach the sample files.
> 
>> -----Original Message-----
>> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
>> Sent: Friday, April 24, 2015 6:19 PM
>> To: users@pdfbox.apache.org
>> Subject: Re: Euro not set in text field
>> 
>> using PDTrueTypeFont.encode("€") the error occurs using
>> PDType0Font.enode("€") the error doesn't happen - I've created an issue for
>> that https://issues.apache.org/jira/browse/PDFBOX-2774. Can we attach the
>> sample files there?
>> 
>> BR
>> Maruan
>> 
>> 
>>> Am 22.04.2015 um 22:23 schrieb Tilman Hausherr <THausherr@t-
>> online.de>:
>>> 
>>> Am 18.04.2015 um 12:57 schrieb Frank Buss:
>>>> I have a PDF document with a text field and I want to enter an euro
>> symbol (€) with a program, but I'll get a strange character (¬). This is the code:
>>> 
>>> That one has now been fixed... however now the exception mentioned in
>> your second post happens :-(
>>> 
>>> Tilman
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


RE: Euro not set in text field

Posted by Frank Buss <fb...@frank-buss.de>.
Thanks. Yes, you can attach the sample files.

> -----Original Message-----
> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
> Sent: Friday, April 24, 2015 6:19 PM
> To: users@pdfbox.apache.org
> Subject: Re: Euro not set in text field
> 
> using PDTrueTypeFont.encode("€") the error occurs using
> PDType0Font.enode("€") the error doesn't happen - I've created an issue for
> that https://issues.apache.org/jira/browse/PDFBOX-2774. Can we attach the
> sample files there?
> 
> BR
> Maruan
> 
> 
> > Am 22.04.2015 um 22:23 schrieb Tilman Hausherr <THausherr@t-
> online.de>:
> >
> > Am 18.04.2015 um 12:57 schrieb Frank Buss:
> >> I have a PDF document with a text field and I want to enter an euro
> symbol (€) with a program, but I'll get a strange character (¬). This is the code:
> >
> > That one has now been fixed... however now the exception mentioned in
> your second post happens :-(
> >
> > Tilman
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > For additional commands, e-mail: users-help@pdfbox.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Euro not set in text field

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
using PDTrueTypeFont.encode("€") the error occurs using PDType0Font.enode("€") the error doesn't happen - I've created an issue for that https://issues.apache.org/jira/browse/PDFBOX-2774. Can we attach the sample files there?

BR
Maruan


> Am 22.04.2015 um 22:23 schrieb Tilman Hausherr <TH...@t-online.de>:
> 
> Am 18.04.2015 um 12:57 schrieb Frank Buss:
>> I have a PDF document with a text field and I want to enter an euro symbol (€) with a program, but I'll get a strange character (¬). This is the code:
> 
> That one has now been fixed... however now the exception mentioned in your second post happens :-(
> 
> Tilman
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Euro not set in text field

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,
> Am 22.04.2015 um 22:23 schrieb Tilman Hausherr <TH...@t-online.de>:
> 
> Am 18.04.2015 um 12:57 schrieb Frank Buss:
>> I have a PDF document with a text field and I want to enter an euro symbol (€) with a program, but I'll get a strange character (¬). This is the code:
> 
> That one has now been fixed... however now the exception mentioned in your second post happens :-(

Unfortunately yes - although looking at the embedded font (using FontForge) the EURO sign seems to be in there with the correct char code

Maruan

> 
> Tilman
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Euro not set in text field

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 18.04.2015 um 12:57 schrieb Frank Buss:
> I have a PDF document with a text field and I want to enter an euro symbol (€) with a program, but I'll get a strange character (¬). This is the code:

That one has now been fixed... however now the exception mentioned in 
your second post happens :-(

Tilman



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org