{"id":1246,"date":"2011-01-13T11:36:10","date_gmt":"2011-01-13T15:36:10","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=1246"},"modified":"2013-03-20T08:43:57","modified_gmt":"2013-03-20T12:43:57","slug":"how-to-install-pdflib-lite-pdflib-on-a-centos-server","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/how-to-install-pdflib-lite-pdflib-on-a-centos-server","title":{"rendered":"How to install PDFlib-Lite &#038; PDFlib on a CentOS server?"},"content":{"rendered":"<p>PDFlib is a free library used for generating and manipulating files in Portable Document Format (PDF). The primiary goal of PDFlib is to create dynamic PDF documents on a Web server OR similar systems and to allow a &#8220;save as PDF&#8221; capability.<\/p>\n<p>The following steps will help you to install PDFlib-lite and PDFlib on a CentOS server OR even on a cPanel and Plesk servers.<\/p>\n<p>SSH to the server as a &#8216;root&#8217; user:<\/p>\n<p><strong>1)<\/strong> Download the PDFlib-Lite package required for PDFlib installation in a temporary directory<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># cd \/usr\/local\/src <\/span><\/pre>\n<pre><span style=\"color: #0000ff;\"># wget http:\/\/www.pdflib.com\/binaries\/PDFlib\/705\/PDFlib-Lite-7.0.5.tar.gz<\/span><\/pre>\n<\/blockquote>\n<p><strong>2)<\/strong> Unpack the package and goto the PDFlib-Lite directory<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># tar -zxf PDFlib-Lite-7-* <\/span><\/pre>\n<pre><span style=\"color: #0000ff;\"># cd PDFlib-Lite-7.0*<\/span><\/pre>\n<\/blockquote>\n<p><strong>3)<\/strong> Now, configure PDFlib-Lite<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># .\/configure --prefix=\/usr\/local<\/span><\/pre>\n<\/blockquote>\n<p><strong>4)<\/strong> Create the installation files and install PDFlib-Lite<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># make <\/span><\/pre>\n<pre><span style=\"color: #0000ff;\"># make install<\/span><\/pre>\n<\/blockquote>\n<p><strong>5)<\/strong> Once PDFlib-Lite is installed, download &#8216;PDFlib&#8217; using pecl.<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># pecl download pdflib<\/span><\/pre>\n<\/blockquote>\n<p><strong>6)<\/strong> Unpack the package and goto the PDFlib-Lite directory<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># tar xvzf pdflib-*.tgz <\/span><\/pre>\n<pre><span style=\"color: #0000ff;\"># cd pdflib-*<\/span><\/pre>\n<\/blockquote>\n<p><strong>7)<\/strong> Create configuration files<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># phpize<\/span><\/pre>\n<\/blockquote>\n<p><strong>8 )<\/strong> Now, configure PDFlib<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># .\/configure<\/span><\/pre>\n<\/blockquote>\n<p><strong>9)<\/strong> Create the installation files and install PDFlib<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># make <\/span><\/pre>\n<pre><span style=\"color: #0000ff;\"># make install<\/span><\/pre>\n<\/blockquote>\n<p>A pdf.so file will be created in the PHPs extension directory which you can locate using the following command. If the file is not created there, copy it from the current location to the extension directory.<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># php -i | grep extension_dir<\/span><\/pre>\n<\/blockquote>\n<p>The final step is to add the PDFLib extension in the php.ini file and restart the Web Server.<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">extension=\"pdf.so\"<\/span><\/pre>\n<\/blockquote>\n<p><strong>Note:<\/strong> Using the above instructions, PDFlib can be installed on the cPanel and Plesk servers as well. Though the location of extension_dir and php.ini are different, they can easily be located using the commands above.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PDFlib is a free library used for generating and manipulating files in Portable Document Format (PDF). The primiary goal of PDFlib is to create dynamic PDF documents on a Web server OR similar systems and to allow a &#8220;save as PDF&#8221; capability.<br \/>\nThe following steps will help you to install PDFlib-lite and PDFlib on a CentOS server OR even on a cPanel and Plesk servers.<br \/>\nSSH to the server as a &#8216;root&#8217; user:<br \/>\n1) Download the PDFlib-Lite package required for PDFlib installation in a temporary directory<\/p>\n<p># cd \/usr\/local\/src<br \/>\n# wget http:\/\/www.pdflib.com\/binaries\/PDFlib\/705\/PDFlib-Lite-7.0.5.tar.gz<\/p>\n<p>2) [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1145],"tags":[1169,1168,1165,1164,1167,1166,1163],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1246"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=1246"}],"version-history":[{"count":8,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1246\/revisions"}],"predecessor-version":[{"id":2266,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1246\/revisions\/2266"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=1246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=1246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=1246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}