PDF Font encoding issue

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

PDF Font encoding issue

Rick Draper-2
Hi All,

I am running into an issue with encoding fonts in a PDF (Lasso 9.2.6 on
CentOS 5.8ish).  The problem text is "(35x40μl)"  the micro part being the
issue.

In the past I used -encoding = 'UTF-8' in the font definition, but this does
not present the character for some reason.  I found an old file note that
indicated that -encoding = 'Identity-H' was the answer to this problem, but
that causes Java Exception error.  Code is as follows:

local(font_calibri_7) = pdf_font(
        -face = file_forceRoot('/_site/_fonts/calibri.ttf'),
        -embed,
        -encoding = 'UTF-8',
        -size = 7)

Any thoughts?

Thanks and very best regards,

Rick



#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

RE: PDF Font encoding issue

Rick Draper-2

Hmm - the character didn't appear in this email correctly either.... micro
symbol looks like "u"


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Rick Draper
Sent: Wednesday, 22 October 2014 12:10 PM
To: [hidden email]
Subject: PDF Font encoding issue

Hi All,

I am running into an issue with encoding fonts in a PDF (Lasso 9.2.6 on
CentOS 5.8ish).  The problem text is "(35x40ìl)"  the micro part being the
issue.

In the past I used -encoding = 'UTF-8' in the font definition, but this does
not present the character for some reason.  I found an old file note that
indicated that -encoding = 'Identity-H' was the answer to this problem, but
that causes Java Exception error.  Code is as follows:

local(font_calibri_7) = pdf_font(
        -face = file_forceRoot('/_site/_fonts/calibri.ttf'),
        -embed,
        -encoding = 'UTF-8',
        -size = 7)

Any thoughts?

Thanks and very best regards,

Rick




#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: PDF Font encoding issue

Ke Carlton-3
In reply to this post by Rick Draper-2
Maybe check if the font contains that character.

On 22 October 2014 15:10, Rick Draper <[hidden email]> wrote:

> Hi All,
>
> I am running into an issue with encoding fonts in a PDF (Lasso 9.2.6 on
> CentOS 5.8ish).  The problem text is "(35x40μl)"  the micro part being the
> issue.
>
> In the past I used -encoding = 'UTF-8' in the font definition, but this
> does
> not present the character for some reason.  I found an old file note that
> indicated that -encoding = 'Identity-H' was the answer to this problem, but
> that causes Java Exception error.  Code is as follows:
>
> local(font_calibri_7) = pdf_font(
>         -face = file_forceRoot('/_site/_fonts/calibri.ttf'),
>         -embed,
>         -encoding = 'UTF-8',
>         -size = 7)
>
> Any thoughts?
>
> Thanks and very best regards,
>
> Rick
>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: PDF Font encoding issue

Jolle Carlestam-2
Yea, I would test a different font. Like the default Helvetica and see if it shows then. If it does then try one of the installed ones like Garamond. If it shows then the culprit is probably the calibri font. If it doesn't show with a safe font then try the encoding alternatives until it shows. Note that it is sometimes best to use no encoding setting at all.

HDB
Jolle

Sent from a mobile device. Any anomalies is due to Autocorrect.

> 22 okt 2014 kl. 05:55 skrev Ke Carlton <[hidden email]>:
>
> Maybe check if the font contains that character.
>
>> On 22 October 2014 15:10, Rick Draper <[hidden email]> wrote:
>>
>> Hi All,
>>
>> I am running into an issue with encoding fonts in a PDF (Lasso 9.2.6 on
>> CentOS 5.8ish).  The problem text is "(35x40μl)"  the micro part being the
>> issue.
>>
>> In the past I used -encoding = 'UTF-8' in the font definition, but this
>> does
>> not present the character for some reason.  I found an old file note that
>> indicated that -encoding = 'Identity-H' was the answer to this problem, but
>> that causes Java Exception error.  Code is as follows:
>>
>> local(font_calibri_7) = pdf_font(
>>        -face = file_forceRoot('/_site/_fonts/calibri.ttf'),
>>        -embed,
>>        -encoding = 'UTF-8',
>>        -size = 7)
>>
>> Any thoughts?
>>
>> Thanks and very best regards,
>>
>> Rick
>>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: PDF Font encoding issue

Bil Corry-3
Try a font that covers a wide swath of the Unicode glyphs:

http://www.unicode.org/resources/fonts.html


- Bil


