使用HexaPDF的几个问题


1.font.on_missing_glyph 配置处理不认识的glyph
2.图片不能识别,图片格式和图片大小
3.图片打不开
4.HexaPDF::Error (Box doesn't fit on empty page)


  过日子就是平平常常,有时候有意思,有时候很没意思。<br><br>  不要成天到晚地找意义。<br><br>  —— 致自己<br><br>  
<img src=\"http://static.tianyaui.com/img/static/2011/imgloading.gif\" title=\"点击图片查看幻灯模式\" original=\"http://img3.laibafile.cn/p/l/320920618.jpg\"><br>LWR\\SKD参数如下:
<img src=\"http://static.tianyaui.com/img/static/2011/imgloading.gif\" original=\"http://img9.tianya.cn/Photo/2010/11/23/31916701_45132074.jpg\"><br><br>
<img src=\"http://static.tianyaui.com/img/static/2011/imgloading.gif\" original=\"http://img17.tianya.cn/Photo/2010/11/23/31916722_45132074.jpg\"><br><br>
<img src=\"http://static.tianyaui.com/img/static/2011/imgloading.gif\" original=\"http://img13.tianya.cn/Photo/2010/11/23/31916743_45132074.jpg\"><br><br>
<img src=\"http://static.tianyaui.com/img/static/2011/imgloading.gif\" original=\"http://img17.tianya.cn/Photo/2010/11/23/31916775_45132074.jpg\"><br><br>
<img src=\"http://static.tianyaui.com/img/static/2011/imgloading.gif\" original=\"http://img18.tianya.cn/Photo/2010/11/23/31916794_45132074.jpg\">


No glyph for "" in font 'SimHei' found. 

Use the configuration option 'font.on_missing_glyph' to customize missing glyph handling.

img url: 79个-http://xxx/system/tybbs/getimgXXX/1/5/photo1/2012/3/26/middle/89844671_19398710_middle.jpg?x-oss-process=style/mob640
Traceback (most recent call last):
        6: from (irb):2:in `<main>'
        5: from lib/topic_to_pdf_with_hexa.rb:23:in `generate_hexa_pdf'
        4: from lib/topic_to_pdf_with_hexa.rb:64:in `save_to_pdf'
        3: from lib/topic_to_pdf_with_hexa.rb:64:in `each_with_index'
        2: from lib/topic_to_pdf_with_hexa.rb:64:in `each'
        1: from lib/topic_to_pdf_with_hexa.rb:73:in `block in save_to_pdf'
HexaPDF::Error (Couldn't find suitable image loader)


save_to_pdf: 501330-1588页-[股市论谈]大户日记&SNIPER超级证券博弈系统实战分享&账户诊断
img url: 17个-http://xxx.com/system/tybbs/p/m/145035836.jpg?x-oss-process=style/mob640
img url: 19个-http://xxx.aliyuncs.com/system/tybbs/p/m/145060051.jpg?x-oss-process=style/mob640
img url: 21个-http://xxx.com/system/tybbs/p/m/145060053.jpg?x-oss-process=style/mob640
Traceback (most recent call last):
        6: from (irb):2:in `<main>'
        5: from lib/topic_to_pdf_with_hexa.rb:23:in `generate_hexa_pdf'
        4: from lib/topic_to_pdf_with_hexa.rb:68:in `save_to_pdf'
        3: from lib/topic_to_pdf_with_hexa.rb:68:in `each_with_index'
        2: from lib/topic_to_pdf_with_hexa.rb:68:in `each'
        1: from lib/topic_to_pdf_with_hexa.rb:75:in `block in save_to_pdf'
Down::ClientError (400 Bad Request)

img url: 123个-http://xxx.com/system/tybbs/p/l/262893174.jpg?x-oss-process=style/mob640
img url: 125个-http://xxx.com/system/tybbs/p/m/262911639.jpg?x-oss-process=style/mob640
Traceback (most recent call last):
        6: from (irb):2:in `<main>'
        5: from lib/topic_to_pdf_with_hexa.rb:23:in `generate_hexa_pdf'
        4: from lib/topic_to_pdf_with_hexa.rb:68:in `save_to_pdf'
        3: from lib/topic_to_pdf_with_hexa.rb:68:in `each_with_index'
        2: from lib/topic_to_pdf_with_hexa.rb:68:in `each'
        1: from lib/topic_to_pdf_with_hexa.rb:88:in `block in save_to_pdf'
HexaPDF::Error (Box doesn't fit on empty page)




阅读量: 135
发布于:
修改于: