You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Eric Douglas <ed...@blockhouse.com> on 2015/03/26 14:16:35 UTC

pdfbox warnings

When I call the PDFRenderer renderPageToGraphics method I get warnings in
my log.
Is there a fix for these?

org.apache.pdfbox.pdmodel.font.PDType1Font <init>
WARNING: Using fallback font ArialMT for ZapfDingbats
org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode
WARNING: No glyph for 52 (.notdef) in font ZapfDingbats
org.apache.pdfbox.pdmodel.font.PDType1Font <init>
WARNING: Using fallback font ArialMT for ZapfDingbats

Re: pdfbox warnings

Posted by Tilman Hausherr <TH...@t-online.de>.
Maybe the ttf and the type1 versions of the font have different encodings?

Re "set the pdfbox fallback" no; what I did to test ideas, was to mess 
with the substitutes map in ExternalFonts.java


Tilman

Am 26.03.2015 um 19:10 schrieb Eric Douglas:
> I want it to use embedded fonts, but it appears to be looking for installed
> fonts for the check mark on an iText editable check box field, so I tried
> installing ZapfDingbats.ttf.
>
> Now it just gets this log
> org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode
> WARNING: No glyph for 52 (.notdef) in font ZapfDingbats
>
> Now it doesn't log "Using fallback font" so I don't know what it's doing.
> I can only guess iText is also using a fallback font which is apparently
> not available to pdfbox?
> Is there a way I can set the pdfbox fallback font for the
> renderPageToGraphics?
>
> On Thu, Mar 26, 2015 at 1:50 PM, Tilman Hausherr <TH...@t-online.de>
> wrote:
>
>> It doesn't work with the ttf font for some reason. I can only tell that it
>> works for me with the type1 file.
>>
>> Tilman
>>
>> Am 26.03.2015 um 18:41 schrieb Eric Douglas:
>>
>>   I don't know where the fallback font comes from but it doesn't work.  If I
>>> view the PDF in Abode Reader it has an editable checkbox with a check mark
>>> in it.  The image rendered by pdfbox is just an empty box.
>>> I am using pdfbox 2.0.0 from a trunk.
>>> I can upload a small sample PDF that shows this error if it helps.
>>> I have a ZapfDingbats.ttf file but I can't see any way to embed that for
>>> the editable checkbox.  I'm creating the PDF using iText.
>>> If I view the PDF in Adobe Reader and check Properties, on the Fonts tab
>>> it
>>> shows
>>> ZapfDingbats
>>>     Type: Type 1
>>>     Encoding: Built-in
>>>     Actual Font: AdobePiStd
>>>     Actual Font Type: Type 1
>>> My normal fonts for text that properly embedded which render fine with
>>> this
>>> trunk show as
>>> LucidaSans-Typewriter (Embedded Subset)
>>>     Type: TrueType
>>>     Encoding: Custom
>>>
>>> On Thu, Mar 26, 2015 at 12:23 PM, Tilman Hausherr <TH...@t-online.de>
>>> wrote:
>>>
>>>   Am 26.03.2015 um 14:16 schrieb Eric Douglas:
>>>>    When I call the PDFRenderer renderPageToGraphics method I get warnings
>>>> in
>>>>
>>>>> my log.
>>>>> Is there a fix for these?
>>>>>
>>>>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>>>>> WARNING: Using fallback font ArialMT for ZapfDingbats
>>>>> org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode
>>>>> WARNING: No glyph for 52 (.notdef) in font ZapfDingbats
>>>>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>>>>> WARNING: Using fallback font ArialMT for ZapfDingbats
>>>>>
>>>>>
>>>>>   Yes, buy a ZapfDingbats type 1 font and copy it into your font
>>>> directory.
>>>> Or maybe you already have it, then the file is named "ZD______.PFB".
>>>> License restrictions may apply.
>>>>
>>>> Tilman
>>>>
>>>> PS: alwyays mention the version (in your case "trunk" or "2.0")
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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: pdfbox warnings

Posted by Eric Douglas <ed...@blockhouse.com>.
I want it to use embedded fonts, but it appears to be looking for installed
fonts for the check mark on an iText editable check box field, so I tried
installing ZapfDingbats.ttf.

Now it just gets this log
org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode
WARNING: No glyph for 52 (.notdef) in font ZapfDingbats

Now it doesn't log "Using fallback font" so I don't know what it's doing.
I can only guess iText is also using a fallback font which is apparently
not available to pdfbox?
Is there a way I can set the pdfbox fallback font for the
renderPageToGraphics?

On Thu, Mar 26, 2015 at 1:50 PM, Tilman Hausherr <TH...@t-online.de>
wrote:

> It doesn't work with the ttf font for some reason. I can only tell that it
> works for me with the type1 file.
>
> Tilman
>
> Am 26.03.2015 um 18:41 schrieb Eric Douglas:
>
>  I don't know where the fallback font comes from but it doesn't work.  If I
>> view the PDF in Abode Reader it has an editable checkbox with a check mark
>> in it.  The image rendered by pdfbox is just an empty box.
>> I am using pdfbox 2.0.0 from a trunk.
>> I can upload a small sample PDF that shows this error if it helps.
>> I have a ZapfDingbats.ttf file but I can't see any way to embed that for
>> the editable checkbox.  I'm creating the PDF using iText.
>> If I view the PDF in Adobe Reader and check Properties, on the Fonts tab
>> it
>> shows
>> ZapfDingbats
>>    Type: Type 1
>>    Encoding: Built-in
>>    Actual Font: AdobePiStd
>>    Actual Font Type: Type 1
>> My normal fonts for text that properly embedded which render fine with
>> this
>> trunk show as
>> LucidaSans-Typewriter (Embedded Subset)
>>    Type: TrueType
>>    Encoding: Custom
>>
>> On Thu, Mar 26, 2015 at 12:23 PM, Tilman Hausherr <TH...@t-online.de>
>> wrote:
>>
>>  Am 26.03.2015 um 14:16 schrieb Eric Douglas:
>>>
>>>   When I call the PDFRenderer renderPageToGraphics method I get warnings
>>> in
>>>
>>>> my log.
>>>> Is there a fix for these?
>>>>
>>>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>>>> WARNING: Using fallback font ArialMT for ZapfDingbats
>>>> org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode
>>>> WARNING: No glyph for 52 (.notdef) in font ZapfDingbats
>>>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>>>> WARNING: Using fallback font ArialMT for ZapfDingbats
>>>>
>>>>
>>>>  Yes, buy a ZapfDingbats type 1 font and copy it into your font
>>> directory.
>>> Or maybe you already have it, then the file is named "ZD______.PFB".
>>> License restrictions may apply.
>>>
>>> Tilman
>>>
>>> PS: alwyays mention the version (in your case "trunk" or "2.0")
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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: pdfbox warnings

Posted by Tilman Hausherr <TH...@t-online.de>.
It doesn't work with the ttf font for some reason. I can only tell that 
it works for me with the type1 file.

Tilman

Am 26.03.2015 um 18:41 schrieb Eric Douglas:
> I don't know where the fallback font comes from but it doesn't work.  If I
> view the PDF in Abode Reader it has an editable checkbox with a check mark
> in it.  The image rendered by pdfbox is just an empty box.
> I am using pdfbox 2.0.0 from a trunk.
> I can upload a small sample PDF that shows this error if it helps.
> I have a ZapfDingbats.ttf file but I can't see any way to embed that for
> the editable checkbox.  I'm creating the PDF using iText.
> If I view the PDF in Adobe Reader and check Properties, on the Fonts tab it
> shows
> ZapfDingbats
>    Type: Type 1
>    Encoding: Built-in
>    Actual Font: AdobePiStd
>    Actual Font Type: Type 1
> My normal fonts for text that properly embedded which render fine with this
> trunk show as
> LucidaSans-Typewriter (Embedded Subset)
>    Type: TrueType
>    Encoding: Custom
>
> On Thu, Mar 26, 2015 at 12:23 PM, Tilman Hausherr <TH...@t-online.de>
> wrote:
>
>> Am 26.03.2015 um 14:16 schrieb Eric Douglas:
>>
>>   When I call the PDFRenderer renderPageToGraphics method I get warnings in
>>> my log.
>>> Is there a fix for these?
>>>
>>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>>> WARNING: Using fallback font ArialMT for ZapfDingbats
>>> org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode
>>> WARNING: No glyph for 52 (.notdef) in font ZapfDingbats
>>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>>> WARNING: Using fallback font ArialMT for ZapfDingbats
>>>
>>>
>> Yes, buy a ZapfDingbats type 1 font and copy it into your font directory.
>> Or maybe you already have it, then the file is named "ZD______.PFB".
>> License restrictions may apply.
>>
>> Tilman
>>
>> PS: alwyays mention the version (in your case "trunk" or "2.0")
>>
>>
>> ---------------------------------------------------------------------
>> 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: pdfbox 2.0 convert to image problem

Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,

I've created an issue in JIRA:
https://issues.apache.org/jira/browse/PDFBOX-2750

Tilman

Am 07.04.2015 um 11:24 schrieb vanja K.:
>
> Thank You,
> vanja K.
>
> Hello
>
>   i  am using   pdfbox-app-2.0.0-20150406.120623-1207.jar   from 
> http://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.0-SNAPSHOT/
>
> and   pdf  file 
> http://storagemadeeasy.com/files/fdacbd395d31a4b5ab60bdc1d6100ac2.pdf
>
>  when i  convert  file    to  image   with  pdfbox-app 1.8.8 then 
> image   looks  ok 
> http://storagemadeeasy.com/files/123fee5256bf4a1da527ed588d7f43b9.png
> but  then i  use   pdfbox-app-2.0.0-20150406.120623-1207.jar  then 
> image   looks  bad 
> http://storagemadeeasy.com/files/870d2c099edd2d5ba13dd69fbc9d791e.png
>
>
>  how  may  i  fix  the  problem ?
>
>
> thanks
>
>
> ---------------------------------------------------------------------
> 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: pdfbox 2.0 convert to image problem

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 07.04.2015 um 11:24 schrieb vanja K.:
> Hello
>
>   i  am using   pdfbox-app-2.0.0-20150406.120623-1207.jar   from 
> http://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.0-SNAPSHOT/ 
>
>
> and   pdf  file 
> http://storagemadeeasy.com/files/fdacbd395d31a4b5ab60bdc1d6100ac2.pdf
>
>  when i  convert  file    to  image   with  pdfbox-app 1.8.8 then 
> image   looks  ok 
> http://storagemadeeasy.com/files/123fee5256bf4a1da527ed588d7f43b9.png
> but  then i  use   pdfbox-app-2.0.0-20150406.120623-1207.jar  then 
> image   looks  bad 
> http://storagemadeeasy.com/files/870d2c099edd2d5ba13dd69fbc9d791e.png
>
>
>  how  may  i  fix  the  problem ? 

