Charset on Psliwa PHPPdf Bundle
concerning the PdfBundle on Symfony2 propose by Psliwa when I try to add
my custom font I have this error :
Notice: iconv(): Wrong charset, conversion fromMacRoman' to UTF-16BE' is
not allowed in
.../vendor/zendframework/zendpdf/library/ZendPdf/BinaryParser/AbstractBinaryParser.php
line 431
On my config.yml I have :
fonts_file:
"%kernel.root_dir%/../src/Travel/PdfBundle/Resources/config/fonts.xml"
On my template I have :
<dynamic-page encoding="UTF-8" font-type="FFInfoFonts">
On my Controller:
public function pdfAction(Request $request, $ce, $year) {
$format = $this->get('request')->get('_format');
return $this->render(sprintf('TravelPdfBundle:PointsCard:pdf.%s.twig',
$format));
}
And on my fonts.xml I have :
<font name="FFInfoFonts">
<normal src="font/FF Info fonts/police Web/InfoDisplayComp.ttf" />
</font>
Everyone have idea to force the charsey
No comments:
Post a Comment