OS/2, eCS & ArcaOS - Technical > Applications

GS adding text to pdf's

(1/3) > >>

Per E. Johannessen:
Hi,

I'm using gsos2 to add text to pdf-files and it has worked fine until I had to insert some special Norwegian characters.
Instead of inserting the characters æ, ø and å it creates blank spaces. (The ps-file that gsos2 uses for adding the text
shows the special characters correctly.)
The third line in the attached test.pdf is added by gsos2, should be identical to the first word in line 1 but three special
characters are missing.

Ideas anyone?

Dariusz Piatkowski:
Your PDF file shows:

1) Times-Roman as 'Not embedded'
2) NimbusSanL-Bold as 'Embedded subset'

Do you know which font the special characters are coming from?

What is your input file to create this PDF with? If you have it handy I can give it a try here and pipe it through gs9.18 to compare the results...

Per E. Johannessen:
According to source.ps they should come from NimbusSanL-Bold.

Did some more tests with a new pdf, but still the same problem.

The files I'm using are attached.

source.pdf
source.ps - had to rename it to source.txt since *.ps is cannot be uploaded
result.pdf

Using following command:
gsos2 -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=result.pdf source.ps -f source.pdf

Thomas Fauster:
The problem is not OS/2 related. The example gives the same result on Linux.
To get it to work, you have to write the special characters as octal escape sequencies: Blab\361rsyltet\371y
However "å" (aring) is not in the standard encoding vector. The solution would be to reencode the font (see Postscript green book).
With a properly reencoded font you may use the standard keyboard encoding of your system, but it might not work on other systems.
/NimbusSanL-Bold is the Ghostscript replacement for the Postscript standard font Helvetica-Bold.

Per E. Johannessen:
Thanks, when using \361 and \371 I get the correct characters.
Found a table with octal codes for "Standard+" and it shows \375 for "Å" and \376 for "å", unfortunately GS produces blank spaces with these codes.
Any suggestions for an application that can be used for "opening" the font file to see how it's coded and possibly reencode it?

Navigation

[0] Message Index

[#] Next page

Go to full version