That problem has now been solved. Get the latest version with svn :-)

Tilman

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


pdfbox 2.0 convert to image problem

Posted by "vanja K." <va...@storagemadeeasy.com>.
Thank You,
vanja K.

Hello

   i  am using   pdfbox-app-2.0.0-20150406.120623-1207.jar   from 
http://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.0-SNAPSHOT/

and   pdf  file 
http://storagemadeeasy.com/files/fdacbd395d31a4b5ab60bdc1d6100ac2.pdf

  when i  convert  file    to  image   with  pdfbox-app 1.8.8 then  
image   looks  ok 
http://storagemadeeasy.com/files/123fee5256bf4a1da527ed588d7f43b9.png
but  then i  use   pdfbox-app-2.0.0-20150406.120623-1207.jar  then 
image   looks  bad 
http://storagemadeeasy.com/files/870d2c099edd2d5ba13dd69fbc9d791e.png


  how  may  i  fix  the  problem ?


thanks


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


Re: pdfbox warnings

Posted by Peter Murray-Rust <pm...@cam.ac.uk>.
On Tue, Apr 7, 2015 at 7:49 AM, John Hewson <jo...@jahewson.com> wrote:

> >
> > On 6 Apr 2015, at 09:49, Peter Murray-Rust <pm...@cam.ac.uk> wrote:
> >
> ...



> >
> > PDFBox relies on the target OS distribution to include some of the 14
> > fonts. Since Windows doesn't have ZapfDingbats it is missing by default
> and
> > PDFBox cannot rectify this.
>
> Yes, but we should be able to map it to a similar font such as Windings
> (assuming the same glyphs are available).
>
> -- John
>
>
Understood and agreed and hopefully this is a workable solution. (My point
was that copyright cannot be ignored - and this is one of many areas where
it causes distribution problems).



