[ 
https://issues.apache.org/jira/browse/PDFBOX-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14307881#comment-14307881
 ] 

John Hewson edited comment on PDFBOX-2661 at 2/5/15 8:01 PM:
-------------------------------------------------------------

After some heavy-duty Googling it looks like this undocumented font mapping 
mechanism was put into Acrobat to either work around a bug in an early version 
of Acrobat or another tool which makes use of the _pdfmark_ operator in 
PostScript. Use of the abbreviated names with pdfmark can bee seen in Adobe's 
own [Acrobat SDK 
documentation|http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdfmarkReference_v9.pdf]
 on p71, where those names are used with the correct corresponding resources. 
Presumably at some point in the past may PDFs were generated using those names, 
but with the resources missing.

I've found these names used in 
[pdflib|http://math2.org/luasearch-2/luadist-extract/cdlua-5.2.dist/src/pdflib/font/ft_corefont.c],
 
[reportlab|https://github.com/eduardocereto/reportlab/blob/master/src/reportlab/pdfbase/pdfform.py#L226],
 and 
[iText|http://www.fsfla.org/svn/fsfla/software/irpf-livre-2013/src/com/lowagie/text/pdf/PdfAppearance.java],
 which lists the following:

{code}
Courier-BoldOblique -> CoBO
Courier-Bold -> CoBo
Courier-Oblique -> CoOb
Courier -> Cour
Helvetica-BoldOblique -> HeBO
Helvetica-Bold -> HeBo
Helvetica-Oblique -> HeOb
Helvetica -> Helv
Symbol -> Symb
Times-BoldItalic -> TiBI
Times-Bold -> TiBo
Times-Italic -> TiIt
Times-Roman -> TiRo
ZapfDingbats -> ZaDb
HYSMyeongJo-Medium -> HySm
HYGoThic-Medium -> HyGo
HeiseiKakuGo-W5 -> KaGo
HeiseiMin-W3 -> KaMi
MHei-Medium -> MHei
MSung-Light -> MSun
STSong-Light -> STSo
MSungStd-Light -> MSun
STSongStd-Light -> STSo
HYSMyeongJoStd-Medium -> HySm
KozMinPro-Regular -> KaMi
{code}


was (Author: jahewson):
After some heavy-duty Googling it looks like this undocumented font mapping 
mechanism was put into Acrobat to either work around a bug in an early version 
of Acrobat or another tool which makes use of the _pdfmark_ operator in 
PostScript. Use of the abbreviated names with pdfmark can bee seen in Adobe's 
own [Acrobat SDK 
documentation|http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdfmarkReference_v9.pdf]
 on p71, where those names are used with the correct corresponding resources.

I've found these names used in 
[pdflib|http://math2.org/luasearch-2/luadist-extract/cdlua-5.2.dist/src/pdflib/font/ft_corefont.c],
 
[reportlab|https://github.com/eduardocereto/reportlab/blob/master/src/reportlab/pdfbase/pdfform.py#L226],
 and 
[iText|http://www.fsfla.org/svn/fsfla/software/irpf-livre-2013/src/com/lowagie/text/pdf/PdfAppearance.java],
 which lists these substitutes:

{code}
Courier-BoldOblique -> CoBO
Courier-Bold -> CoBo
Courier-Oblique -> CoOb
Courier -> Cour
Helvetica-BoldOblique -> HeBO
Helvetica-Bold -> HeBo
Helvetica-Oblique -> HeOb
Helvetica -> Helv
Symbol -> Symb
Times-BoldItalic -> TiBI
Times-Bold -> TiBo
Times-Italic -> TiIt
Times-Roman -> TiRo
ZapfDingbats -> ZaDb
HYSMyeongJo-Medium -> HySm
HYGoThic-Medium -> HyGo
HeiseiKakuGo-W5 -> KaGo
HeiseiMin-W3 -> KaMi
MHei-Medium -> MHei
MSung-Light -> MSun
STSong-Light -> STSo
MSungStd-Light -> MSun
STSongStd-Light -> STSo
HYSMyeongJoStd-Medium -> HySm
KozMinPro-Regular -> KaMi
{code}

> Implement font fallback for AcroForms
> -------------------------------------
>
>                 Key: PDFBOX-2661
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2661
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: AcroForm
>    Affects Versions: 1.8.8, 2.0.0
>            Reporter: Maruan Sahyoun
>         Attachments: FontTest.java, Fonts.pdf, field-filled.png, field.png
>
>
> There are forms where the font specified in the fields default appearance is 
> not pointing to the correct fields or forms resources entry. Adobe 
> Reader/Acrobat have a (unspecified) fallback mechanism to resolve such 
> missing fonts.
> We should be ably to come up with a similar solution.
> A sample of such an issue can be found in PDFBOX-1234



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to