Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change comment in system.xml that OTF (font type) is not supported. #201

Closed
danielchicote opened this issue Jan 7, 2015 · 11 comments
Closed
Labels

Comments

@danielchicote
Copy link

Hello, i have correctly installed the module but i have this error when get an invoice. Im running magento in windows 8.1

a:5:{i:0;s:102:"Cannot determine font type: C:\xampp\htdocs\magento\media/firegento_pdf/fonts\MyriadPro-Regular.otf";i:1;s:1778:"#0 C:\xampp\htdocs\magento\app\code\community\FireGento\Pdf\Model\Engine\Abstract.php(1179): Zend_Pdf_Font::fontWithPath('C:\xampp\htdocs...')

1 C:\xampp\htdocs\magento\app\code\community\FireGento\Pdf\Model\Engine\Abstract.php(1194): FireGento_Pdf_Model_Engine_Abstract->getFontRegular()

2 C:\xampp\htdocs\magento\app\code\community\FireGento\Pdf\Model\Engine\Abstract.php(744): FireGento_Pdf_Model_Engine_Abstract->_setFontRegular(Object(Zend_Pdf_Page), 9)

3 C:\xampp\htdocs\magento\app\code\community\FireGento\Pdf\Model\Engine\Invoice\Default.php(71): FireGento_Pdf_Model_Engine_Abstract->newPage()

4 C:\xampp\htdocs\magento\app\code\community\FireGento\Pdf\Model\Invoice.php(78): FireGento_Pdf_Model_Engine_Invoice_Default->getPdf(Object(Mage_Sales_Model_Resource_Order_Invoice_Collection))

5 C:\xampp\htdocs\magento\app\code\core\Mage\Adminhtml\Controller\Sales\Invoice.php(137): FireGento_Pdf_Model_Invoice->getPdf(Object(Mage_Sales_Model_Resource_Order_Invoice_Collection))

6 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Adminhtml_Controller_Sales_Invoice->pdfinvoicesAction()

7 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('pdfinvoices')

8 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))

9 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()

10 C:\xampp\htdocs\magento\app\Mage.php(684): Mage_Core_Model_App->run(Array)

11 C:\xampp\htdocs\magento\index.php(87): Mage::run('', 'store')

12 {main}";s:3:"url";s:91:"/magento/index.php/admin/sales_invoice/pdfinvoices/key/e775c8f45947e1a01e9ae1b8bd24f606/";s:11:"script_name";s:21:"/magento/index.php";s:4:"skin";s:7:"default";}

@Schrank
Copy link
Member

Schrank commented Jan 7, 2015

You can only TrueTypeFont TTF.

@Schrank Schrank closed this as completed Jan 7, 2015
@danielchicote
Copy link
Author

OK it works now thank you, but in the admin is writted: "You can upload your own fonts (*.ttf, *.otf) instead of using Zends Helvetica".

@Schrank
Copy link
Member

Schrank commented Jan 7, 2015

You can only TrueTypeFont TTF.

You can also use any individual TrueType font (which usually has a '.ttf' extension) or an OpenType font ('.otf' extension) if it contains TrueType outlines. Currently unsupported, but planned for a future release are Mac OS X .dfont files and Microsoft TrueType Collection ('.ttc' extension) files.

I'm wrong, should work.

Next update:
Zend_Framework code doesn't support otf:
https://github.com/zendframework/zf1/blob/master/library/Zend/Pdf/Font.php#L613-L624

@Schrank
Copy link
Member

Schrank commented Jan 7, 2015

We only checked with ttf and copied from the documentation, which is wrong. I'm sorry. Will fix this comment

@Schrank Schrank reopened this Jan 7, 2015
@Schrank Schrank added the bug label Jan 7, 2015
@danielchicote
Copy link
Author

:((

a:5:{i:0;s:103:"Cannot determine font type: C:\xampp\htdocs\magento\media/firegento_pdf/fonts\Myriad_Pro_Regular.ttf";i:1;s:1778:"#0 C:\xampp\htdocs\magento\app\code\community\FireGento\Pdf\Model\Engine\Abstract.php(1179): Zend_Pdf_Font::fontWithPath('C:\xampp\htdocs...')
#1 C:\xampp\htdocs\magento\app\code\community\FireGento\Pdf\Model\Engine\Abstract.php(1194): FireGento_Pdf_Model_Engine_Abstract->getFontRegular()
#2 C:\xampp\htdocs\magento\app\code\community\FireGento\Pdf\Model\Engine\Abstract.php(744): FireGento_Pdf_Model_Engine_Abstract->_setFontRegular(Object(Zend_Pdf_Page), 9)
#3 C:\xampp\htdocs\magento\app\code\community\FireGento\Pdf\Model\Engine\Invoice\Default.php(71): FireGento_Pdf_Model_Engine_Abstract->newPage()
#4 C:\xampp\htdocs\magento\app\code\community\FireGento\Pdf\Model\Invoice.php(78): FireGento_Pdf_Model_Engine_Invoice_Default->getPdf(Object(Mage_Sales_Model_Resource_Order_Invoice_Collection))
#5 C:\xampp\htdocs\magento\app\code\core\Mage\Adminhtml\Controller\Sales\Invoice.php(137): FireGento_Pdf_Model_Invoice->getPdf(Object(Mage_Sales_Model_Resource_Order_Invoice_Collection))
#6 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Adminhtml_Controller_Sales_Invoice->pdfinvoicesAction()
#7 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('pdfinvoices')
#8 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#10 C:\xampp\htdocs\magento\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#11 C:\xampp\htdocs\magento\index.php(87): Mage::run('', 'store')
#12 {main}";s:3:"url";s:91:"/magento/index.php/admin/sales_invoice/pdfinvoices/key/dfdc082031d4250a96ea54abd3664a2c/";s:11:"script_name";s:21:"/magento/index.php";s:4:"skin";s:7:"default";}

@Schrank
Copy link
Member

Schrank commented Jan 7, 2015

please send me the file: github@fabian-blechschmidt.de will check

@danielchicote
Copy link
Author

I have found the REAL error:

a:5:{i:0;s:51:"Only non-interlaced images are currently supported.";i:1;s:2132:

I have upload my png logo in non-interlaced mode and it works fine now. But the fonts still failing.

Thank you :)

@danielchicote
Copy link
Author

Fonts problem solved: i uploaded different truetype version of the same fonts, and i have now my own fonts in the invoices without errors.

@sprankhub
Copy link
Member

Great.

@Schrank can we close this or do you want to check with different font types?

@danielchicote
Copy link
Author

The same truetype font, different versions:
OK: http://www.filedropper.com/myriadab
ERROR: http://www.filedropper.com/myriadprobold

@Schrank
Copy link
Member

Schrank commented Jan 20, 2015

TODO: Change comment in system.xml that OTF is not supported.

@Schrank Schrank changed the title Error processing PDF Change comment in system.xml that OTF (font type) is not supported. Jan 26, 2015
sprankhub added a commit that referenced this issue Feb 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants