pdftk

PDF: How to Optimize Filesize & Convert to PNG (embedded fonts problem)

别来无恙 提交于 2019-12-13 15:47:23
问题 I have a PDF with embedded fonts that I can't seem to work with. Right now, I'm using GhostScript and trying to do 2 things: Minimize filesize of PDF: gswin32c -dSAFER -dBATCH -dNOPAUSE -dQUIET -sDEVICE=pdfwrite -sOutputFile=output.pdf input.pdf Convert PDF to PNG (super sample, to be used for creating other thumbnails): gswin32c -dSAFER -dBATCH -dNOPAUSE -dQUIET -dFirstPage=1 -dLastPage=1 -r288 -sDEVICE=png16m -sOutputFile=output.pdf input.pdf The above works well when working on scanned

Compile pdftk with /libgcj.so.10 on centOS (Redhat)

你离开我真会死。 提交于 2019-12-13 05:13:47
问题 Has anyone successfully complied pdftk with the /libgcj.so.10 library? Bluehost upgraded from centOS 5 to centOS6 and blew away the library I needed, telling me this is the new one. I took a look in the makefiles (Makefile.Redhat, Makefile.Base and the java Makefile), but I can't seem to find where I would point to the new library. Thanks 回答1: For anyone who ends up here specifically for pdftk on Bluehost, I got on the forum and they have installed it for Bluehost in /usr/bin and everything

Unable to build pdftk from source on fedora machine

荒凉一梦 提交于 2019-12-12 13:07:41
问题 I am trying to build pdftk from source on fedora machine. I have unzip pdftk jar and trying to execute make -f Makefile.Redhat But i am getting following error on my console. gcjh-4.7.2 -force --classpath="/usr/share/java/libgcj-4.7.2.jar:/home/tw1/pdftk-1.45-dist/java:." org/bouncycastle/asn1/ASN1ObjectParser /bin/sh: gcjh-4.7.2: command not found make[1]: [org/bouncycastle/asn1/ASN1ObjectParser.h] Error 127 (ignored) gcj-4.7.2 -Wall -Wextra -O2 --encoding=UTF-8 --classpath="/usr/share/java

Installing PDFTK on a shared web server

你说的曾经没有我的故事 提交于 2019-12-12 11:49:00
问题 My web sites are hosted on Total Choice Hosting using some kind of Linux (I don't know what precise variety) and Apache. I don't have command line access - I can run command line programs only via exec() in PHP, or via CRON jobs. Can I install and use PDFTK on a system like this? If so, what exactly do I have to do? Which files do I have to copy where? Do I have to rebuild PDFTK from source, or is there an executable version somewhere? Since (as I understand it) PDFTK is based on iText, which

Merge FDF and PDF without PDFTK

狂风中的少年 提交于 2019-12-12 10:45:15
问题 Is there a way to merge FDF file and a PDF File to create a flat format of all the data and form into 1 pdf without using PDFTK? Any light shed upon this would be greatly appreciated. 回答1: No.. There's no other way easy way to flatten, but it's awesome. Why would you need anything else? PDFTK is actually mostly Java (literally hundreds of Java files). You could think about wrapping your own project around it. The functionality that you're looking for is here (java/com/lowagie/text/pdf

Execution of PDFTk from PHP script is failing with error code 11

末鹿安然 提交于 2019-12-12 03:43:56
问题 I am trying to Fill in a PDF from PHP script. I am following the article by Sid Steward at the following URL. I have configured PDFTk package on CentOS linux distribution and I am able to execute the pdftk from the command prompt and it merges the FDF form with the PDF and successfully generates the flattened(Filled) PDF. I am using following command to test the Pdftk using shell. pdftk /tmp/form.pdf fill_form /tmp/fdfbm0pe7 output /tmp/filledform.pdf flatten But When try to execute a similar

With PHP, how can I check if a PDF file has errors

我是研究僧i 提交于 2019-12-12 00:34:11
问题 I have a DB system built in PHP/MySql. I'm fairly new at this. The system allows the user to upload an invoice. Others give permission to pay the invoice. The accounting person uploads the check. After check is uploaded, it generates a PDF as a cover, then uses PDFTK (using Ben Squire's PDFTK-PHP-Library) to combine all of the files together and present the user with a single PDF to download. Some users upload PDF files which cause PDFTK to hang indefinitely when it tries to combine the PDF

Pdftk installation on Heroku

随声附和 提交于 2019-12-11 17:14:40
问题 How to install pdftk on heroku stack? Because of other dependencies, I cannot downgrade stack to Cedar, I need to run on heroku-16 . 回答1: Answer is here, I only want to archive it for future generations if it disappears. So special thanks to Derek Barber! The first step is to download a binary of pdftk that will work on heroku and add it to your Rails app: mkdir -p [my_project]/vendor/pdftk/lib [my_project]vendor/pdftk/bin cd /tmp git clone https://github.com/millie/pdftk-source.git cd pdftk

Windows command line execute pdftk.exe with arguments length > 8192 characters

孤者浪人 提交于 2019-12-11 15:39:32
问题 I need to merge ~1000 pdf files. I call pdftk from my program for this purpose. However, it happens that input arguments exceeds maximum Windows command line character length of 8192 and i get error. I tried to store my input in txt file, but without success: pdftk < file.txt type file.txt | pdftk It looks like, that pdftk does not get input from redirection, pipe operators. I tested it on Windows 10. Does anyone know how it can be achieved? 来源: https://stackoverflow.com/questions/46727043

Is there a limit on the length of command passed to exec in PHP?

霸气de小男生 提交于 2019-12-11 01:57:56
问题 Currently I need to merge that 50+ PDF files into 1 PDF. I am using PDFTK. Using the guide from: http://www.johnboy.com/blog/merge-multiple-pdf-files-with-php But it is not working. I have verified the following: I have tried the command to merge 2 pdfs from my PHP and it is working. I have echo the final command and copied that command and paste into command prompt and run manually and all the 50 PDFs are successfully merged. Thus exec in my PHP and the command to merge 50 PDFs are both