Hey,

This suggests that you are using libpango on a Unix/Linux platform?
If you do so, then you need to configure it not to select any non-true type
fonts.

See the explanation here:
http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WPdfImage.html#a479b8988ba6d379088ef097b894cbc22

Regards,
koen


2012/12/20 garnier <garn...@lal.in2p3.fr>

> Hi,
>
> I had the same problem yesterday (on mac and Linux)
> I have download libharu master from git, compile, recompile wt and I have
> still the problem :
>
> [error] "WPdfImage: cannot read font:
> '/usr/share/fonts/default/Type1/n019003l.pfb': expecting a true type font
> (.ttf, .ttc)"
> [error] "WPdfImage: cannot read font:
> '/usr/share/fonts/default/Type1/n019003l.pfb': expecting a true type font
> (.ttf, .ttc)"
> [error] "WPdfImage: cannot read font:
> '/usr/share/fonts/default/Type1/n019003l.pfb': expecting a true type font
> (.ttf, .ttc)"
> [error] "WPdfImage: cannot read font:
> '/usr/share/fonts/default/Type1/n019003l.pfb': expecting a true type font
> (.ttf, .ttc)"
> [error] "Chart.WChart2DRenderer: Chart layout failed: chart area is too
> small ?"
> [error] "Wt: error during event handling: WPdfImage error: error_no=104C,
> detail_no=0"
> [error] "Wt: fatal error: WPdfImage error: error_no=104C, detail_no=0"
>
> Any other idea ?
> Cheers,
> Laurent
>
>
>
> Le 19 déc. 2012 à 12:28, Wim Dumon <w...@emweb.be> a écrit :
>
> Koen made some unicode fixes for libharu, so you may want to use his
> branch: https://github.com/kdeforche/libharu
>
> Best regards,
> Wim.
>
>
>
> 2012/12/17 Matthew Sherborne <msherbo...@gmail.com>
>
>> So I'm trying some small code to generate a pdf:
>>
>>
>>
>> void User::render2pdf() {
>>
>>
>>     Wt::WPdfImage pdfImage2("210mm",  "297mm");
>>
>>
>>      {
>>
>>         Wt::WPainter p(&pdfImage2);
>>
>>         p.setFont(Wt::WFont());
>>
>>         p.setPen(Wt::SolidLine);
>>
>>         p.drawLine(1,1,2,2);
>>
>>         p.drawText(0,0,20,20,{Wt::AlignCenter}, "Hello");
>>
>>     }
>>
>>     std::ofstream file("chart.pdf", std::ios::out | std::ios::binary);
>>
>>     pdfImage2.write(file);
>>
>>
>> It's dying on the WPainter creation line.
>>
>>
>> The error given is:
>>
>>
>> unknown location(0): fatal error in "UserRendertopdf": std::exception: 
>> WPdfImage error: error_no=102B, detail_no=0
>>
>>
>> The Wt line where this happens is: wt/src/Wt/WPdfImage.C:316
>>
>> font_ = HPDF_GetFont (pdf_, font_name, "UTF-8");
>>
>> The reference for this func is:
>> http://libharu.org/wiki/Documentation/API/Document#HPDF_GetFont.28.29
>>
>> The reference for the error code says "An Invalid encoding name is
>> specified." - http://libharu.org/wiki/Documentation/Error_handling
>>
>> The "UTF-8" encoding is not listed in the libharu pages:
>> http://libharu.sourceforge.net/fonts.html
>>
>> I grepped the libharu source for utf and couldn't find anything. It does
>> have a lot of stuff to do with unicode though.
>>
>> Some older forum posts mentioned a plugin source file for UTF-8 but said
>> that it'll be included in future versions of libharu. We are now in those
>> future versions.
>>
>> Any guidance or ideas appreciated.
>>
>> Many Thanks,
>> Matthew Sherborne
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
>> Remotely access PCs and mobile devices and provide instant support
>> Improve your efficiency, and focus on delivering more value-add services
>> Discover what IT Professionals Know. Rescue delivers
>> http://p.sf.net/sfu/logmein_12329d2d
>> _______________________________________________
>> witty-interest mailing list
>> witty-interest@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
>
> http://p.sf.net/sfu/logmein_12329d2d_______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to