ZF-12418: Zend_Pdf_Font::fontWithPath flags "isEmbeddable" to false even if license allows embedding

Issue Type: Bug Created: 2012-09-12T20:15:48.000+0000 Last Updated: 2012-12-18T20:08:27.000+0000 Status: Resolved Fix version(s): - 1.12.1 (18/Dec/12)

Reporter: Carsten Schaedlich (zaphodx99) Assignee: Dolf Schimmel (Freeaqingme) (freak) Tags: - Zend_Pdf

Related issues: Attachments:


Fonts that have multiple embedding bits set, will not be embedded if the 'restricted license embedding' bit is set.

If one the bits 0x0004 or 0x0008 is set, the font is free to be embedded (with some restrictions): Restricted License embedding (0x0002) Preview & Print embedding (0x0004) Editable embedding (0x0008)

If multiple embedding bits are set, the least restrictive license granted takes precedence.

The following code in Zend_Pdf_FileParser_Font_OpenType prevents the correct handling of the flags:

====================== 8< ====================== if ($this->isBitSet(1, $embeddingFlags)) { /* Restricted license embedding. We currently don't have any way to * enforce this, so interpret this as no embed. This may be revised * in the future... / $this->isEmbeddable = false; } else { / The remainder of the bit settings grant us permission to embed * the font. There may be additional usage rights granted or denied * but those only affect the PDF viewer application, not our code. */ $this->isEmbeddable = true; } ====================== 8< ======================

So even if a font has "Editable embedding" set, it will not be embedded by Zend_Pdf if "Restricted license" is also set, although the least restrictive bit should apply.


Posted by Rob Allen (rob) on 2012-11-16T17:08:01.000+0000

Fixed on trunk (25136) and release-1.12 (25137)

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.