> On Oct 22, 2014, at 8:19 AM, Jolle Carlestam <[hidden email]> wrote:
>
> Yea, I would test a different font. Like the default Helvetica and see if it shows then. If it does then try one of the installed ones like Garamond. If it shows then the culprit is probably the calibri font. If it doesn't show with a safe font then try the encoding alternatives until it shows. Note that it is sometimes best to use no encoding setting at all.
>
> HDB
> Jolle
>
> Sent from a mobile device. Any anomalies is due to Autocorrect.
>
>> 22 okt 2014 kl. 05:55 skrev Ke Carlton <[hidden email]>:
>>
>> Maybe check if the font contains that character.
>>
>>> On 22 October 2014 15:10, Rick Draper <[hidden email]> wrote:
>>>
>>> Hi All,
>>>
>>> I am running into an issue with encoding fonts in a PDF (Lasso 9.2.6 on
>>> CentOS 5.8ish).  The problem text is "(35x40μl)"  the micro part being the
>>> issue.
>>>
>>> In the past I used -encoding = 'UTF-8' in the font definition, but this
>>> does
>>> not present the character for some reason.  I found an old file note that
>>> indicated that -encoding = 'Identity-H' was the answer to this problem, but
>>> that causes Java Exception error.  Code is as follows:
>>>
>>> local(font_calibri_7) = pdf_font(
>>>       -face = file_forceRoot('/_site/_fonts/calibri.ttf'),
>>>       -embed,
>>>       -encoding = 'UTF-8',
>>>       -size = 7)
>>>
>>> Any thoughts?
>>>
>>> Thanks and very best regards,
>>>
>>> Rick
>>>
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: PDF Font encoding issue

stevepiercy
In reply to this post by Rick Draper-2
It's definitely a font face issue.  Although this post was for
Lasso 8.5.6, I don't think the underlying technology has changed
much, so the code may still be useful.
http://lasso.2283332.n4.nabble.com/Problem-with-odd-chars-in-pdf-tp3146502p3146503.html

I just copy-pasted that code into a test Lasso 8.6 page saved as
UTF-8 with BOM.  The PDF was rendered as expected.

