2012 年二月 一 二 三 四 五 六 日 « 一 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 近期评论
- wlx [微博 ] 发表在《google彻底被封?》
- snake 发表在《google彻底被封?》
- Andrew Pelt 发表在《debian testing上安装oracle 10g》
- tiplip 发表在《webmap.cn使用的WEBGIS技术》
- 求助Evolution问题!! 发表在《evolution crashed in gutsy alpha》
分类目录
标签
anjuta apache backup breezy c++ compile convert dapper debian dns edgy evolution feisty firefox flash gnome gobang GRASS gutsy humor intrepid Linux mailman MapServer mysql openoffice Oracle php phpbb postfix PostGIS postgresql qgis sarge scim skype subversion svn tomcat ubuntu utf8 westdc Windows wordpress 中文
Tag Archives: pdf
用PHP处理中文PDF
因项目需要,现在想在服务器端动态生成PDF文件,已一个PDF为模板,然后把所需的数据动态填入。 本来在使用zend framework,因此很直接的就使用zend_pdf类来进行测试,代码实现如下: $pdf = Zend_Pdf::load($this->view->config->offline->template); $pdf->pages = array_reverse($pdf->pages); $style = new Zend_Pdf_Style(); $font = Zend_Pdf_Font::fontWithPath($this->view->config->offline->font, ( Zend_Pdf_Font::EMBED_DONT_SUBSET)); $pdf->pages[0]->setFont($font, 10); $pdf->pages[0]->saveGS(); //datalist $pdf->pages[0]->drawText(str_replace(“;”,”\n”,$datalist), 100, 570,”UTF-8″); //project $pdf->pages[0]->drawText($formData['project'], 100, 430,”UTF-8″); $pdf->pages[0]->drawText($formData['realname'], 100, 78,”UTF-8″); $pdf->pages[0]->drawText($formData['realname'], 130, 590,”UTF-8″); $pdf->pages[0]->drawText($formData['unit'], 95, 58,”UTF-8″); $pdf->pages[0]->drawText($formData['address'], 285, … Continue reading
pdf的合并
有几个工具可以使用: pdftk pdftk *.pdf cat output out.pdf 可以很好的进行合并,同时还有一些其他的功能,但是bookmark会丢失。 gs gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf -f f1.pdf f2.pdf f3.pdf 在合并中文的PDF时遇到了问题,不知道是否是中文的问题。未成功。 MbtPdfAsm http://thierry.schmit.free.fr/dev/mbtPdfAsm/enMbtPdfAsm2.html 有保留BOOKMARK功能。但不支持中文。有中文情况下会出错。