pdftk

How to concatenate multiple pdf as one, each input pdf starting on an even page?

不问归期 提交于 2019-12-10 15:48:43
问题 DUPLICATE OF How can I merge PDF files (or PS if not possible) such that every file will begin in a odd page? I have a serie of documents, each one with an unpredictable number of pages. Say : a.pdf (1 page : A1) b.pdf (3 pages : B1, B2, B3) c.pdf (4 pages : C1, C2, C3, C4) I want to merge these input files into one out.pdf, that I'll print double-side. Every first page of the input files must be on a front (right) page. This means the expected result would be |A1 --|B1 B2|B3 --|C1 C2|C3 C4|

PDFTK - and the ability to change the default view

为君一笑 提交于 2019-12-10 15:17:52
问题 I have been merging PDFs using PDFTK with great success, the pages that are used to generate the pdf are set to 'click to show one page at a time' (basically the whole of the first page is displayed when the pdf opens, based on the height of the page). however the generated pdf defaults back to filling the reader based on its width (not all the first page shows). Do you know a way of controlling the view of the generated pdf? because I would prefer the whole page to be displayed based on its

set output location for pdftk sample.pdf burst

﹥>﹥吖頭↗ 提交于 2019-12-10 12:49:17
问题 I've a question, I am using tdftk to split pages of a pdf file from php. using following command $command = escapeshellcmd("pdftk ").escapeshellarg("/var/www/card/card.pdf")." ".escapeshellcmd(" burst"); $result = passthru($command); it's working very well, and splitting the pages into files. now my question is can i set the output location where burst files should be store. by default it is placing the the files at site web root, where as I want the files at /var/www/card/pages/ directory.

merging XFDF with PDF form to create final PDF server-side?

北城余情 提交于 2019-12-09 19:48:55
问题 This is what I have currently: User submits form data and gets a "download PDF" link. The link points to script which generates an XFDF file on the fly and outputs the XFDF file after setting the appropriate headers, etc. The XFDF file points to a password-protected PDF, which is the generic PDF form that uses the XFDF data to fill in the fields. What I would like: User clicks the "download PDF" link. XFDF is generated on the fly (no file written to server). PDF and XFDF are merged server

How to Check Boxes in a PDF with fdfgen in Python

≡放荡痞女 提交于 2019-12-08 05:49:01
问题 I'm working on a Python 3.4 project that uses fdfgen and pdftk to fill out a pdf. I can fill in text fields pretty easily. The thing I cannot figure out is how to check a box. Here's the part of my python script: fields = generate_vs300_field_list(answers_dict) # Returns list of tuples of fields and text to be added to pdf fdf = forge_fdf("", fields, [], [], []) logging.debug('Called forge_fdf function. About to open fdf_file.') fdf_file = open(os.path.join(destination_dir, 'vs300.fdf'), 'wb'

Missing characters in filled pdf using PDFTk with encoding UTF-8

£可爱£侵袭症+ 提交于 2019-12-08 02:45:21
问题 I'm trying to fill pdf documents using PDFTk. Script working fine, it fills inputs in form but I don't get special characters [polish charset: UTF-8 or ISO-8859-2]. Script: https://github.com/mikehaertl/php-pdftk The weird thing is that generated pdf actually has polish characters when I click on field. Before click: After click on field: Default encoding is set to UTF-8. The problem is that PDFTk can't use chars outside the standard ASCII with FDF form fill. It doesn't allow multi-byte

pdftk + xfdf + php can't handle umlauts

狂风中的少年 提交于 2019-12-07 21:45:01
问题 I'm using XFDF files to fill out PDF-forms serverside with PHP and pdftk but my problem is that no non-english characters (ä, ö, å etc.) are printed to the form fields. Here is the function I use to parse the XFDF file: function createFDF($file,$info,$enc='UTF-8'){ $data='<?xml version="1.0" encoding="'.$enc.'"?>'."\n". '<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">'."\n". '<fields>'."\n"; foreach($info as $field => $val){ $data.='<field name="'.$field.'">'."\n"; if(is_array(

node.js child process doesn't work in node webkit

白昼怎懂夜的黑 提交于 2019-12-07 12:22:59
问题 I made a small app with node webkit. Pre-packaging, it works fine. But after I zipped it and added it to Contents/Resources in node-webkit.app I get an error when I run the app. It opens fine, but the task it does involves child processes, and I get this error: Uncaught node.js Error Error: spawn ENOENT. I'm guessing it might be something related to the issue raised in this question: Node-Webkit Child Process Exec because my child processes are calling pdftk, a separate command line program.

Split PDF by multiple pages using PDFTK?

[亡魂溺海] 提交于 2019-12-07 04:42:32
问题 I am finding it hard to phrase this question and could not find an online solution for what I'm trying to do. I know how to split a large PDF into single pages with PDFTK using the following script: pdftk your_file.pdf burst output your_directory/page_%02d.pdf But now I want to split the PDF by every other page, so that each new PDF has TWO (2) pages (e.g. pages 1 + 2 together, pages 3 + 4 together, 5 + 6, etc.). I know that Acrobat does this like a champ, however I need something I can

pdftk fill_form utf8 problems [duplicate]

无人久伴 提交于 2019-12-07 03:22:48
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Flatten FDF / XFDF forms to PDF in PHP with utf-8 characters I am using pdftk to fill template pdf with data from fdf. Data has correct utf-8 characters, but when I use fill_form, resulting pdf file has formating errors. (I am NOT using flatten ) I have problems with letters like š , đ , č , ć , ž . Thanks. UPDATE My solution In the end, I gave up on pdftk, I ended up using fpfd, to be more precise, I used this