Then I inserted a mu (µ) character in this line like so:

     $pdf -> add(pdf_text('Helvetica 10 points.\rBečević\r\rmu\rµ',

That works, too.

Finally saving it to my test Lasso 9.2.7 site and changing the
last line to this:

     pdf_serve($pdf, -file = 'Bečević_testing.pdf');

Works, too.

According to these two resources, Calibri should support mu, but
you might need to use a Unicode representation (\u00B5) of it
instead of the actual character (µ).  I don't have Calibri on
my system, so I cannot verify.
http://www.microsoft.com/typography/fonts/font.aspx?FMID=1914
http://www.fileformat.info/info/unicode/font/calibri/list.htm

     $pdf -> add(pdf_text('Helvetica 10
points.\rBečević\r\rmu\rµ\r\runicode rep: \u00B5',

--steve


On 10/22/14 at 12:10 PM, [hidden email] (Rick
Draper) pronounced:

>Hi All,
>
>I am running into an issue with encoding fonts in a PDF (Lasso 9.2.6 on
>CentOS 5.8ish).  The problem text is "(35x40ìl)"  the micro part being the
>issue.
>
>In the past I used -encoding = 'UTF-8' in the font definition, but this does
>not present the character for some reason.  I found an old file note that
>indicated that -encoding = 'Identity-H' was the answer to this problem, but
>that causes Java Exception error.  Code is as follows:
>
>local(font_calibri_7) = pdf_font(
>-face = file_forceRoot('/_site/_fonts/calibri.ttf'),
>-embed,
>-encoding = 'UTF-8',
>-size = 7)
>
>Any thoughts?
>
>Thanks and very best regards,
>
>Rick
>
>
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>the mailing list Lasso [hidden email]
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Soquel, CA
<[hidden email]>               <http://www.StevePiercy.com/>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

RE: PDF Font encoding issue

Rick Draper-2
Thanks, all.

This is now working correctly - there was a secondary issue that was in the mix

local(font_calibri_7) = pdf_font(
        -face = file_forceRoot('/_site/_fonts/calibri.ttf'),
        -embed,
        -encoding = 'Identity-H',
        -size = 7)
Very best regards,

Rick

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Steve Piercy - Website Builder
Sent: Wednesday, 22 October 2014 5:02 PM
To: [hidden email]
Subject: Re: PDF Font encoding issue

It's definitely a font face issue.  Although this post was for Lasso 8.5.6, I don't think the underlying technology has changed much, so the code may still be useful.
http://lasso.2283332.n4.nabble.com/Problem-with-odd-chars-in-pdf-tp3146502p3146503.html

I just copy-pasted that code into a test Lasso 8.6 page saved as
UTF-8 with BOM.  The PDF was rendered as expected.

Then I inserted a mu (µ) character in this line like so:

     $pdf -> add(pdf_text('Helvetica 10 points.\rBečević\r\rmu\rµ',

That works, too.

Finally saving it to my test Lasso 9.2.7 site and changing the last line to this:

     pdf_serve($pdf, -file = 'Bečević_testing.pdf');

Works, too.

According to these two resources, Calibri should support mu, but you might need to use a Unicode representation (\u00B5) of it instead of the actual character (µ).  I don't have Calibri on my system, so I cannot verify.
http://www.microsoft.com/typography/fonts/font.aspx?FMID=1914
http://www.fileformat.info/info/unicode/font/calibri/list.htm

     $pdf -> add(pdf_text('Helvetica 10 points.\rBečević\r\rmu\rµ\r\runicode rep: \u00B5',

--steve


On 10/22/14 at 12:10 PM, [hidden email] (Rick
Draper) pronounced:

>Hi All,
>
>I am running into an issue with encoding fonts in a PDF (Lasso 9.2.6 on
>CentOS 5.8ish).  The problem text is "(35x40ìl)"  the micro part being
>the issue.
>
>In the past I used -encoding = 'UTF-8' in the font definition, but this
>does not present the character for some reason.  I found an old file
>note that indicated that -encoding = 'Identity-H' was the answer to
>this problem, but that causes Java Exception error.  Code is as follows:
>
>local(font_calibri_7) = pdf_font(
>-face = file_forceRoot('/_site/_fonts/calibri.ttf'),
>-embed,
>-encoding = 'UTF-8',
>-size = 7)
>
>Any thoughts?
>
>Thanks and very best regards,
>
>Rick
>
>
>



#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

RE: PDF Font encoding issue

stevepiercy
Identity-H.  Haven't we met before...?
http://lasso.2283332.n4.nabble.com/Getting-tricky-Unicode-chars-into-a-pdf-tp3401918p3406993.html

--steve


On 10/22/14 at 5:06 PM, [hidden email] (Rick
Draper) pronounced:

>Thanks, all.
>
>This is now working correctly - there was a secondary issue that was in the mix
>
>local(font_calibri_7) = pdf_font(
>-face = file_forceRoot('/_site/_fonts/calibri.ttf'),
>-embed,
>-encoding = 'Identity-H',
>-size = 7)
>Very best regards,
>
>Rick
>
>-----Original Message-----
>From: [hidden email]
>[mailto:[hidden email]] On Behalf Of Steve
>Piercy - Website Builder
>Sent: Wednesday, 22 October 2014 5:02 PM
>To: [hidden email]
>Subject: Re: PDF Font encoding issue
>
>It's definitely a font face issue.  Although this post was for
>Lasso 8.5.6, I don't think the underlying technology has
>changed much, so the code may still be useful.
>http://lasso.2283332.n4.nabble.com/Problem-with-odd-chars-in-pdf-tp3146502p3146503.html
>
>I just copy-pasted that code into a test Lasso 8.6 page saved as
>UTF-8 with BOM.  The PDF was rendered as expected.
>
>Then I inserted a mu (µ) character in this line like so:
>
>$pdf -> add(pdf_text('Helvetica 10 points.\rBečević\r\rmu\rµ',
>
>That works, too.
>
>Finally saving it to my test Lasso 9.2.7 site and changing the last line to this:
>
>pdf_serve($pdf, -file = 'Bečević_testing.pdf');
>
>Works, too.
>
>According to these two resources, Calibri should support mu,
>but you might need to use a Unicode representation (\u00B5) of
>it instead of the actual character (µ).  I don't have Calibri
>on my system, so I cannot verify.
>http://www.microsoft.com/typography/fonts/font.aspx?FMID=1914
>http://www.fileformat.info/info/unicode/font/calibri/list.htm
>
>$pdf -> add(pdf_text('Helvetica 10
>points.\rBečević\r\rmu\rµ\r\runicode rep: \u00B5',
>
>--steve
>
>
>On 10/22/14 at 12:10 PM, [hidden email] (Rick
>Draper) pronounced:
>
>>Hi All,
>>
>>I am running into an issue with encoding fonts in a PDF (Lasso
>>9.2.6 on CentOS 5.8ish).  The problem text is "(35x40ìl)"  
>>the micro part being the issue.
>>
>>In the past I used -encoding = 'UTF-8' in the font definition,
>>but this does not present the character for some reason.  I
>>found an old file note that indicated that -encoding =
>>'Identity-H' was the answer to this problem, but that causes
>>Java Exception error.  Code is as follows:
>>
>>local(font_calibri_7) = pdf_font(
>>-face = file_forceRoot('/_site/_fonts/calibri.ttf'),
>>-embed,
>>-encoding = 'UTF-8',
>>-size = 7)
>>
>>Any thoughts?
>>
>>Thanks and very best regards,
>>
>>Rick
>>
>>
>>
>
>
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>the mailing list Lasso [hidden email]
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Soquel, CA
<[hidden email]>               <http://www.StevePiercy.com/>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: PDF Font encoding issue

Pier Kuipers
I know this is a really old thread, but I just came across this gem and
thought I'd share:
http://www.eki.ee/letter/
In Lasso 8.6 it's not just the font that determines if certain characters
are available, but the PDF encoding. In 8.6 this defaults to CP1252, but
Polish characters (for example) require CP1250, see
http://lasso.2283332.n4.nabble.com/Getting-tricky-Unicode-chars-into-a-pdf-tt3401918.html#a3403025
The eki.ee site tells you exactly which encoding sets support which
characters.

I'll go back to lurking, now.
Hi to all Lassoers!

Pier


On 22 October 2014 at 08:31, Steve Piercy - Website Builder <
[hidden email]> wrote:

> Identity-H.  Haven't we met before...?
>
> http://lasso.2283332.n4.nabble.com/Getting-tricky-Unicode-chars-into-a-pdf-tp3401918p3406993.html
>
> --steve
>
>
> On 10/22/14 at 5:06 PM, [hidden email] (Rick Draper)
> pronounced:
>
>
> Thanks, all.
>>
>> This is now working correctly - there was a secondary issue that was in
>> the mix
>>
>> local(font_calibri_7) = pdf_font(
>> -face = file_forceRoot('/_site/_fonts/calibri.ttf'),
>> -embed,
>> -encoding = 'Identity-H',
>> -size = 7)
>> Very best regards,
>>
>> Rick
>>
>> -----Original Message-----
>> From: [hidden email] [mailto:
>> [hidden email]] On Behalf Of Steve Piercy - Website
>> Builder
>> Sent: Wednesday, 22 October 2014 5:02 PM
>> To: [hidden email]
>> Subject: Re: PDF Font encoding issue
>>
>> It's definitely a font face issue.  Although this post was for Lasso
>> 8.5.6, I don't think the underlying technology has changed much, so the
>> code may still be useful.
>>
>> http://lasso.2283332.n4.nabble.com/Problem-with-odd-chars-in-pdf-tp3146502p3146503.html
>>
>> I just copy-pasted that code into a test Lasso 8.6 page saved as
>> UTF-8 with BOM.  The PDF was rendered as expected.
>>
>> Then I inserted a mu (µ) character in this line like so:
>>
>> $pdf -> add(pdf_text('Helvetica 10 points.\rBečević\r\rmu\rµ',
>>
>> That works, too.
>>
>> Finally saving it to my test Lasso 9.2.7 site and changing the last line
>> to this:
>>
>> pdf_serve($pdf, -file = 'Bečević_testing.pdf');
>>
>> Works, too.
>>
>> According to these two resources, Calibri should support mu, but you
>> might need to use a Unicode representation (\u00B5) of it instead of the
>> actual character (µ).  I don't have Calibri on my system, so I cannot
>> verify.
>> http://www.microsoft.com/typography/fonts/font.aspx?FMID=1914
>> http://www.fileformat.info/info/unicode/font/calibri/list.htm
>>
>> $pdf -> add(pdf_text('Helvetica 10 points.\rBečević\r\rmu\rµ\r\runicode
>> rep: \u00B5',
>>
>> --steve
>>
>>
>> On 10/22/14 at 12:10 PM, [hidden email] (Rick
>> Draper) pronounced:
>>
>> Hi All,
>>>
>>> I am running into an issue with encoding fonts in a PDF (Lasso 9.2.6 on
>>> CentOS 5.8ish).  The problem text is "(35x40ìl)"  the micro part being the
>>> issue.
>>>
>>> In the past I used -encoding = 'UTF-8' in the font definition, but this
>>> does not present the character for some reason.  I found an old file note
>>> that indicated that -encoding = 'Identity-H' was the answer to this
>>> problem, but that causes Java Exception error.  Code is as follows:
>>>
>>> local(font_calibri_7) = pdf_font(
>>> -face = file_forceRoot('/_site/_fonts/calibri.ttf'),
>>> -embed,
>>> -encoding = 'UTF-8',
>>> -size = 7)
>>>
>>> Any thoughts?
>>>
>>> Thanks and very best regards,
>>>
>>> Rick
>>>
>>>
>>>
>>>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy              Website Builder              Soquel, CA
> <[hidden email]>               <http://www.StevePiercy.com/>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>



--
Pier Kuipers
Mobile: +353 87 294 3063
Blog: http://www.pierkuipers.com
Facebook: http://www.facebook.com/pier.kuipers
Twitter: @pkvisualid
AIM: pkvisualid

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>