You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Aaron Mulder <am...@gmail.com> on 2016/09/01 15:08:35 UTC

Copyright/Registered symbols in appearance stream

I'm having trouble emitting a copyright (C) or registered trademark
(R) sign in an appearance stream using the built-in Helvetica font.

Here's what I'm trying:

/Tx BMC
q
BT
/Helv 10 Tf
1 2.42 Td
12 TL
(\256\251This is a test) Tj
ET
Q
EMC

with /Helv defined as:

/Helv << /Type /Font /Subtype /Type1 /BaseFont /Helvetica >>

What I get when I view the PDF appears to be the "fi" ligature (octal
223?) followed by some sort of straight single quote (not sure what
that one is) and then the regular text.  I'm going blind reading
appendix D where it says that the symbols I want are octal 251 and 256
in Latin1 and PDFDocEncoding, and I thought that would translate
directly to the built-in fonts.

Any idea what I'm doing wrong?

Thanks,
      Aaron

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


Re: Copyright/Registered symbols in appearance stream

Posted by John Hewson <jo...@jahewson.com>.
> On 1 Sep 2016, at 08:50, Aaron Mulder <am...@gmail.com> wrote:
> 
> Never mind.  Kept plugging away and it seems that if I specify an
> encoding for the font then I can get the characters to show.  It looks
> like the StandardEncoding doesn't include the symbols in question.
> 
> /Helv << /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding
> /MacRomanEncoding >>

I’d recommend using WinAnsiEncoding, as it has fewer surprises.

— John

> Thanks,
>      Aaron
> 
> On Thu, Sep 1, 2016 at 11:08 AM, Aaron Mulder <am...@gmail.com> wrote:
>> I'm having trouble emitting a copyright (C) or registered trademark
>> (R) sign in an appearance stream using the built-in Helvetica font.
>> 
>> Here's what I'm trying:
>> 
>> /Tx BMC
>> q
>> BT
>> /Helv 10 Tf
>> 1 2.42 Td
>> 12 TL
>> (\256\251This is a test) Tj
>> ET
>> Q
>> EMC
>> 
>> with /Helv defined as:
>> 
>> /Helv << /Type /Font /Subtype /Type1 /BaseFont /Helvetica >>
>> 
>> What I get when I view the PDF appears to be the "fi" ligature (octal
>> 223?) followed by some sort of straight single quote (not sure what
>> that one is) and then the regular text.  I'm going blind reading
>> appendix D where it says that the symbols I want are octal 251 and 256
>> in Latin1 and PDFDocEncoding, and I thought that would translate
>> directly to the built-in fonts.
>> 
>> Any idea what I'm doing wrong?
>> 
>> Thanks,
>>      Aaron
> 
> ---------------------------------------------------------------------
> 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: Copyright/Registered symbols in appearance stream

Posted by Aaron Mulder <am...@gmail.com>.
Never mind.  Kept plugging away and it seems that if I specify an
encoding for the font then I can get the characters to show.  It looks
like the StandardEncoding doesn't include the symbols in question.

/Helv << /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding
/MacRomanEncoding >>

Thanks,
      Aaron

On Thu, Sep 1, 2016 at 11:08 AM, Aaron Mulder <am...@gmail.com> wrote:
> I'm having trouble emitting a copyright (C) or registered trademark
> (R) sign in an appearance stream using the built-in Helvetica font.
>
> Here's what I'm trying:
>
> /Tx BMC
> q
> BT
> /Helv 10 Tf
> 1 2.42 Td
> 12 TL
> (\256\251This is a test) Tj
> ET
> Q
> EMC
>
> with /Helv defined as:
>
> /Helv << /Type /Font /Subtype /Type1 /BaseFont /Helvetica >>
>
> What I get when I view the PDF appears to be the "fi" ligature (octal
> 223?) followed by some sort of straight single quote (not sure what
> that one is) and then the regular text.  I'm going blind reading
> appendix D where it says that the symbols I want are octal 251 and 256
> in Latin1 and PDFDocEncoding, and I thought that would translate
> directly to the built-in fonts.
>
> Any idea what I'm doing wrong?
>
> Thanks,
>       Aaron

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