Re: Encoding problem with one specific letter and postscript

2014-10-30 Thread Luis Bernardo
I do get the behavior you describe if I use the arial font file you
provided but I get a different result if I use an arial font file from my
system. I do still get the problem with copy and paste from PDF, but all
characters are correctly displayed in the PDF (converted from PS with
ps2pdf). I suggest you try different Arial fonts since that seems to impact
the result.

On Tue, Oct 28, 2014 at 6:18 PM, Lembit Gerz  wrote:

> Hi Chris
>
> Thank you for your reply. Unfortunately, the problem persists. I have
> attatched a minimal set of files to reproduce the problem.
> Here's what I did:
> Downloaded the trunk version and ran "ant all".
> Placed the contents of fopp.zip to the fop root directory.
> Ran "fop -xml name.xml -xsl name2fo.xsl -ps name.ps -c fop-config.xml"
> Ran "ps2pdf name.ps name.pdf"
> I also tried with ohter fonts like Verdana and Times New Roman, but the
> two problematic letters still appear as boxes.
> If I remove the "single-byte" encoding, all the letters are displayed
> correctly, but then I cannot copy any of the Lithuanian letters from the
> PDF.
>
>
>
> Thanks,
>
> Lembit
>
>
> -Original Message-
> From: Chris Bowditch [mailto:[email protected]]
> Sent: 27. oktoober 2014. a. 18:21
> To: [email protected]
> Subject: Re: Encoding problem with one specific letter and postscript
>
> Hi Lembit,
>
> Sorry for slow reply, I've been on holiday. You really need to add
>
> true
>
> element to your fop.xconf file in the Postscript Renderer section.
> Without that FOP can't accurately judge which characters can be subset or
> not.
>
> Adding encoding-mode attribute will circumvent the subset issue because it
> will embed up to 256 characters, but since you are using a wide range of
> characters that probably isn't enough.
>
> I also recommend testing the Trunk version if that doesn't resolve your
> issue, since a lot of bugs have been fixed since v1.1 was released.
>
> Thanks,
>
> Chris
>
> On 12/10/2014 20:16, Lembit Gerz wrote:
> >
> > Hello,
> >
> > I am using FOP 1.1 to generate postscript files with embedded fonts.
> > Later I’m using ps2pdf to convert the postscript files to pdfs. The
> > text includes Lithuanian letters.
> >
> > However, after coverting them to pdf, two specific letters are
> > displayed as squares, all the ohter Lituhuanian letters are displayed
> > correctly. The problematic letters are the upper- and lowercase
> > letters ė and Ė (e with dot, 0116 and 0117 in unicode). I can copy all
> > the letters from the pdf (including the two problematic ones – when
> > copying the square and pasting it somewhere, it displays the letter
> > correctly).
> >
> > I am using the standard Arial font from Windows fonts (arial.ttf).
> >
> > This is my fop-config.xml:
> >
> > 
> >
> > 
> >
> > 
> >
> > true
> >
> >
> >
> > > encoding-mode="single-byte">
> >
> > > weight="normal"/>
> >
> >
> >
> >
> >
> > 
> >
> > 
> >
> > 
> >
> > When leaving out the encoding-mode=“single-byte“, the letters display
> > correctly, but when copying from the pdf, I get gibberish.
> >
> > When generating straight to pdf with FOP, everything is displayed
> > correctly and copying is also possible.
> >
> > I have tried other ps->pdf converters and they give the same result.
> >
> > Using a metric file did not help.
> >
> > The problem can be reproduced with the xml and xslt in the fop quick
> > start guide (https://xmlgraphics.apache.org/fop/quickstartguide.html)
> > with these modifications:
> >
> > Set the name in name.xml to ABC14pąęčėųūĘĖŲČĄ.
> >
> > Add the attribute font-familiy=“Arial“ to the fo:block in name2fo.xsl.
> >
> > Use the above fop-config file and include the standard Arial font in
> > FOP’s directory.
> >
> > Run ’fop -xml name.xml -xsl name2fo.xsl -ps name.ps -c fop-config.xml’
> >
> > Can anyone suggest, what could be the issue or how should I go about
> > debugging this?
> >
> > Thank You.
> >
> > Lembit
> >
>
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>


Re: Encoding problem with one specific letter and postscript

2014-10-27 Thread Chris Bowditch

Hi Lembit,

Sorry for slow reply, I've been on holiday. You really need to add

true

element to your fop.xconf file in the Postscript Renderer section. 
Without that FOP can't accurately judge which characters can be subset 
or not.


Adding encoding-mode attribute will circumvent the subset issue because 
it will embed up to 256 characters, but since you are using a wide range 
of characters that probably isn't enough.


I also recommend testing the Trunk version if that doesn't resolve your 
issue, since a lot of bugs have been fixed since v1.1 was released.


Thanks,

Chris

On 12/10/2014 20:16, Lembit Gerz wrote:


Hello,

I am using FOP 1.1 to generate postscript files with embedded fonts. 
Later I’m using ps2pdf to convert the postscript files to pdfs. The 
text includes Lithuanian letters.


However, after coverting them to pdf, two specific letters are 
displayed as squares, all the ohter Lituhuanian letters are displayed 
correctly. The problematic letters are the upper- and lowercase 
letters ė and Ė (e with dot, 0116 and 0117 in unicode). I can copy all 
the letters from the pdf (including the two problematic ones – when 
copying the square and pasting it somewhere, it displays the letter 
correctly).


I am using the standard Arial font from Windows fonts (arial.ttf).

This is my fop-config.xml:







true

   

   

   weight="normal"/>


   

   







When leaving out the encoding-mode=“single-byte“, the letters display 
correctly, but when copying from the pdf, I get gibberish.


When generating straight to pdf with FOP, everything is displayed 
correctly and copying is also possible.


I have tried other ps->pdf converters and they give the same result.

Using a metric file did not help.

The problem can be reproduced with the xml and xslt in the fop quick 
start guide (https://xmlgraphics.apache.org/fop/quickstartguide.html) 
with these modifications:


Set the name in name.xml to ABC14pąęčėųūĘĖŲČĄ.

Add the attribute font-familiy=“Arial“ to the fo:block in name2fo.xsl.

Use the above fop-config file and include the standard Arial font in 
FOP’s directory.


Run ’fop -xml name.xml -xsl name2fo.xsl -ps name.ps -c fop-config.xml’

Can anyone suggest, what could be the issue or how should I go about 
debugging this?


Thank You.

Lembit




-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



RE: Encoding problem with one specific letter and postscript

2014-10-15 Thread Lembit Gerz
Jakab, thanks for the tip, I will look into it when the time comes to refactor 
the current solution.
Unfortunately, it’s not an option at the moment due to the fact that I don’t 
have the resources to migrate every PDF generation to the new solution.
Does anyone have an idea how to solve this – is this a FOP bug or is there 
something wrong with my configuration?


From: Jakab Gipsz [mailto:[email protected]]
Sent: 13. oktoober 2014. a. 10:16
To: [email protected]
Subject: Re: Encoding problem with one specific letter and postscript

Hi,

You may can use the following strategy for generating watermarked PDF:
1. Generate Intermediate Format (IF) from yous fo/xslt.
2. Generate PDF from IF combined with another XSLT, which can put watermarks 
into the document.

I use this solution with good result.

You can find a good example for IF stampling in FOP 1.1 examples.

Bye, Szeak

2014-10-13 2:01 GMT+02:00 Lembit Gerz 
mailto:[email protected]>>:
I’ve included the 3 files including the fop-config.xml used to generate them in 
the attatchment. If for some reason this does not work, the same files can also 
be found here: https://www.dropbox.com/s/41x8so9swkuevjc/fopp.zip?dl=0


From: Glenn Adams [mailto:[email protected]<mailto:[email protected]>]
Sent: 13. oktoober 2014. a. 0:08

To: FOP Users
Subject: Re: Encoding problem with one specific letter and postscript

You should provide the following:

  *   maximally minimal input FO file (XML/XSLT input files are irrelevant)
  *   the output PS file you obtain (when producing PS directly)
  *   the output PDF file you obtain (when producing PDF directly)

On Sun, Oct 12, 2014 at 2:09 PM, Lembit Gerz 
mailto:[email protected]>> wrote:
No, if I generate the PDF directly using the same data and font file, then all 
the letters are displayed correctly and copying from the PDF is also possible.


From: Glenn Adams [mailto:[email protected]<mailto:[email protected]>]
Sent: 12. oktoober 2014. a. 23:03

To: FOP Users
Subject: Re: Encoding problem with one specific letter and postscript

If you do try the same data using FOP generating PDF directly, then does the 
problem occur?

On Sun, Oct 12, 2014 at 1:42 PM, Lembit Gerz 
mailto:[email protected]>> wrote:
To add watermarks or other transformations to the document.
The current  setup is the following: generate postscript -> apply an awk skript 
to the ps, that for example adds a watermark -> convert the ps to pdf.
I know it might be a hacky solution, but unfortunately changing this setup is 
currently out of the question.

From: Glenn Adams [mailto:[email protected]<mailto:[email protected]>]
Sent: 12. oktoober 2014. a. 22:31
To: FOP Users
Subject: Re: Encoding problem with one specific letter and postscript

Why aren't generating PDF directly from FOP?

On Sun, Oct 12, 2014 at 1:16 PM, Lembit Gerz 
mailto:[email protected]>> wrote:
Hello,

I am using FOP 1.1 to generate postscript files with embedded fonts. Later I’m 
using ps2pdf to convert the postscript files to pdfs. The text includes 
Lithuanian letters.
However, after coverting them to pdf, two specific letters are displayed as 
squares, all the ohter Lituhuanian letters are displayed correctly. The 
problematic letters are the upper- and lowercase letters ė and Ė (e with dot, 
0116 and 0117 in unicode). I can copy all the letters from the pdf (including 
the two problematic ones – when copying the square and pasting it somewhere, it 
displays the letter correctly).
I am using the standard Arial font from Windows fonts (arial.ttf).
This is my fop-config.xml:



   true
   
   
   
   
   




When leaving out the encoding-mode=“single-byte“, the letters display 
correctly, but when copying from the pdf, I get gibberish.
When generating straight to pdf with FOP, everything is displayed correctly and 
copying is also possible.
I have tried other ps->pdf converters and they give the same result.
Using a metric file did not help.

The problem can be reproduced with the xml and xslt in the fop quick start 
guide (https://xmlgraphics.apache.org/fop/quickstartguide.html) with these 
modifications:
Set the name in name.xml to ABC14pąęčėųūĘĖŲČĄ.
Add the attribute font-familiy=“Arial“ to the fo:block in name2fo.xsl.
Use the above fop-config file and include the standard Arial font in FOP’s 
directory.
Run ’fop -xml name.xml -xsl name2fo.xsl -ps name.ps<http://name.ps> -c 
fop-config.xml’

Can anyone suggest, what could be the issue or how should I go about debugging 
this?
Thank You.


Lembit






-
To unsubscribe, e-mail: 
[email protected]<mailto:[email protected]>
For additional commands, e-mail: 
[email protected]<mailto:[email protected]>



Re: Encoding problem with one specific letter and postscript

2014-10-13 Thread Jakab Gipsz
Hi,

You may can use the following strategy for generating watermarked PDF:
1. Generate Intermediate Format (IF) from yous fo/xslt.
2. Generate PDF from IF combined with another XSLT, which can put
watermarks into the document.

I use this solution with good result.

You can find a good example for IF stampling in FOP 1.1 examples.

Bye, Szeak

2014-10-13 2:01 GMT+02:00 Lembit Gerz :

>  I’ve included the 3 files including the fop-config.xml used to generate
> them in the attatchment. If for some reason this does not work, the same
> files can also be found here:
> https://www.dropbox.com/s/41x8so9swkuevjc/fopp.zip?dl=0
>
>
>
>
>
> *From:* Glenn Adams [mailto:[email protected]]
> *Sent:* 13. oktoober 2014. a. 0:08
>
> *To:* FOP Users
> *Subject:* Re: Encoding problem with one specific letter and postscript
>
>
>
> You should provide the following:
>
>- maximally minimal input FO file (XML/XSLT input files are irrelevant)
>- the output PS file you obtain (when producing PS directly)
>- the output PDF file you obtain (when producing PDF directly)
>
>
>
> On Sun, Oct 12, 2014 at 2:09 PM, Lembit Gerz 
> wrote:
>
> No, if I generate the PDF directly using the same data and font file, then
> all the letters are displayed correctly and copying from the PDF is also
> possible.
>
>
>
>
>
> *From:* Glenn Adams [mailto:[email protected]]
> *Sent:* 12. oktoober 2014. a. 23:03
>
>
> *To:* FOP Users
> *Subject:* Re: Encoding problem with one specific letter and postscript
>
>
>
> If you do try the same data using FOP generating PDF directly, then does
> the problem occur?
>
>
>
> On Sun, Oct 12, 2014 at 1:42 PM, Lembit Gerz 
> wrote:
>
> To add watermarks or other transformations to the document.
>
> The current  setup is the following: generate postscript -> apply an awk
> skript to the ps, that for example adds a watermark -> convert the ps to
> pdf.
>
> I know it might be a hacky solution, but unfortunately changing this setup
> is currently out of the question.
>
>
>
> *From:* Glenn Adams [mailto:[email protected]]
> *Sent:* 12. oktoober 2014. a. 22:31
> *To:* FOP Users
> *Subject:* Re: Encoding problem with one specific letter and postscript
>
>
>
> Why aren't generating PDF directly from FOP?
>
>
>
> On Sun, Oct 12, 2014 at 1:16 PM, Lembit Gerz 
> wrote:
>
> Hello,
>
>
>
> I am using FOP 1.1 to generate postscript files with embedded fonts. Later
> I’m using ps2pdf to convert the postscript files to pdfs. The text includes
> Lithuanian letters.
>
> However, after coverting them to pdf, two specific letters are displayed
> as squares, all the ohter Lituhuanian letters are displayed correctly. The
> problematic letters are the upper- and lowercase letters ė and Ė (e with
> dot, 0116 and 0117 in unicode). I can copy all the letters from the pdf
> (including the two problematic ones – when copying the square and pasting
> it somewhere, it displays the letter correctly).
>
> I am using the standard Arial font from Windows fonts (arial.ttf).
>
> This is my fop-config.xml:
>
> 
>
> 
>
> 
>
>true
>
>
>
>
>
> weight="normal"/>
>
>
>
>
>
> 
>
> 
>
> 
>
>
>
> When leaving out the encoding-mode=“single-byte“, the letters display
> correctly, but when copying from the pdf, I get gibberish.
>
> When generating straight to pdf with FOP, everything is displayed
> correctly and copying is also possible.
>
> I have tried other ps->pdf converters and they give the same result.
>
> Using a metric file did not help.
>
>
>
> The problem can be reproduced with the xml and xslt in the fop quick start
> guide (https://xmlgraphics.apache.org/fop/quickstartguide.html) with
> these modifications:
>
> Set the name in name.xml to ABC14pąęčėųūĘĖŲČĄ.
>
> Add the attribute font-familiy=“Arial“ to the fo:block in name2fo.xsl.
>
> Use the above fop-config file and include the standard Arial font in FOP’s
> directory.
>
> Run ’fop -xml name.xml -xsl name2fo.xsl -ps name.ps -c fop-config.xml’
>
>
>
> Can anyone suggest, what could be the issue or how should I go about
> debugging this?
>
> Thank You.
>
>
>
>
>
> Lembit
>
>
>
>
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>


Re: Encoding problem with one specific letter and postscript

2014-10-12 Thread Glenn Adams
You should provide the following:

   - maximally minimal input FO file (XML/XSLT input files are irrelevant)
   - the output PS file you obtain (when producing PS directly)
   - the output PDF file you obtain (when producing PDF directly)


On Sun, Oct 12, 2014 at 2:09 PM, Lembit Gerz  wrote:

>  No, if I generate the PDF directly using the same data and font file,
> then all the letters are displayed correctly and copying from the PDF is
> also possible.
>
>
>
>
>
> *From:* Glenn Adams [mailto:[email protected]]
> *Sent:* 12. oktoober 2014. a. 23:03
>
> *To:* FOP Users
> *Subject:* Re: Encoding problem with one specific letter and postscript
>
>
>
> If you do try the same data using FOP generating PDF directly, then does
> the problem occur?
>
>
>
> On Sun, Oct 12, 2014 at 1:42 PM, Lembit Gerz 
> wrote:
>
> To add watermarks or other transformations to the document.
>
> The current  setup is the following: generate postscript -> apply an awk
> skript to the ps, that for example adds a watermark -> convert the ps to
> pdf.
>
> I know it might be a hacky solution, but unfortunately changing this setup
> is currently out of the question.
>
>
>
> *From:* Glenn Adams [mailto:[email protected]]
> *Sent:* 12. oktoober 2014. a. 22:31
> *To:* FOP Users
> *Subject:* Re: Encoding problem with one specific letter and postscript
>
>
>
> Why aren't generating PDF directly from FOP?
>
>
>
> On Sun, Oct 12, 2014 at 1:16 PM, Lembit Gerz 
> wrote:
>
> Hello,
>
>
>
> I am using FOP 1.1 to generate postscript files with embedded fonts. Later
> I’m using ps2pdf to convert the postscript files to pdfs. The text includes
> Lithuanian letters.
>
> However, after coverting them to pdf, two specific letters are displayed
> as squares, all the ohter Lituhuanian letters are displayed correctly. The
> problematic letters are the upper- and lowercase letters ė and Ė (e with
> dot, 0116 and 0117 in unicode). I can copy all the letters from the pdf
> (including the two problematic ones – when copying the square and pasting
> it somewhere, it displays the letter correctly).
>
> I am using the standard Arial font from Windows fonts (arial.ttf).
>
> This is my fop-config.xml:
>
> 
>
> 
>
> 
>
>true
>
>
>
>
>
> weight="normal"/>
>
>
>
>
>
> 
>
> 
>
> 
>
>
>
> When leaving out the encoding-mode=“single-byte“, the letters display
> correctly, but when copying from the pdf, I get gibberish.
>
> When generating straight to pdf with FOP, everything is displayed
> correctly and copying is also possible.
>
> I have tried other ps->pdf converters and they give the same result.
>
> Using a metric file did not help.
>
>
>
> The problem can be reproduced with the xml and xslt in the fop quick start
> guide (https://xmlgraphics.apache.org/fop/quickstartguide.html) with
> these modifications:
>
> Set the name in name.xml to ABC14pąęčėųūĘĖŲČĄ.
>
> Add the attribute font-familiy=“Arial“ to the fo:block in name2fo.xsl.
>
> Use the above fop-config file and include the standard Arial font in FOP’s
> directory.
>
> Run ’fop -xml name.xml -xsl name2fo.xsl -ps name.ps -c fop-config.xml’
>
>
>
> Can anyone suggest, what could be the issue or how should I go about
> debugging this?
>
> Thank You.
>
>
>
>
>
> Lembit
>
>
>
>
>
>
>


RE: Encoding problem with one specific letter and postscript

2014-10-12 Thread Lembit Gerz
No, if I generate the PDF directly using the same data and font file, then all 
the letters are displayed correctly and copying from the PDF is also possible.


From: Glenn Adams [mailto:[email protected]]
Sent: 12. oktoober 2014. a. 23:03
To: FOP Users
Subject: Re: Encoding problem with one specific letter and postscript

If you do try the same data using FOP generating PDF directly, then does the 
problem occur?

On Sun, Oct 12, 2014 at 1:42 PM, Lembit Gerz 
mailto:[email protected]>> wrote:
To add watermarks or other transformations to the document.
The current  setup is the following: generate postscript -> apply an awk skript 
to the ps, that for example adds a watermark -> convert the ps to pdf.
I know it might be a hacky solution, but unfortunately changing this setup is 
currently out of the question.

From: Glenn Adams [mailto:[email protected]<mailto:[email protected]>]
Sent: 12. oktoober 2014. a. 22:31
To: FOP Users
Subject: Re: Encoding problem with one specific letter and postscript

Why aren't generating PDF directly from FOP?

On Sun, Oct 12, 2014 at 1:16 PM, Lembit Gerz 
mailto:[email protected]>> wrote:
Hello,

I am using FOP 1.1 to generate postscript files with embedded fonts. Later I’m 
using ps2pdf to convert the postscript files to pdfs. The text includes 
Lithuanian letters.
However, after coverting them to pdf, two specific letters are displayed as 
squares, all the ohter Lituhuanian letters are displayed correctly. The 
problematic letters are the upper- and lowercase letters ė and Ė (e with dot, 
0116 and 0117 in unicode). I can copy all the letters from the pdf (including 
the two problematic ones – when copying the square and pasting it somewhere, it 
displays the letter correctly).
I am using the standard Arial font from Windows fonts (arial.ttf).
This is my fop-config.xml:



   true
   
   
   
   
   




When leaving out the encoding-mode=“single-byte“, the letters display 
correctly, but when copying from the pdf, I get gibberish.
When generating straight to pdf with FOP, everything is displayed correctly and 
copying is also possible.
I have tried other ps->pdf converters and they give the same result.
Using a metric file did not help.

The problem can be reproduced with the xml and xslt in the fop quick start 
guide (https://xmlgraphics.apache.org/fop/quickstartguide.html) with these 
modifications:
Set the name in name.xml to ABC14pąęčėųūĘĖŲČĄ.
Add the attribute font-familiy=“Arial“ to the fo:block in name2fo.xsl.
Use the above fop-config file and include the standard Arial font in FOP’s 
directory.
Run ’fop -xml name.xml -xsl name2fo.xsl -ps name.ps<http://name.ps> -c 
fop-config.xml’

Can anyone suggest, what could be the issue or how should I go about debugging 
this?
Thank You.


Lembit





Re: Encoding problem with one specific letter and postscript

2014-10-12 Thread Glenn Adams
If you do try the same data using FOP generating PDF directly, then does
the problem occur?

On Sun, Oct 12, 2014 at 1:42 PM, Lembit Gerz  wrote:

>  To add watermarks or other transformations to the document.
>
> The current  setup is the following: generate postscript -> apply an awk
> skript to the ps, that for example adds a watermark -> convert the ps to
> pdf.
>
> I know it might be a hacky solution, but unfortunately changing this setup
> is currently out of the question.
>
>
>
> *From:* Glenn Adams [mailto:[email protected]]
> *Sent:* 12. oktoober 2014. a. 22:31
> *To:* FOP Users
> *Subject:* Re: Encoding problem with one specific letter and postscript
>
>
>
> Why aren't generating PDF directly from FOP?
>
>
>
> On Sun, Oct 12, 2014 at 1:16 PM, Lembit Gerz 
> wrote:
>
> Hello,
>
>
>
> I am using FOP 1.1 to generate postscript files with embedded fonts. Later
> I’m using ps2pdf to convert the postscript files to pdfs. The text includes
> Lithuanian letters.
>
> However, after coverting them to pdf, two specific letters are displayed
> as squares, all the ohter Lituhuanian letters are displayed correctly. The
> problematic letters are the upper- and lowercase letters ė and Ė (e with
> dot, 0116 and 0117 in unicode). I can copy all the letters from the pdf
> (including the two problematic ones – when copying the square and pasting
> it somewhere, it displays the letter correctly).
>
> I am using the standard Arial font from Windows fonts (arial.ttf).
>
> This is my fop-config.xml:
>
> 
>
> 
>
> 
>
>true
>
>
>
>
>
> weight="normal"/>
>
>
>
>
>
> 
>
> 
>
> 
>
>
>
> When leaving out the encoding-mode=“single-byte“, the letters display
> correctly, but when copying from the pdf, I get gibberish.
>
> When generating straight to pdf with FOP, everything is displayed
> correctly and copying is also possible.
>
> I have tried other ps->pdf converters and they give the same result.
>
> Using a metric file did not help.
>
>
>
> The problem can be reproduced with the xml and xslt in the fop quick start
> guide (https://xmlgraphics.apache.org/fop/quickstartguide.html) with
> these modifications:
>
> Set the name in name.xml to ABC14pąęčėųūĘĖŲČĄ.
>
> Add the attribute font-familiy=“Arial“ to the fo:block in name2fo.xsl.
>
> Use the above fop-config file and include the standard Arial font in FOP’s
> directory.
>
> Run ’fop -xml name.xml -xsl name2fo.xsl -ps name.ps -c fop-config.xml’
>
>
>
> Can anyone suggest, what could be the issue or how should I go about
> debugging this?
>
> Thank You.
>
>
>
>
>
> Lembit
>
>
>
>
>


RE: Encoding problem with one specific letter and postscript

2014-10-12 Thread Lembit Gerz
To add watermarks or other transformations to the document.
The current  setup is the following: generate postscript -> apply an awk skript 
to the ps, that for example adds a watermark -> convert the ps to pdf.
I know it might be a hacky solution, but unfortunately changing this setup is 
currently out of the question.

From: Glenn Adams [mailto:[email protected]]
Sent: 12. oktoober 2014. a. 22:31
To: FOP Users
Subject: Re: Encoding problem with one specific letter and postscript

Why aren't generating PDF directly from FOP?

On Sun, Oct 12, 2014 at 1:16 PM, Lembit Gerz 
mailto:[email protected]>> wrote:
Hello,

I am using FOP 1.1 to generate postscript files with embedded fonts. Later I’m 
using ps2pdf to convert the postscript files to pdfs. The text includes 
Lithuanian letters.
However, after coverting them to pdf, two specific letters are displayed as 
squares, all the ohter Lituhuanian letters are displayed correctly. The 
problematic letters are the upper- and lowercase letters ė and Ė (e with dot, 
0116 and 0117 in unicode). I can copy all the letters from the pdf (including 
the two problematic ones – when copying the square and pasting it somewhere, it 
displays the letter correctly).
I am using the standard Arial font from Windows fonts (arial.ttf).
This is my fop-config.xml:



   true
   
   
   
   
   




When leaving out the encoding-mode=“single-byte“, the letters display 
correctly, but when copying from the pdf, I get gibberish.
When generating straight to pdf with FOP, everything is displayed correctly and 
copying is also possible.
I have tried other ps->pdf converters and they give the same result.
Using a metric file did not help.

The problem can be reproduced with the xml and xslt in the fop quick start 
guide (https://xmlgraphics.apache.org/fop/quickstartguide.html) with these 
modifications:
Set the name in name.xml to ABC14pąęčėųūĘĖŲČĄ.
Add the attribute font-familiy=“Arial“ to the fo:block in name2fo.xsl.
Use the above fop-config file and include the standard Arial font in FOP’s 
directory.
Run ’fop -xml name.xml -xsl name2fo.xsl -ps name.ps<http://name.ps> -c 
fop-config.xml’

Can anyone suggest, what could be the issue or how should I go about debugging 
this?
Thank You.


Lembit




Re: Encoding problem with one specific letter and postscript

2014-10-12 Thread Glenn Adams
Why aren't generating PDF directly from FOP?

On Sun, Oct 12, 2014 at 1:16 PM, Lembit Gerz  wrote:

>  Hello,
>
>
>
> I am using FOP 1.1 to generate postscript files with embedded fonts. Later
> I’m using ps2pdf to convert the postscript files to pdfs. The text includes
> Lithuanian letters.
>
> However, after coverting them to pdf, two specific letters are displayed
> as squares, all the ohter Lituhuanian letters are displayed correctly. The
> problematic letters are the upper- and lowercase letters ė and Ė (e with
> dot, 0116 and 0117 in unicode). I can copy all the letters from the pdf
> (including the two problematic ones – when copying the square and pasting
> it somewhere, it displays the letter correctly).
>
> I am using the standard Arial font from Windows fonts (arial.ttf).
>
> This is my fop-config.xml:
>
> 
>
> 
>
> 
>
>true
>
>
>
>
>
> weight="normal"/>
>
>
>
>
>
> 
>
> 
>
> 
>
>
>
> When leaving out the encoding-mode=“single-byte“, the letters display
> correctly, but when copying from the pdf, I get gibberish.
>
> When generating straight to pdf with FOP, everything is displayed
> correctly and copying is also possible.
>
> I have tried other ps->pdf converters and they give the same result.
>
> Using a metric file did not help.
>
>
>
> The problem can be reproduced with the xml and xslt in the fop quick start
> guide (https://xmlgraphics.apache.org/fop/quickstartguide.html) with
> these modifications:
>
> Set the name in name.xml to ABC14pąęčėųūĘĖŲČĄ.
>
> Add the attribute font-familiy=“Arial“ to the fo:block in name2fo.xsl.
>
> Use the above fop-config file and include the standard Arial font in FOP’s
> directory.
>
> Run ’fop -xml name.xml -xsl name2fo.xsl -ps name.ps -c fop-config.xml’
>
>
>
> Can anyone suggest, what could be the issue or how should I go about
> debugging this?
>
> Thank You.
>
>
>
>
>
> Lembit
>
>
>