-- 
Peter Murray-Rust
Reader in Molecular Informatics
Unilever Centre, Dep. Of Chemistry
University of Cambridge
CB2 1EW, UK
+44-1223-763069

Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
> 
> On 6 Apr 2015, at 09:49, Peter Murray-Rust <pm...@cam.ac.uk> wrote:
> 
> [Please correct me if I'm wrong...]
> 
> ZapfDingbats (http://en.wikipedia.org/wiki/Zapf_Dingbats ) is a copyrighted
> font. Therefore it breaks copyright to copy it without permission. Since
> PDFBox is Open (has a distribution compatible with the Open Definition (
> http://opendefinition.org/ ) which allows anyone to copy, modify and re-use
> it), it cannot include materials which have restrictive licences (and may
> require purchase).
> 
> PDFBox relies on the target OS distribution to include some of the 14
> fonts. Since Windows doesn't have ZapfDingbats it is missing by default and
> PDFBox cannot rectify this.

Yes, but we should be able to map it to a similar font such as Windings (assuming the same glyphs are available).

-- John

> This will also mean that anyone who has separately licensed ZapfDingbats
> (or an equivalent with a restrictive licence) cannot include them in
> derivative works of PDFBox.
> 
> The problem would appear to arise from the PDF standard requiring a
> copyrighted font.
> 
> P.
> 
> 
> P.
> 
> 
>> On Mon, Apr 6, 2015 at 5:31 PM, John Hewson <jo...@jahewson.com> wrote:
>> 
>> 
>>> On 6 Apr 2015, at 08:59, Eric Douglas <ed...@blockhouse.com> wrote:
>>> 
>>> ZapfDingbats should be there, shouldn't have to substitute, as you
>>> mentioned.
>> 
>> No, these are not the same issues. PDFBox should always be able to provide
>> ZapfDingbats but that font doesn't ship with Windows, so we need to
>> substitute it for Windings on that platform. On the Mac this isn't a
>> problem.
>> 
>>> https://issues.apache.org/jira/browse/PDFBOX-1900
>>> John Hewson
>>> <https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jahewson>
>> added
>>> a comment - 11/Feb/14 00:55
>>> 
>>> This is a PDFBox bug. Zapf Dingbats is one of the standard 14 fonts that
>>> should always work without being embedded.
>>> ​
>>> As mentioned on that bug report, I had actually created this PDF using
>>> iText, which doesn't appear to give any way to embed the font.
>>> I got a rendering problem on pdfbox trying to read this PDF back in,
>>> because this font is not embedded or installed, though Adobe renders it
>>> just fine.
>>> This will likely come up again someday, though I worked around this for
>>> now, since as I mentioned this is a PDF I'm creating.  I changed this
>>> instance to render to the Graphics using the original object I created it
>>> from instead of reading the PDF after it's created.
>>> 
>>> I will test that ExternalFonts.addSubstitute when I get time, as another
>>> workaround.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
> 
> 
> -- 
> Peter Murray-Rust
> Reader in Molecular Informatics
> Unilever Centre, Dep. Of Chemistry
> University of Cambridge
> CB2 1EW, UK
> +44-1223-763069

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


Re: pdfbox warnings

Posted by Eric Douglas <ed...@blockhouse.com>.
That could explain it.  I was just going to ask what version of Windows
that was from, since I don't have it.  We don't use MS Office.  We mostly
use Google Docs.

On Wed, Apr 8, 2015 at 2:07 PM, Tres Finocchiaro <tres.finocchiaro@gmail.com
> wrote:

> >
> > > Where are you getting the Arial Unicode MS?  It doesn't come with
> > Windows, that is, it's not installed on my Windows 8.1 Pro.
>
>
> Hm... Good question... According to Wikepedia, this may actually
> be distributed with Microsoft Office per:
> http://en.wikipedia.org/wiki/Arial_Unicode_MS#Versions which would explain
> why many people already have it (or are familiar with it), but not Windows
> 8.1 Pro.
>
> -Tres
>
> - Tres.Finocchiaro@gmail.com
>
> On Wed, Apr 8, 2015 at 2:05 PM, Tilman Hausherr <TH...@t-online.de>
> wrote:
>
> > Am 08.04.2015 um 19:59 schrieb Eric Douglas:
> >
> >> Where are you getting the Arial Unicode MS?
> >>
> >
> > C:\windows\fonts\ARIALUNI.TTF
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > For additional commands, e-mail: users-help@pdfbox.apache.org
> >
> >
>

Re: pdfbox warnings

Posted by Tres Finocchiaro <tr...@gmail.com>.
>
> > Where are you getting the Arial Unicode MS?  It doesn't come with
> Windows, that is, it's not installed on my Windows 8.1 Pro.


Hm... Good question... According to Wikepedia, this may actually
be distributed with Microsoft Office per:
http://en.wikipedia.org/wiki/Arial_Unicode_MS#Versions which would explain
why many people already have it (or are familiar with it), but not Windows
8.1 Pro.

-Tres

- Tres.Finocchiaro@gmail.com

On Wed, Apr 8, 2015 at 2:05 PM, Tilman Hausherr <TH...@t-online.de>
wrote:

> Am 08.04.2015 um 19:59 schrieb Eric Douglas:
>
>> Where are you getting the Arial Unicode MS?
>>
>
> C:\windows\fonts\ARIALUNI.TTF
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: pdfbox warnings

Posted by Eric Douglas <ed...@blockhouse.com>.
That sounds like a great solution.
I don't know how you test that it has every character, but Noto Sans
Symbols does have a check mark character, just as I mentioned previously
Adobe Pi Std has in U+2713.

On Wed, Apr 8, 2015 at 2:22 PM, Maruan Sahyoun <sa...@fileaffairs.de>
wrote:

>
> > Am 08.04.2015 um 20:05 schrieb Tilman Hausherr <TH...@t-online.de>:
> >
> > Am 08.04.2015 um 19:59 schrieb Eric Douglas:
> >> Where are you getting the Arial Unicode MS?
> >
> > C:\windows\fonts\ARIALUNI.TTF
> >
>
> we might be able to find a suitable font to be distributed with PDFBox
> such as Noto [1] which is ASL licensed (at least that's what they state)
> and they have a symbol font [2]. Would need to check the mappings.
>
> [1] http://www.google.com/get/noto/#/family/noto-sans
> [2] http://www.google.com/get/noto/#/family/noto-sans-zsym
>
> >
> >
> > ---------------------------------------------------------------------
> > 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: pdfbox warnings

Posted by Tres Finocchiaro <tr...@gmail.com>.
Here's a side-by-side of some fairly common MS fonts...

http://i.imgur.com/Xf0IpnF.png


- Tres.Finocchiaro@gmail.com

On Wed, Apr 8, 2015 at 2:22 PM, Maruan Sahyoun <sa...@fileaffairs.de>
wrote:

>
> > Am 08.04.2015 um 20:05 schrieb Tilman Hausherr <TH...@t-online.de>:
> >
> > Am 08.04.2015 um 19:59 schrieb Eric Douglas:
> >> Where are you getting the Arial Unicode MS?
> >
> > C:\windows\fonts\ARIALUNI.TTF
> >
>
> we might be able to find a suitable font to be distributed with PDFBox
> such as Noto [1] which is ASL licensed (at least that's what they state)
> and they have a symbol font [2]. Would need to check the mappings.
>
> [1] http://www.google.com/get/noto/#/family/noto-sans
> [2] http://www.google.com/get/noto/#/family/noto-sans-zsym
>
> >
> >
> > ---------------------------------------------------------------------
> > 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: pdfbox warnings

Posted by Tres Finocchiaro <tr...@gmail.com>.
Thanks for this John! :)

Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
Actually this mapping won't work quite yet, as MS Gothic is a TrueType Collection (.ttc) and we don't support that format. I'm adding necessary code to FontBox right now...

-- John

> On 8 Apr 2015, at 14:23, John Hewson <jo...@jahewson.com> wrote:
> 
> I checked out MS Gothic and it’s perfect. The symbols are almost identical to Zapf Dingbats, and it has all the glyphs we need.
> 
> I’ve replaced the Arial Unicode MS mapping with MS Gothic in PDFBOX-1900. This change will be in the next snapshot build. Please try it out.
> 
> — John
> 
>> On 8 Apr 2015, at 13:14, John Hewson <jo...@jahewson.com> wrote:
>> 
>> Ok, I think I’ve found a suitable substitute font, MS Gothic ships with Windows XP, Vista, 7, and 8 and has complete Unicode Dingbats coverage:
>> 
>> https://www.microsoft.com/typography/fonts/font.aspx?FMID=1269
>> 
>> See http://www.fonts.com/font/microsoft-corporation/ms-gothic/regular for Dingbats coverage, click “Character Map” and select “2700…27BF Dingbats”.
>> 
>> — John
>> 
>>>> On 8 Apr 2015, at 13:07, John Hewson <jo...@jahewson.com> wrote:
>>>> 
>>>> 
>>>>> On 8 Apr 2015, at 11:22, Maruan Sahyoun <sa...@fileaffairs.de> wrote:
>>>>> 
>>>>> 
>>>>> Am 08.04.2015 um 20:05 schrieb Tilman Hausherr <TH...@t-online.de>:
>>>>> 
>>>>>> Am 08.04.2015 um 19:59 schrieb Eric Douglas:
>>>>>> Where are you getting the Arial Unicode MS?
>>>>> 
>>>>> C:\windows\fonts\ARIALUNI.TTF
>>>> 
>>>> we might be able to find a suitable font to be distributed with PDFBox such as Noto [1] which is ASL licensed (at least that's what they state) and they have a symbol font [2]. Would need to check the mappings.
>>> 
>>> Yes, but first we should check if a suitable font ships with Windows, as other PDF viewers on the system are likely to be using it already. We don’t want PDFBox to unnecessarily be using a non-platform font.
>>> 
>>> The glyph list for ZapfDingbats can be found here:
>>> 
>>> https://github.com/apache/pdfbox/blob/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist/zapfdingbats.txt
>>> 
>>> The format of the entires is:
>>> 
>>> a100;275E
>>> 
>>> Which corresponds to a glyph named “a100” with Unicode code point U+275E.
>>> 
>>> — John
>>> 
>>> 
>>>> [1] http://www.google.com/get/noto/#/family/noto-sans
>>>> [2] http://www.google.com/get/noto/#/family/noto-sans-zsym
>>>> 
>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> 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: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
I checked out MS Gothic and it’s perfect. The symbols are almost identical to Zapf Dingbats, and it has all the glyphs we need.

I’ve replaced the Arial Unicode MS mapping with MS Gothic in PDFBOX-1900. This change will be in the next snapshot build. Please try it out.

— John

> On 8 Apr 2015, at 13:14, John Hewson <jo...@jahewson.com> wrote:
> 
> Ok, I think I’ve found a suitable substitute font, MS Gothic ships with Windows XP, Vista, 7, and 8 and has complete Unicode Dingbats coverage:
> 
> https://www.microsoft.com/typography/fonts/font.aspx?FMID=1269 <https://www.microsoft.com/typography/fonts/font.aspx?FMID=1269>
> 
> See http://www.fonts.com/font/microsoft-corporation/ms-gothic/regular <http://www.fonts.com/font/microsoft-corporation/ms-gothic/regular> for Dingbats coverage, click “Character Map” and select “2700…27BF Dingbats”.
> 
> — John
> 
>> On 8 Apr 2015, at 13:07, John Hewson <jo...@jahewson.com> wrote:
>> 
>>> 
>>> On 8 Apr 2015, at 11:22, Maruan Sahyoun <sahyoun@fileaffairs.de <ma...@fileaffairs.de>> wrote:
>>> 
>>> 
>>>> Am 08.04.2015 um 20:05 schrieb Tilman Hausherr <THausherr@t-online.de <ma...@t-online.de>>:
>>>> 
>>>> Am 08.04.2015 um 19:59 schrieb Eric Douglas:
>>>>> Where are you getting the Arial Unicode MS?
>>>> 
>>>> C:\windows\fonts\ARIALUNI.TTF
>>>> 
>>> 
>>> we might be able to find a suitable font to be distributed with PDFBox such as Noto [1] which is ASL licensed (at least that's what they state) and they have a symbol font [2]. Would need to check the mappings.
>> 
>> Yes, but first we should check if a suitable font ships with Windows, as other PDF viewers on the system are likely to be using it already. We don’t want PDFBox to unnecessarily be using a non-platform font.
>> 
>> The glyph list for ZapfDingbats can be found here:
>> 
>> https://github.com/apache/pdfbox/blob/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist/zapfdingbats.txt <https://github.com/apache/pdfbox/blob/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist/zapfdingbats.txt>
>> 
>> The format of the entires is:
>> 
>> a100;275E
>> 
>> Which corresponds to a glyph named “a100” with Unicode code point U+275E.
>> 
>> — John
>> 
>> 
>>> [1] http://www.google.com/get/noto/#/family/noto-sans <http://www.google.com/get/noto/#/family/noto-sans>
>>> [2] http://www.google.com/get/noto/#/family/noto-sans-zsym <http://www.google.com/get/noto/#/family/noto-sans-zsym>
>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org <ma...@pdfbox.apache.org>
>>>> For additional commands, e-mail: users-help@pdfbox.apache.org <ma...@pdfbox.apache.org>
>>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org <ma...@pdfbox.apache.org>
>>> For additional commands, e-mail: users-help@pdfbox.apache.org <ma...@pdfbox.apache.org>


Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
Ok, I think I’ve found a suitable substitute font, MS Gothic ships with Windows XP, Vista, 7, and 8 and has complete Unicode Dingbats coverage:

https://www.microsoft.com/typography/fonts/font.aspx?FMID=1269

See http://www.fonts.com/font/microsoft-corporation/ms-gothic/regular <http://www.fonts.com/font/microsoft-corporation/ms-gothic/regular> for Dingbats coverage, click “Character Map” and select “2700…27BF Dingbats”.

— John

> On 8 Apr 2015, at 13:07, John Hewson <jo...@jahewson.com> wrote:
> 
>> 
>> On 8 Apr 2015, at 11:22, Maruan Sahyoun <sahyoun@fileaffairs.de <ma...@fileaffairs.de>> wrote:
>> 
>> 
>>> Am 08.04.2015 um 20:05 schrieb Tilman Hausherr <THausherr@t-online.de <ma...@t-online.de>>:
>>> 
>>> Am 08.04.2015 um 19:59 schrieb Eric Douglas:
>>>> Where are you getting the Arial Unicode MS?
>>> 
>>> C:\windows\fonts\ARIALUNI.TTF
>>> 
>> 
>> we might be able to find a suitable font to be distributed with PDFBox such as Noto [1] which is ASL licensed (at least that's what they state) and they have a symbol font [2]. Would need to check the mappings.
> 
> Yes, but first we should check if a suitable font ships with Windows, as other PDF viewers on the system are likely to be using it already. We don’t want PDFBox to unnecessarily be using a non-platform font.
> 
> The glyph list for ZapfDingbats can be found here:
> 
> https://github.com/apache/pdfbox/blob/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist/zapfdingbats.txt <https://github.com/apache/pdfbox/blob/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist/zapfdingbats.txt>
> 
> The format of the entires is:
> 
> a100;275E
> 
> Which corresponds to a glyph named “a100” with Unicode code point U+275E.
> 
> — John
> 
> 
>> [1] http://www.google.com/get/noto/#/family/noto-sans <http://www.google.com/get/noto/#/family/noto-sans>
>> [2] http://www.google.com/get/noto/#/family/noto-sans-zsym <http://www.google.com/get/noto/#/family/noto-sans-zsym>
>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org <ma...@pdfbox.apache.org>
>>> For additional commands, e-mail: users-help@pdfbox.apache.org <ma...@pdfbox.apache.org>
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org <ma...@pdfbox.apache.org>
>> For additional commands, e-mail: users-help@pdfbox.apache.org <ma...@pdfbox.apache.org>

Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
> On 8 Apr 2015, at 11:22, Maruan Sahyoun <sa...@fileaffairs.de> wrote:
> 
> 
>> Am 08.04.2015 um 20:05 schrieb Tilman Hausherr <TH...@t-online.de>:
>> 
>> Am 08.04.2015 um 19:59 schrieb Eric Douglas:
>>> Where are you getting the Arial Unicode MS?
>> 
>> C:\windows\fonts\ARIALUNI.TTF
>> 
> 
> we might be able to find a suitable font to be distributed with PDFBox such as Noto [1] which is ASL licensed (at least that's what they state) and they have a symbol font [2]. Would need to check the mappings.

Yes, but first we should check if a suitable font ships with Windows, as other PDF viewers on the system are likely to be using it already. We don’t want PDFBox to unnecessarily be using a non-platform font.

The glyph list for ZapfDingbats can be found here:

https://github.com/apache/pdfbox/blob/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist/zapfdingbats.txt <https://github.com/apache/pdfbox/blob/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/glyphlist/zapfdingbats.txt>

The format of the entires is:

a100;275E

Which corresponds to a glyph named “a100” with Unicode code point U+275E.

— John


> [1] http://www.google.com/get/noto/#/family/noto-sans
> [2] http://www.google.com/get/noto/#/family/noto-sans-zsym
> 
>> 
>> 
>> ---------------------------------------------------------------------
>> 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: pdfbox warnings

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
> Am 08.04.2015 um 20:05 schrieb Tilman Hausherr <TH...@t-online.de>:
> 
> Am 08.04.2015 um 19:59 schrieb Eric Douglas:
>> Where are you getting the Arial Unicode MS?
> 
> C:\windows\fonts\ARIALUNI.TTF
> 

we might be able to find a suitable font to be distributed with PDFBox such as Noto [1] which is ASL licensed (at least that's what they state) and they have a symbol font [2]. Would need to check the mappings.

[1] http://www.google.com/get/noto/#/family/noto-sans
[2] http://www.google.com/get/noto/#/family/noto-sans-zsym

> 
> 
> ---------------------------------------------------------------------
> 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: pdfbox warnings

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 08.04.2015 um 19:59 schrieb Eric Douglas:
> Where are you getting the Arial Unicode MS?

C:\windows\fonts\ARIALUNI.TTF



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


Re: pdfbox warnings

Posted by Tres Finocchiaro <tr...@gmail.com>.
@John,

Thanks for sharing the findings, that is great news. :)

Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
> On 8 Apr 2015, at 13:17, Eric Douglas <ed...@blockhouse.com> wrote:
> 
> On Wed, Apr 8, 2015 at 3:59 PM, John Hewson <jo...@jahewson.com> wrote:
> 
>>> On 8 Apr 2015, at 10:59, Eric Douglas <ed...@blockhouse.com> wrote:
>>> 
>>> Where are you getting the Arial Unicode MS?  It doesn't come with
>> Windows,
>>> that is, it's not installed on my Windows 8.1 Pro.
>>> Previously when I referenced a unicode font I used Lucida Sans Unicode.
>>> My Windows Arial includes Arial Black, Arial Bold, Arial Bold Italic,
>> Arial
>>> Italic, and Arial Regular.
>>> 
>> As you’ve spotted, Arial Unicode MS doesn’t ship with Windows, but with
>> Office, which
>> kind of ruins my whole idea. We’ll need to take a closer look at the fonts
>> which really
>> are shipped with Windows. I’m on a Mac, so it’s a little tricky for me.
>> 
>> See: https://www.microsoft.com/typography/fonts/font.aspx?FMID=1081
>> 
>> 
>>> Windows likes to change their fonts, which is annoying when you have
>>> programs that run on different operating systems and you want consistent
>>> output.
>>> We used to reference fonts by name but even when it found the same font
>>> sometimes there were different versions.  We once had 2 machines running
>>> the same OS, Windows 98 SE, which produced different output from the same
>>> Courier font file name.
>>> I started writing Java with Windows XP Pro and copied the Lucida font
>> files
>>> from the Windows Fonts folder to embed in my jar to make sure my program
>>> output wouldn't look different when we changed OS.
>>> It is best if there's a free, redistributable font file you can embed in
>> a
>>> jar. (as long as they can't guarantee we can find the same font installed
>>> on every OS)
>> 
>> The problem here is that platform-specific behaviour is actually
>> desirable: a PDF
>> opened in Acrobat on Windows will render Arial instead of Helvetica, if
>> PDFBox
>> were to bundle its own Helvetica font, we’d be using the wrong font for
>> the platform,
>> despite it being a perfectly acceptable font. We’ve had users complain
>> that PDFBox
>> makes different substitutions from Evince and so the same PDF render with
>> different
>> fonts on the same system when opened in different viewers - we’ve tried to
>> fix these
>> kinds of issues, but the result is that fonts substitution really should
>> be platform-specific.
>> 
>> Having said that, you can always bundle your own fonts and use a custom
>> FontProvider
>> and PDFBox will give you consistent cross-platfrom rendering, if that’s
>> what your
>> project’s requirements call for, but out-of-the-box we have to provide
>> platform-specific
>> behaviour.
>> 
>> — John
>> 
>> 
> I don't know about regular text substitutions, as you describe using an
> installed Arial in place of Helvetica.  I was specifically looking for a
> custom replacement font to be included for symbols.  If I create a PDF with
> iText with an editable check box object, it puts in a reference to
> Zapfdingbats without giving me an option to embed the font.  As Windows
> doesn't have this font installed by default, when I tried to read that PDF
> back in and render it to the screen with pdfbox, it didn't draw the check
> marks.  If you view that same PDF in Adobe Reader on Windows without
> Zapfdingbats installed, it says it's using it's actual font Adobe Pi Std.
> Assuming you can't package the Adobe font with pdfbox for that
> substitution, the free redistributable Noto Sans Symbols font looks like a
> fine replacement.
> 
> Font replacement can also be an option, if a program wants to tell pdfbox
> to use font x in place of font y.

Yes, in fact, we substitute all fonts except for the “fallback” font. My point is that
It’s better to substitute with platform fonts rather than bundling an otherwise
alien font with PDFBox.

It now looks like MS Gothic is a suitable substitute, as it’s shipped with Windows
itself, rather than with Office.

— John


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


Re: pdfbox warnings

Posted by Eric Douglas <ed...@blockhouse.com>.
On Wed, Apr 8, 2015 at 3:59 PM, John Hewson <jo...@jahewson.com> wrote:

> > On 8 Apr 2015, at 10:59, Eric Douglas <ed...@blockhouse.com> wrote:
> >
> > Where are you getting the Arial Unicode MS?  It doesn't come with
> Windows,
> > that is, it's not installed on my Windows 8.1 Pro.
> > Previously when I referenced a unicode font I used Lucida Sans Unicode.
> > My Windows Arial includes Arial Black, Arial Bold, Arial Bold Italic,
> Arial
> > Italic, and Arial Regular.
> >
> As you’ve spotted, Arial Unicode MS doesn’t ship with Windows, but with
> Office, which
> kind of ruins my whole idea. We’ll need to take a closer look at the fonts
> which really
> are shipped with Windows. I’m on a Mac, so it’s a little tricky for me.
>
> See: https://www.microsoft.com/typography/fonts/font.aspx?FMID=1081
>
>
> > Windows likes to change their fonts, which is annoying when you have
> > programs that run on different operating systems and you want consistent
> > output.
> > We used to reference fonts by name but even when it found the same font
> > sometimes there were different versions.  We once had 2 machines running
> > the same OS, Windows 98 SE, which produced different output from the same
> > Courier font file name.
> > I started writing Java with Windows XP Pro and copied the Lucida font
> files
> > from the Windows Fonts folder to embed in my jar to make sure my program
> > output wouldn't look different when we changed OS.
> > It is best if there's a free, redistributable font file you can embed in
> a
> > jar. (as long as they can't guarantee we can find the same font installed
> > on every OS)
>
> The problem here is that platform-specific behaviour is actually
> desirable: a PDF
> opened in Acrobat on Windows will render Arial instead of Helvetica, if
> PDFBox
> were to bundle its own Helvetica font, we’d be using the wrong font for
> the platform,
> despite it being a perfectly acceptable font. We’ve had users complain
> that PDFBox
> makes different substitutions from Evince and so the same PDF render with
> different
> fonts on the same system when opened in different viewers - we’ve tried to
> fix these
> kinds of issues, but the result is that fonts substitution really should
> be platform-specific.
>
> Having said that, you can always bundle your own fonts and use a custom
> FontProvider
> and PDFBox will give you consistent cross-platfrom rendering, if that’s
> what your
> project’s requirements call for, but out-of-the-box we have to provide
> platform-specific
> behaviour.
>
> — John
>
>
I don't know about regular text substitutions, as you describe using an
installed Arial in place of Helvetica.  I was specifically looking for a
custom replacement font to be included for symbols.  If I create a PDF with
iText with an editable check box object, it puts in a reference to
Zapfdingbats without giving me an option to embed the font.  As Windows
doesn't have this font installed by default, when I tried to read that PDF
back in and render it to the screen with pdfbox, it didn't draw the check
marks.  If you view that same PDF in Adobe Reader on Windows without
Zapfdingbats installed, it says it's using it's actual font Adobe Pi Std.
Assuming you can't package the Adobe font with pdfbox for that
substitution, the free redistributable Noto Sans Symbols font looks like a
fine replacement.

Font replacement can also be an option, if a program wants to tell pdfbox
to use font x in place of font y.

Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
> On 8 Apr 2015, at 10:59, Eric Douglas <ed...@blockhouse.com> wrote:
> 
> Where are you getting the Arial Unicode MS?  It doesn't come with Windows,
> that is, it's not installed on my Windows 8.1 Pro.
> Previously when I referenced a unicode font I used Lucida Sans Unicode.
> My Windows Arial includes Arial Black, Arial Bold, Arial Bold Italic, Arial
> Italic, and Arial Regular.
> 
As you’ve spotted, Arial Unicode MS doesn’t ship with Windows, but with Office, which
kind of ruins my whole idea. We’ll need to take a closer look at the fonts which really
are shipped with Windows. I’m on a Mac, so it’s a little tricky for me.

See: https://www.microsoft.com/typography/fonts/font.aspx?FMID=1081


> Windows likes to change their fonts, which is annoying when you have
> programs that run on different operating systems and you want consistent
> output.
> We used to reference fonts by name but even when it found the same font
> sometimes there were different versions.  We once had 2 machines running
> the same OS, Windows 98 SE, which produced different output from the same
> Courier font file name.
> I started writing Java with Windows XP Pro and copied the Lucida font files
> from the Windows Fonts folder to embed in my jar to make sure my program
> output wouldn't look different when we changed OS.
> It is best if there's a free, redistributable font file you can embed in a
> jar. (as long as they can't guarantee we can find the same font installed
> on every OS)

The problem here is that platform-specific behaviour is actually desirable: a PDF
opened in Acrobat on Windows will render Arial instead of Helvetica, if PDFBox
were to bundle its own Helvetica font, we’d be using the wrong font for the platform,
despite it being a perfectly acceptable font. We’ve had users complain that PDFBox
makes different substitutions from Evince and so the same PDF render with different
fonts on the same system when opened in different viewers - we’ve tried to fix these
kinds of issues, but the result is that fonts substitution really should be platform-specific.

Having said that, you can always bundle your own fonts and use a custom FontProvider
and PDFBox will give you consistent cross-platfrom rendering, if that’s what your
project’s requirements call for, but out-of-the-box we have to provide platform-specific
behaviour.

— John

> On Tue, Apr 7, 2015 at 10:20 PM, John Hewson <jo...@jahewson.com> wrote:
> 
>> I re-opened PDFBOX-1900 and added a new substitute for ZapfDingbats using
>> a font
>> available on Windows. After some research, I found that neither Windings
>> nor Webdings
>> are suitable substitutes and instead chose Arial Unicode MS because it
>> provides
>> coverage for all the ZapfDingbats glyphs via their unicode characters.
>> 
>> This fix will be available in the next 2.0 snapshot build.
>> 
>> — John
>> 
>>> On 7 Apr 2015, at 05:00, Eric Douglas <ed...@blockhouse.com> wrote:
>>> 
>>> On Tue, Apr 7, 2015 at 2:56 AM, John Hewson <jo...@jahewson.com> wrote:
>>> 
>>>> 
>>>> On 6 Apr 2015, at 14:38, Tres Finocchiaro <tr...@gmail.com>
>>>> wrote:
>>>> 
>>>>>> 
>>>>>>> ExternalFonts.addSubstitute("ZapfDingbats", "WingdingsRegular");
>>>>>>> That will map Zapf Dingbats to Webdings. If it works then we can
>>>> include
>>>>>> that substitution by default in PDFBox.
>>>>> 
>>>>> 
>>>>> 
>>>>> Just a lurker chiming in here... If John Hewson's statement is true,
>>>>> doesn't the substitution solve this?
>>>> 
>>>> Yes, we just need to make sure to choose a substitute (Windings,
>>>> Webdings?) which provides the necessary glyphs (I believe that they're
>> all
>>>> in Unicode, so our existing cmap mapping mechanism for TTF glyphs should
>>>> handle it once we map the font name).
>>>> 
>>> 
>>> Is that a real solution?  Is Zapfdingbats available on any platform?  Is
>>> Wingdings available on every platform or free to redistribute?
>>> I don't know what characters are in Zapfdingbats versus Wingdings, but it
>>> would need a mapping.  I tested replacing Zapfdingbats with Wingdings in
>> my
>>> own app yesterday and had to change the character code to print a check
>>> mark.
>>> 
>>> 
>>>> 
>>>>> I have a custom FontMapping.Properties
>>>>> <
>>>> 
>> https://github.com/qzindustries/qz-print/blob/1.8-pdfbox/pdfbox_1.8.4_qz/src/org/apache/pdfbox/resources/FontMapping.properties#L21
>>>>> 
>>>>> (github.com) that I use for this stuff because the font replacement on
>>>>> Linux seems to be lacking for many standard fonts.  If an equivalent
>>>>> exists, shouldn't the project try to use it?
>>>> 
>>>> Yes, usually our font mapper handles this automatically but as you've
>>>> noticed sometimes it's necessary to hard-code some hints.
>>>> 
>>>>> I personally don't like the idea of copying fonts from an Adobe area
>>>> into a
>>>>> systems area, especially as a recommendation for using a Java library.
>>>>> Something feels wrong about that, personally. :) $0.02
>>>>> 
>>>>> -Tres
>>>> 
>>>> ---------------------------------------------------------------------
>>>> 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: pdfbox warnings

Posted by Eric Douglas <ed...@blockhouse.com>.
Where are you getting the Arial Unicode MS?  It doesn't come with Windows,
that is, it's not installed on my Windows 8.1 Pro.
Previously when I referenced a unicode font I used Lucida Sans Unicode.
My Windows Arial includes Arial Black, Arial Bold, Arial Bold Italic, Arial
Italic, and Arial Regular.

Windows likes to change their fonts, which is annoying when you have
programs that run on different operating systems and you want consistent
output.
We used to reference fonts by name but even when it found the same font
sometimes there were different versions.  We once had 2 machines running
the same OS, Windows 98 SE, which produced different output from the same
Courier font file name.
I started writing Java with Windows XP Pro and copied the Lucida font files
from the Windows Fonts folder to embed in my jar to make sure my program
output wouldn't look different when we changed OS.
It is best if there's a free, redistributable font file you can embed in a
jar. (as long as they can't guarantee we can find the same font installed
on every OS)

On Tue, Apr 7, 2015 at 10:20 PM, John Hewson <jo...@jahewson.com> wrote:

> I re-opened PDFBOX-1900 and added a new substitute for ZapfDingbats using
> a font
> available on Windows. After some research, I found that neither Windings
> nor Webdings
> are suitable substitutes and instead chose Arial Unicode MS because it
> provides
> coverage for all the ZapfDingbats glyphs via their unicode characters.
>
> This fix will be available in the next 2.0 snapshot build.
>
> — John
>
> > On 7 Apr 2015, at 05:00, Eric Douglas <ed...@blockhouse.com> wrote:
> >
> > On Tue, Apr 7, 2015 at 2:56 AM, John Hewson <jo...@jahewson.com> wrote:
> >
> >>
> >> On 6 Apr 2015, at 14:38, Tres Finocchiaro <tr...@gmail.com>
> >> wrote:
> >>
> >>>>
> >>>>> ExternalFonts.addSubstitute("ZapfDingbats", "WingdingsRegular");
> >>>>> That will map Zapf Dingbats to Webdings. If it works then we can
> >> include
> >>>> that substitution by default in PDFBox.
> >>>
> >>>
> >>>
> >>> Just a lurker chiming in here... If John Hewson's statement is true,
> >>> doesn't the substitution solve this?
> >>
> >> Yes, we just need to make sure to choose a substitute (Windings,
> >> Webdings?) which provides the necessary glyphs (I believe that they're
> all
> >> in Unicode, so our existing cmap mapping mechanism for TTF glyphs should
> >> handle it once we map the font name).
> >>
> >
> > Is that a real solution?  Is Zapfdingbats available on any platform?  Is
> > Wingdings available on every platform or free to redistribute?
> > I don't know what characters are in Zapfdingbats versus Wingdings, but it
> > would need a mapping.  I tested replacing Zapfdingbats with Wingdings in
> my
> > own app yesterday and had to change the character code to print a check
> > mark.
> >
> >
> >>
> >>> I have a custom FontMapping.Properties
> >>> <
> >>
> https://github.com/qzindustries/qz-print/blob/1.8-pdfbox/pdfbox_1.8.4_qz/src/org/apache/pdfbox/resources/FontMapping.properties#L21
> >>>
> >>> (github.com) that I use for this stuff because the font replacement on
> >>> Linux seems to be lacking for many standard fonts.  If an equivalent
> >>> exists, shouldn't the project try to use it?
> >>
> >> Yes, usually our font mapper handles this automatically but as you've
> >> noticed sometimes it's necessary to hard-code some hints.
> >>
> >>> I personally don't like the idea of copying fonts from an Adobe area
> >> into a
> >>> systems area, especially as a recommendation for using a Java library.
> >>> Something feels wrong about that, personally. :) $0.02
> >>>
> >>> -Tres
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> >> For additional commands, e-mail: users-help@pdfbox.apache.org
> >>
> >>
>
>

Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
I re-opened PDFBOX-1900 and added a new substitute for ZapfDingbats using a font
available on Windows. After some research, I found that neither Windings nor Webdings
are suitable substitutes and instead chose Arial Unicode MS because it provides
coverage for all the ZapfDingbats glyphs via their unicode characters.

This fix will be available in the next 2.0 snapshot build.

— John

> On 7 Apr 2015, at 05:00, Eric Douglas <ed...@blockhouse.com> wrote:
> 
> On Tue, Apr 7, 2015 at 2:56 AM, John Hewson <jo...@jahewson.com> wrote:
> 
>> 
>> On 6 Apr 2015, at 14:38, Tres Finocchiaro <tr...@gmail.com>
>> wrote:
>> 
>>>> 
>>>>> ExternalFonts.addSubstitute("ZapfDingbats", "WingdingsRegular");
>>>>> That will map Zapf Dingbats to Webdings. If it works then we can
>> include
>>>> that substitution by default in PDFBox.
>>> 
>>> 
>>> 
>>> Just a lurker chiming in here... If John Hewson's statement is true,
>>> doesn't the substitution solve this?
>> 
>> Yes, we just need to make sure to choose a substitute (Windings,
>> Webdings?) which provides the necessary glyphs (I believe that they're all
>> in Unicode, so our existing cmap mapping mechanism for TTF glyphs should
>> handle it once we map the font name).
>> 
> 
> Is that a real solution?  Is Zapfdingbats available on any platform?  Is
> Wingdings available on every platform or free to redistribute?
> I don't know what characters are in Zapfdingbats versus Wingdings, but it
> would need a mapping.  I tested replacing Zapfdingbats with Wingdings in my
> own app yesterday and had to change the character code to print a check
> mark.
> 
> 
>> 
>>> I have a custom FontMapping.Properties
>>> <
>> https://github.com/qzindustries/qz-print/blob/1.8-pdfbox/pdfbox_1.8.4_qz/src/org/apache/pdfbox/resources/FontMapping.properties#L21
>>> 
>>> (github.com) that I use for this stuff because the font replacement on
>>> Linux seems to be lacking for many standard fonts.  If an equivalent
>>> exists, shouldn't the project try to use it?
>> 
>> Yes, usually our font mapper handles this automatically but as you've
>> noticed sometimes it's necessary to hard-code some hints.
>> 
>>> I personally don't like the idea of copying fonts from an Adobe area
>> into a
>>> systems area, especially as a recommendation for using a Java library.
>>> Something feels wrong about that, personally. :) $0.02
>>> 
>>> -Tres
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>> 
>> 


Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
> On 7 Apr 2015, at 05:00, Eric Douglas <ed...@blockhouse.com> wrote:
> 
>> On Tue, Apr 7, 2015 at 2:56 AM, John Hewson <jo...@jahewson.com> wrote:
>> 
>> 
>> On 6 Apr 2015, at 14:38, Tres Finocchiaro <tr...@gmail.com>
>> wrote:
>> 
>>>> 
>>>>> ExternalFonts.addSubstitute("ZapfDingbats", "WingdingsRegular");
>>>>> That will map Zapf Dingbats to Webdings. If it works then we can
>> include
>>>> that substitution by default in PDFBox.
>>> 
>>> 
>>> 
>>> Just a lurker chiming in here... If John Hewson's statement is true,
>>> doesn't the substitution solve this?
>> 
>> Yes, we just need to make sure to choose a substitute (Windings,
>> Webdings?) which provides the necessary glyphs (I believe that they're all
>> in Unicode, so our existing cmap mapping mechanism for TTF glyphs should
>> handle it once we map the font name).
>> 
> 
> Is that a real solution?  Is Zapfdingbats available on any platform?  Is
> Wingdings available on every platform or free to redistribute?

Yes, OS X ships with "ZapfDingbatsITC" and URW++ "Dingbats" ships with Ghostscript, so is at least available on Linux. PDFBox already ships with these mappings built-in.

Webdings is also available on Linux via the legacy free "Microsoft core fonts for the web" package, though we don't map to it (yet).

> I don't know what characters are in Zapfdingbats versus Wingdings, but it
> would need a mapping.

The characters from ZapfDigbats are in Unicode, so should map automatically, bugs notwithstanding.

> I tested replacing Zapfdingbats with Wingdings in my
> own app yesterday and had to change the character code to print a check
> mark.

We'll definitely have to check that the mapping is appropriate/valid and customise it if necessary.

>> 
>>> I have a custom FontMapping.Properties
>>> <
>> https://github.com/qzindustries/qz-print/blob/1.8-pdfbox/pdfbox_1.8.4_qz/src/org/apache/pdfbox/resources/FontMapping.properties#L21
>>> 
>>> (github.com) that I use for this stuff because the font replacement on
>>> Linux seems to be lacking for many standard fonts.  If an equivalent
>>> exists, shouldn't the project try to use it?
>> 
>> Yes, usually our font mapper handles this automatically but as you've
>> noticed sometimes it's necessary to hard-code some hints.
>> 
>>> I personally don't like the idea of copying fonts from an Adobe area
>> into a
>>> systems area, especially as a recommendation for using a Java library.
>>> Something feels wrong about that, personally. :) $0.02
>>> 
>>> -Tres
>> 
>> ---------------------------------------------------------------------
>> 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: pdfbox warnings

Posted by Eric Douglas <ed...@blockhouse.com>.
On Tue, Apr 7, 2015 at 2:56 AM, John Hewson <jo...@jahewson.com> wrote:

>
> On 6 Apr 2015, at 14:38, Tres Finocchiaro <tr...@gmail.com>
> wrote:
>
> >>
> >>> ExternalFonts.addSubstitute("ZapfDingbats", "WingdingsRegular");
> >>> That will map Zapf Dingbats to Webdings. If it works then we can
> include
> >> that substitution by default in PDFBox.
> >
> >
> >
> > Just a lurker chiming in here... If John Hewson's statement is true,
> > doesn't the substitution solve this?
>
> Yes, we just need to make sure to choose a substitute (Windings,
> Webdings?) which provides the necessary glyphs (I believe that they're all
> in Unicode, so our existing cmap mapping mechanism for TTF glyphs should
> handle it once we map the font name).
>

Is that a real solution?  Is Zapfdingbats available on any platform?  Is
Wingdings available on every platform or free to redistribute?
I don't know what characters are in Zapfdingbats versus Wingdings, but it
would need a mapping.  I tested replacing Zapfdingbats with Wingdings in my
own app yesterday and had to change the character code to print a check
mark.


>
> > I have a custom FontMapping.Properties
> > <
> https://github.com/qzindustries/qz-print/blob/1.8-pdfbox/pdfbox_1.8.4_qz/src/org/apache/pdfbox/resources/FontMapping.properties#L21
> >
> > (github.com) that I use for this stuff because the font replacement on
> > Linux seems to be lacking for many standard fonts.  If an equivalent
> > exists, shouldn't the project try to use it?
>
> Yes, usually our font mapper handles this automatically but as you've
> noticed sometimes it's necessary to hard-code some hints.
>
> > I personally don't like the idea of copying fonts from an Adobe area
> into a
> > systems area, especially as a recommendation for using a Java library.
> > Something feels wrong about that, personally. :) $0.02
> >
> > -Tres
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
On 6 Apr 2015, at 14:38, Tres Finocchiaro <tr...@gmail.com> wrote:

>> 
>>> ExternalFonts.addSubstitute("ZapfDingbats", "WingdingsRegular");
>>> That will map Zapf Dingbats to Webdings. If it works then we can include
>> that substitution by default in PDFBox.
> 
> 
> 
> Just a lurker chiming in here... If John Hewson's statement is true,
> doesn't the substitution solve this?

Yes, we just need to make sure to choose a substitute (Windings, Webdings?) which provides the necessary glyphs (I believe that they're all in Unicode, so our existing cmap mapping mechanism for TTF glyphs should handle it once we map the font name).

> I have a custom FontMapping.Properties
> <https://github.com/qzindustries/qz-print/blob/1.8-pdfbox/pdfbox_1.8.4_qz/src/org/apache/pdfbox/resources/FontMapping.properties#L21>
> (github.com) that I use for this stuff because the font replacement on
> Linux seems to be lacking for many standard fonts.  If an equivalent
> exists, shouldn't the project try to use it?

Yes, usually our font mapper handles this automatically but as you've noticed sometimes it's necessary to hard-code some hints.

> I personally don't like the idea of copying fonts from an Adobe area into a
> systems area, especially as a recommendation for using a Java library.
> Something feels wrong about that, personally. :) $0.02
> 
> -Tres

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


Re: pdfbox warnings

Posted by Tres Finocchiaro <tr...@gmail.com>.
>
> > ExternalFonts.addSubstitute("ZapfDingbats", "WingdingsRegular");
> > That will map Zapf Dingbats to Webdings. If it works then we can include
> that substitution by default in PDFBox.



Just a lurker chiming in here... If John Hewson's statement is true,
doesn't the substitution solve this?

I have a custom FontMapping.Properties
<https://github.com/qzindustries/qz-print/blob/1.8-pdfbox/pdfbox_1.8.4_qz/src/org/apache/pdfbox/resources/FontMapping.properties#L21>
 (github.com) that I use for this stuff because the font replacement on
Linux seems to be lacking for many standard fonts.  If an equivalent
exists, shouldn't the project try to use it?

I personally don't like the idea of copying fonts from an Adobe area into a
systems area, especially as a recommendation for using a Java library.
Something feels wrong about that, personally. :) $0.02

-Tres

Re: pdfbox warnings

Posted by Peter Murray-Rust <pm...@cam.ac.uk>.
The rubric in Core14_AFMs/MustRead.html reads:

"This file and the 14 PostScript(R) AFM files it accompanies may be used,
copied, and distributed for any purpose and without charge, with or without
modification, provided that all copyright notices are retained; that the
AFM files are not distributed without this file; that all modifications to
this file or any of the AFM files are prominently noted in the modified
file(s); and that this paragraph is not modified. Adobe Systems has no
responsibility or obligation to support the use of the AFM files."
 C"ol

On Mon, Apr 6, 2015 at 9:46 PM, Eric Douglas <ed...@blockhouse.com>
wrote:

> I'm not sure the licensing, but I would think if you can't ship
> Zapfdingbats Type 1 font with an open source application that renders PDFs,
> you should be able to include the Adobe Pi Std because it doesn't make
> sense to say those 14 fonts are part of the PDF standard then make people
> pay to use them.
>

A standard does not necessarily have to be free to implement (and ISO
itself charges 198 Swiss Francs for the PDF standard ISO32000 -
http://www.iso.org/iso/catalogue_detail.htm?csnumber=51502);

We may also have to differentiate between "licence to use" and "licence to
redistribute"



-- 
Peter Murray-Rust
Reader in Molecular Informatics
Unilever Centre, Dep. Of Chemistry
University of Cambridge
CB2 1EW, UK
+44-1223-763069

Re: pdfbox warnings

Posted by Eric Douglas <ed...@blockhouse.com>.
Here's what I could find, it appears Adobe shipped Zapfdingbats (and other
fonts) with Acrobat Reader up to about version 5 or 6.  Now they'll display
Zapfdingbats characters using the Zapfdingbats font if you have that font
installed (apparently not free, unless you can copy it out of an old Adobe
Reader install?), otherwise they display the characters out of the Adobe Pi
Std, which appears to be a grand mash of multiple fonts.  You can find that
font in the Adobe install folder and install the font to Windows.  Then you
can view that font in the "Character Map" app which tells us there's
various check mark characters, one of them is U+2713.
I'm not sure the licensing, but I would think if you can't ship
Zapfdingbats Type 1 font with an open source application that renders PDFs,
you should be able to include the Adobe Pi Std because it doesn't make
sense to say those 14 fonts are part of the PDF standard then make people
pay to use them.  If not?  There should be some other free distributable
replacement.

On Mon, Apr 6, 2015 at 3:23 PM, Tilman Hausherr <TH...@t-online.de>
wrote:

> Am 06.04.2015 um 21:16 schrieb Eric Douglas:
>
>> Adobe provides the AFM...
>> http://www.adobe.com/devnet/font.html
>> http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/
>> font/pdfs/Core14_AFMs.zip
>>
>> Their 14 fonts are supposed to always work on every device.
>> http://www.verypdf.com/document/pdf-format-reference/pg_0416.htm
>>
>
> Yes, because the viewer must have the font available. I found the font in
> a very old installation of Acrobat Reader. I can't find it in the current
> one, I assume it is hidden somehow.
>
> Tilman
>
>
>
>> On Mon, Apr 6, 2015 at 12:49 PM, Peter Murray-Rust <pm...@cam.ac.uk>
>> wrote:
>>
>>  [Please correct me if I'm wrong...]
>>>
>>> ZapfDingbats (http://en.wikipedia.org/wiki/Zapf_Dingbats ) is a
>>> copyrighted
>>> font. Therefore it breaks copyright to copy it without permission. Since
>>> PDFBox is Open (has a distribution compatible with the Open Definition (
>>> http://opendefinition.org/ ) which allows anyone to copy, modify and
>>> re-use
>>> it), it cannot include materials which have restrictive licences (and may
>>> require purchase).
>>>
>>> PDFBox relies on the target OS distribution to include some of the 14
>>> fonts. Since Windows doesn't have ZapfDingbats it is missing by default
>>> and
>>> PDFBox cannot rectify this.
>>>
>>> This will also mean that anyone who has separately licensed ZapfDingbats
>>> (or an equivalent with a restrictive licence) cannot include them in
>>> derivative works of PDFBox.
>>>
>>> The problem would appear to arise from the PDF standard requiring a
>>> copyrighted font.
>>>
>>> P.
>>>
>>>
>>> P.
>>>
>>>
>>> On Mon, Apr 6, 2015 at 5:31 PM, John Hewson <jo...@jahewson.com> wrote:
>>>
>>>  On 6 Apr 2015, at 08:59, Eric Douglas <ed...@blockhouse.com> wrote:
>>>>>
>>>>> ZapfDingbats should be there, shouldn't have to substitute, as you
>>>>> mentioned.
>>>>>
>>>> No, these are not the same issues. PDFBox should always be able to
>>>>
>>> provide
>>>
>>>> ZapfDingbats but that font doesn't ship with Windows, so we need to
>>>> substitute it for Windings on that platform. On the Mac this isn't a
>>>> problem.
>>>>
>>>>  https://issues.apache.org/jira/browse/PDFBOX-1900
>>>>> John Hewson
>>>>> <https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jahewson>
>>>>>
>>>> added
>>>>
>>>>> a comment - 11/Feb/14 00:55
>>>>>
>>>>> This is a PDFBox bug. Zapf Dingbats is one of the standard 14 fonts
>>>>>
>>>> that
>>>
>>>> should always work without being embedded.
>>>>> ​
>>>>> As mentioned on that bug report, I had actually created this PDF using
>>>>> iText, which doesn't appear to give any way to embed the font.
>>>>> I got a rendering problem on pdfbox trying to read this PDF back in,
>>>>> because this font is not embedded or installed, though Adobe renders it
>>>>> just fine.
>>>>> This will likely come up again someday, though I worked around this for
>>>>> now, since as I mentioned this is a PDF I'm creating.  I changed this
>>>>> instance to render to the Graphics using the original object I created
>>>>>
>>>> it
>>>
>>>> from instead of reading the PDF after it's created.
>>>>>
>>>>> I will test that ExternalFonts.addSubstitute when I get time, as
>>>>>
>>>> another
>>>
>>>> workaround.
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>>
>>>>
>>>>
>>> --
>>> Peter Murray-Rust
>>> Reader in Molecular Informatics
>>> Unilever Centre, Dep. Of Chemistry
>>> University of Cambridge
>>> CB2 1EW, UK
>>> +44-1223-763069
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: pdfbox warnings

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 06.04.2015 um 21:16 schrieb Eric Douglas:
> Adobe provides the AFM...
> http://www.adobe.com/devnet/font.html
> http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/Core14_AFMs.zip
>
> Their 14 fonts are supposed to always work on every device.
> http://www.verypdf.com/document/pdf-format-reference/pg_0416.htm

Yes, because the viewer must have the font available. I found the font 
in a very old installation of Acrobat Reader. I can't find it in the 
current one, I assume it is hidden somehow.

Tilman

>
> On Mon, Apr 6, 2015 at 12:49 PM, Peter Murray-Rust <pm...@cam.ac.uk> wrote:
>
>> [Please correct me if I'm wrong...]
>>
>> ZapfDingbats (http://en.wikipedia.org/wiki/Zapf_Dingbats ) is a
>> copyrighted
>> font. Therefore it breaks copyright to copy it without permission. Since
>> PDFBox is Open (has a distribution compatible with the Open Definition (
>> http://opendefinition.org/ ) which allows anyone to copy, modify and
>> re-use
>> it), it cannot include materials which have restrictive licences (and may
>> require purchase).
>>
>> PDFBox relies on the target OS distribution to include some of the 14
>> fonts. Since Windows doesn't have ZapfDingbats it is missing by default and
>> PDFBox cannot rectify this.
>>
>> This will also mean that anyone who has separately licensed ZapfDingbats
>> (or an equivalent with a restrictive licence) cannot include them in
>> derivative works of PDFBox.
>>
>> The problem would appear to arise from the PDF standard requiring a
>> copyrighted font.
>>
>> P.
>>
>>
>> P.
>>
>>
>> On Mon, Apr 6, 2015 at 5:31 PM, John Hewson <jo...@jahewson.com> wrote:
>>
>>>> On 6 Apr 2015, at 08:59, Eric Douglas <ed...@blockhouse.com> wrote:
>>>>
>>>> ZapfDingbats should be there, shouldn't have to substitute, as you
>>>> mentioned.
>>> No, these are not the same issues. PDFBox should always be able to
>> provide
>>> ZapfDingbats but that font doesn't ship with Windows, so we need to
>>> substitute it for Windings on that platform. On the Mac this isn't a
>>> problem.
>>>
>>>> https://issues.apache.org/jira/browse/PDFBOX-1900
>>>> John Hewson
>>>> <https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jahewson>
>>> added
>>>> a comment - 11/Feb/14 00:55
>>>>
>>>> This is a PDFBox bug. Zapf Dingbats is one of the standard 14 fonts
>> that
>>>> should always work without being embedded.
>>>> ​
>>>> As mentioned on that bug report, I had actually created this PDF using
>>>> iText, which doesn't appear to give any way to embed the font.
>>>> I got a rendering problem on pdfbox trying to read this PDF back in,
>>>> because this font is not embedded or installed, though Adobe renders it
>>>> just fine.
>>>> This will likely come up again someday, though I worked around this for
>>>> now, since as I mentioned this is a PDF I'm creating.  I changed this
>>>> instance to render to the Graphics using the original object I created
>> it
>>>> from instead of reading the PDF after it's created.
>>>>
>>>> I will test that ExternalFonts.addSubstitute when I get time, as
>> another
>>>> workaround.
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>
>>>
>>
>> --
>> Peter Murray-Rust
>> Reader in Molecular Informatics
>> Unilever Centre, Dep. Of Chemistry
>> University of Cambridge
>> CB2 1EW, UK
>> +44-1223-763069
>>


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


Re: pdfbox warnings

Posted by Eric Douglas <ed...@blockhouse.com>.
Adobe provides the AFM...
http://www.adobe.com/devnet/font.html
http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/Core14_AFMs.zip

Their 14 fonts are supposed to always work on every device.
http://www.verypdf.com/document/pdf-format-reference/pg_0416.htm

On Mon, Apr 6, 2015 at 12:49 PM, Peter Murray-Rust <pm...@cam.ac.uk> wrote:

> [Please correct me if I'm wrong...]
>
> ZapfDingbats (http://en.wikipedia.org/wiki/Zapf_Dingbats ) is a
> copyrighted
> font. Therefore it breaks copyright to copy it without permission. Since
> PDFBox is Open (has a distribution compatible with the Open Definition (
> http://opendefinition.org/ ) which allows anyone to copy, modify and
> re-use
> it), it cannot include materials which have restrictive licences (and may
> require purchase).
>
> PDFBox relies on the target OS distribution to include some of the 14
> fonts. Since Windows doesn't have ZapfDingbats it is missing by default and
> PDFBox cannot rectify this.
>
> This will also mean that anyone who has separately licensed ZapfDingbats
> (or an equivalent with a restrictive licence) cannot include them in
> derivative works of PDFBox.
>
> The problem would appear to arise from the PDF standard requiring a
> copyrighted font.
>
> P.
>
>
> P.
>
>
> On Mon, Apr 6, 2015 at 5:31 PM, John Hewson <jo...@jahewson.com> wrote:
>
> >
> > > On 6 Apr 2015, at 08:59, Eric Douglas <ed...@blockhouse.com> wrote:
> > >
> > > ZapfDingbats should be there, shouldn't have to substitute, as you
> > > mentioned.
> >
> > No, these are not the same issues. PDFBox should always be able to
> provide
> > ZapfDingbats but that font doesn't ship with Windows, so we need to
> > substitute it for Windings on that platform. On the Mac this isn't a
> > problem.
> >
> > > https://issues.apache.org/jira/browse/PDFBOX-1900
> > > John Hewson
> > > <https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jahewson>
> > added
> > > a comment - 11/Feb/14 00:55
> > >
> > > This is a PDFBox bug. Zapf Dingbats is one of the standard 14 fonts
> that
> > > should always work without being embedded.
> > > ​
> > > As mentioned on that bug report, I had actually created this PDF using
> > > iText, which doesn't appear to give any way to embed the font.
> > > I got a rendering problem on pdfbox trying to read this PDF back in,
> > > because this font is not embedded or installed, though Adobe renders it
> > > just fine.
> > > This will likely come up again someday, though I worked around this for
> > > now, since as I mentioned this is a PDF I'm creating.  I changed this
> > > instance to render to the Graphics using the original object I created
> it
> > > from instead of reading the PDF after it's created.
> > >
> > > I will test that ExternalFonts.addSubstitute when I get time, as
> another
> > > workaround.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > For additional commands, e-mail: users-help@pdfbox.apache.org
> >
> >
>
>
> --
> Peter Murray-Rust
> Reader in Molecular Informatics
> Unilever Centre, Dep. Of Chemistry
> University of Cambridge
> CB2 1EW, UK
> +44-1223-763069
>

Re: pdfbox warnings

Posted by Peter Murray-Rust <pm...@cam.ac.uk>.
[Please correct me if I'm wrong...]

ZapfDingbats (http://en.wikipedia.org/wiki/Zapf_Dingbats ) is a copyrighted
font. Therefore it breaks copyright to copy it without permission. Since
PDFBox is Open (has a distribution compatible with the Open Definition (
http://opendefinition.org/ ) which allows anyone to copy, modify and re-use
it), it cannot include materials which have restrictive licences (and may
require purchase).

PDFBox relies on the target OS distribution to include some of the 14
fonts. Since Windows doesn't have ZapfDingbats it is missing by default and
PDFBox cannot rectify this.

This will also mean that anyone who has separately licensed ZapfDingbats
(or an equivalent with a restrictive licence) cannot include them in
derivative works of PDFBox.

The problem would appear to arise from the PDF standard requiring a
copyrighted font.

P.


P.


On Mon, Apr 6, 2015 at 5:31 PM, John Hewson <jo...@jahewson.com> wrote:

>
> > On 6 Apr 2015, at 08:59, Eric Douglas <ed...@blockhouse.com> wrote:
> >
> > ZapfDingbats should be there, shouldn't have to substitute, as you
> > mentioned.
>
> No, these are not the same issues. PDFBox should always be able to provide
> ZapfDingbats but that font doesn't ship with Windows, so we need to
> substitute it for Windings on that platform. On the Mac this isn't a
> problem.
>
> > https://issues.apache.org/jira/browse/PDFBOX-1900
> > John Hewson
> > <https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jahewson>
> added
> > a comment - 11/Feb/14 00:55
> >
> > This is a PDFBox bug. Zapf Dingbats is one of the standard 14 fonts that
> > should always work without being embedded.
> > ​
> > As mentioned on that bug report, I had actually created this PDF using
> > iText, which doesn't appear to give any way to embed the font.
> > I got a rendering problem on pdfbox trying to read this PDF back in,
> > because this font is not embedded or installed, though Adobe renders it
> > just fine.
> > This will likely come up again someday, though I worked around this for
> > now, since as I mentioned this is a PDF I'm creating.  I changed this
> > instance to render to the Graphics using the original object I created it
> > from instead of reading the PDF after it's created.
> >
> > I will test that ExternalFonts.addSubstitute when I get time, as another
> > workaround.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>


-- 
Peter Murray-Rust
Reader in Molecular Informatics
Unilever Centre, Dep. Of Chemistry
University of Cambridge
CB2 1EW, UK
+44-1223-763069

Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
> On 6 Apr 2015, at 08:59, Eric Douglas <ed...@blockhouse.com> wrote:
> 
> ZapfDingbats should be there, shouldn't have to substitute, as you
> mentioned.

No, these are not the same issues. PDFBox should always be able to provide ZapfDingbats but that font doesn't ship with Windows, so we need to substitute it for Windings on that platform. On the Mac this isn't a problem.

> https://issues.apache.org/jira/browse/PDFBOX-1900
> John Hewson
> <https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jahewson> added
> a comment - 11/Feb/14 00:55
> 
> This is a PDFBox bug. Zapf Dingbats is one of the standard 14 fonts that
> should always work without being embedded.
> ​
> As mentioned on that bug report, I had actually created this PDF using
> iText, which doesn't appear to give any way to embed the font.
> I got a rendering problem on pdfbox trying to read this PDF back in,
> because this font is not embedded or installed, though Adobe renders it
> just fine.
> This will likely come up again someday, though I worked around this for
> now, since as I mentioned this is a PDF I'm creating.  I changed this
> instance to render to the Graphics using the original object I created it
> from instead of reading the PDF after it's created.
> 
> I will test that ExternalFonts.addSubstitute when I get time, as another
> workaround.

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


Re: pdfbox warnings

Posted by Eric Douglas <ed...@blockhouse.com>.
ZapfDingbats should be there, shouldn't have to substitute, as you
mentioned.
https://issues.apache.org/jira/browse/PDFBOX-1900
John Hewson
<https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jahewson> added
a comment - 11/Feb/14 00:55

This is a PDFBox bug. Zapf Dingbats is one of the standard 14 fonts that
should always work without being embedded.
​
As mentioned on that bug report, I had actually created this PDF using
iText, which doesn't appear to give any way to embed the font.
I got a rendering problem on pdfbox trying to read this PDF back in,
because this font is not embedded or installed, though Adobe renders it
just fine.
This will likely come up again someday, though I worked around this for
now, since as I mentioned this is a PDF I'm creating.  I changed this
instance to render to the Graphics using the original object I created it
from instead of reading the PDF after it's created.

I will test that ExternalFonts.addSubstitute when I get time, as another
workaround.

Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
I think the problem is that we don’t have have built-in Zapf Dingbats substitution on Windows, try running the following line before anything else:

ExternalFonts.addSubstitute("ZapfDingbats", "WingdingsRegular");

That will map Zapf Dingbats to Webdings. If it works then we can include that substitution by default in PDFBox.

— John

> On 31 Mar 2015, at 14:20, Tilman Hausherr <TH...@t-online.de> wrote:
> 
> Am 31.03.2015 um 21:27 schrieb Eric Douglas:
>> OK how about my Google Drive?
>> 
>> https://drive.google.com/file/d/0B2v-yhJD9tS7WE9NemlRZHd6NlE/view?usp=sharing
> 
> It displays fine if I have the file ZD______.PFB in my c:\windows\fonts directory. If I remove it, I get these messages:
> 
> Mrz 31, 2015 11:16:48 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
> WARNUNG: Using fallback font ArialMT for base font ZapfDingbats
> Mrz 31, 2015 11:16:48 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
> WARNUNG: Using fallback font ArialMT for ZapfDingbats
> Mrz 31, 2015 11:16:48 PM org.apache.pdfbox.rendering.Type1Glyph2D getPathForCharacterCode
> WARNUNG: No glyph for 52 (.notdef) in font ZapfDingbats
> Mrz 31, 2015 11:16:48 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
> WARNUNG: Using fallback font ArialMT for ZapfDingbats
> Mrz 31, 2015 11:16:49 PM org.apache.pdfbox.rendering.Type1Glyph2D getPathForCharacterCode
> WARNUNG: No glyph for 52 (.notdef) in font ZapfDingbats
> Mrz 31, 2015 11:16:49 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
> WARNUNG: Using fallback font ArialMT for ZapfDingbats
> Mrz 31, 2015 11:16:49 PM org.apache.pdfbox.rendering.Type1Glyph2D getPathForCharacterCode
> WARNUNG: No glyph for 52 (.notdef) in font ZapfDingbats
> 
> 
> Tilman
> 
> 
>> 
>> On Tue, Mar 31, 2015 at 1:42 PM, John Hewson <jo...@jahewson.com> wrote:
>> 
>>>> On 26 Mar 2015, at 10:41, Eric Douglas <ed...@blockhouse.com> wrote:
>>>> 
>>>> I can upload a small sample PDF that shows this error if it helps.
>>> 
>>> Yes, please do.
>>> 
>>> — John
>>> 
>>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


Re: pdfbox warnings

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 31.03.2015 um 21:27 schrieb Eric Douglas:
> OK how about my Google Drive?
>
> https://drive.google.com/file/d/0B2v-yhJD9tS7WE9NemlRZHd6NlE/view?usp=sharing

It displays fine if I have the file ZD______.PFB in my c:\windows\fonts 
directory. If I remove it, I get these messages:

Mrz 31, 2015 11:16:48 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
WARNUNG: Using fallback font ArialMT for base font ZapfDingbats
Mrz 31, 2015 11:16:48 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
WARNUNG: Using fallback font ArialMT for ZapfDingbats
Mrz 31, 2015 11:16:48 PM org.apache.pdfbox.rendering.Type1Glyph2D 
getPathForCharacterCode
WARNUNG: No glyph for 52 (.notdef) in font ZapfDingbats
Mrz 31, 2015 11:16:48 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
WARNUNG: Using fallback font ArialMT for ZapfDingbats
Mrz 31, 2015 11:16:49 PM org.apache.pdfbox.rendering.Type1Glyph2D 
getPathForCharacterCode
WARNUNG: No glyph for 52 (.notdef) in font ZapfDingbats
Mrz 31, 2015 11:16:49 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
WARNUNG: Using fallback font ArialMT for ZapfDingbats
Mrz 31, 2015 11:16:49 PM org.apache.pdfbox.rendering.Type1Glyph2D 
getPathForCharacterCode
WARNUNG: No glyph for 52 (.notdef) in font ZapfDingbats


Tilman


>
> On Tue, Mar 31, 2015 at 1:42 PM, John Hewson <jo...@jahewson.com> wrote:
>
>>> On 26 Mar 2015, at 10:41, Eric Douglas <ed...@blockhouse.com> wrote:
>>>
>>> I can upload a small sample PDF that shows this error if it helps.
>>
>> Yes, please do.
>>
>> — John
>>
>>


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


Re: pdfbox warnings

Posted by Eric Douglas <ed...@blockhouse.com>.
OK how about my Google Drive?

https://drive.google.com/file/d/0B2v-yhJD9tS7WE9NemlRZHd6NlE/view?usp=sharing

On Tue, Mar 31, 2015 at 1:42 PM, John Hewson <jo...@jahewson.com> wrote:

>
> > On 26 Mar 2015, at 10:41, Eric Douglas <ed...@blockhouse.com> wrote:
> >
> > I can upload a small sample PDF that shows this error if it helps.
>
>
> Yes, please do.
>
> — John
>
>

Re: pdfbox warnings

Posted by John Hewson <jo...@jahewson.com>.
> On 26 Mar 2015, at 10:41, Eric Douglas <ed...@blockhouse.com> wrote:
> 
> I can upload a small sample PDF that shows this error if it helps.


Yes, please do.

— John


Re: pdfbox warnings

Posted by Eric Douglas <ed...@blockhouse.com>.
I don't know where the fallback font comes from but it doesn't work.  If I
view the PDF in Abode Reader it has an editable checkbox with a check mark
in it.  The image rendered by pdfbox is just an empty box.
I am using pdfbox 2.0.0 from a trunk.
I can upload a small sample PDF that shows this error if it helps.
I have a ZapfDingbats.ttf file but I can't see any way to embed that for
the editable checkbox.  I'm creating the PDF using iText.
If I view the PDF in Adobe Reader and check Properties, on the Fonts tab it
shows
ZapfDingbats
  Type: Type 1
  Encoding: Built-in
  Actual Font: AdobePiStd
  Actual Font Type: Type 1
My normal fonts for text that properly embedded which render fine with this
trunk show as
LucidaSans-Typewriter (Embedded Subset)
  Type: TrueType
  Encoding: Custom

On Thu, Mar 26, 2015 at 12:23 PM, Tilman Hausherr <TH...@t-online.de>
wrote:

> Am 26.03.2015 um 14:16 schrieb Eric Douglas:
>
>  When I call the PDFRenderer renderPageToGraphics method I get warnings in
>> my log.
>> Is there a fix for these?
>>
>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>> WARNING: Using fallback font ArialMT for ZapfDingbats
>> org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode
>> WARNING: No glyph for 52 (.notdef) in font ZapfDingbats
>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>> WARNING: Using fallback font ArialMT for ZapfDingbats
>>
>>
> Yes, buy a ZapfDingbats type 1 font and copy it into your font directory.
> Or maybe you already have it, then the file is named "ZD______.PFB".
> License restrictions may apply.
>
> Tilman
>
> PS: alwyays mention the version (in your case "trunk" or "2.0")
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: pdfbox warnings

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 26.03.2015 um 14:16 schrieb Eric Douglas:
> When I call the PDFRenderer renderPageToGraphics method I get warnings in
> my log.
> Is there a fix for these?
>
> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
> WARNING: Using fallback font ArialMT for ZapfDingbats
> org.apache.pdfbox.rendering.font.Type1Glyph2D getPathForCharacterCode
> WARNING: No glyph for 52 (.notdef) in font ZapfDingbats
> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
> WARNING: Using fallback font ArialMT for ZapfDingbats
>

Yes, buy a ZapfDingbats type 1 font and copy it into your font 
directory. Or maybe you already have it, then the file is named 
"ZD______.PFB". License restrictions may apply.

Tilman

PS: alwyays mention the version (in your case "trunk" or "2.0")


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