fdf

PHP regex code to extract FDF data

别来无恙 提交于 2019-12-08 02:15:21
问题 I am trying to parse a FDF file using PHP, and regex. But I just cant get my head around regex. I am stuck parsing the file to generate a array. %FDF-1.2 %âãÏÓ 1 0 obj << /FDF << /Fields [ << /V (email@email.com) /T (field_email) >> << /V (John) /T (field_name) >> << /V () /T (field_reference) >>] >> >> endobj trailer << /Root 1 0 R >> %%EOF Current function (source:http://php.net/manual/en/ref.fdf.php) function parse2($file) { if (!preg_match_all("/<<\s*\/V([^>]*)>>/x", $file,$out,PREG_SET

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

Visually identify name of field in PDF form

筅森魡賤 提交于 2019-12-06 07:34:05
问题 I know some similar issues exist (Find the field names of inputtable form fields in a PDF document?) but my question is different: I have all the field names (in fdf file). I wish I could visually identify directly on the PDF. With acrobat I should be able to right click on a field and then select "display the name of the field" but I can find no such thing. Can someone help me ? 回答1: Ok. I have found pdf editor where this is possible. Probably acrobat pro too... http://www.pdfescape.com/

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

喜夏-厌秋 提交于 2019-12-06 05:55:20
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 characters. What I did: Add fonts to pdf files (checked and files has font) Create fields in pdf files with

Visually identify name of field in PDF form

你。 提交于 2019-12-04 13:04:52
I know some similar issues exist ( Find the field names of inputtable form fields in a PDF document? ) but my question is different: I have all the field names (in fdf file). I wish I could visually identify directly on the PDF. With acrobat I should be able to right click on a field and then select "display the name of the field" but I can find no such thing. Can someone help me ? Ok. I have found pdf editor where this is possible. Probably acrobat pro too... http://www.pdfescape.com/ Right click on the field : unlock. Right click again : get properties. 来源: https://stackoverflow.com

PHP: Extract fdf fields as an array from a PDF

旧时模样 提交于 2019-12-02 04:52:59
i want to extract the available fields as an array from a fillable pdf. an array like: array('firstname','secondname','address'); i do not need the values for those fields, if they are filled. what is easiest way to do that using PHP? under online documentation for "fdf_next_field_name" the following example is given that you can modify to store the field names into an array <?php $fdf = fdf_open($HTTP_FDF_DATA); for ($field = fdf_next_field_name($fdf); $field != ""; $field = fdf_next_field_name($fdf, $field)) { echo "field: $field\n"; } ?> ftrotter I upvoted Murray's answer because her was in

FDF - how to check a checkbox?

China☆狼群 提交于 2019-11-28 23:39:46
I'm using FDF to populate a PDF template. On my PDF template, I have a checkbox and radio field called c1 and r1 respectively. What's the syntax I should use in my FDF file to check or select the c1 and r1 field? I tried things like <</T(c1)/V(1)>> <</T(c1)/V(checked)>> <</T(c1)/V(on)>> <</T(c1)/V(true)>> But none of them work. I found the answer. To check, use <</T(c1)/V(Yes)>> To turn off, use <</T(c1)/V(Off)>> I found the answer on this page: http://www.4dcodeexchange.net/fdfformbuilder.htm Excerpt Checkboxes come in 2 flavors grouped and individual. Individual checkboxes will usually have

Merge FDF data into a PDF file using PHP

白昼怎懂夜的黑 提交于 2019-11-28 03:29:45
Is it possible to merge FDF data with a PDF file using PHP alone? Or is there no option but to use a 3rd party command line tool to achieve this? If that is the case can someone point me in the direction of one? I am currently outputting the FDF file to the browser in the hope that it will redirect the user to the filled in PDF but for some people that is not the case. The FDF contents is being output to the screen, even though I am using header('Content-type: application/vnd.fdf'); For future reference, it looks like there isn't a reliable way of doing it without a 3rd party app. Pdftk ( http

Merge FDF data into a PDF file using PHP

一曲冷凌霜 提交于 2019-11-27 05:08:49
问题 Is it possible to merge FDF data with a PDF file using PHP alone? Or is there no option but to use a 3rd party command line tool to achieve this? If that is the case can someone point me in the direction of one? I am currently outputting the FDF file to the browser in the hope that it will redirect the user to the filled in PDF but for some people that is not the case. The FDF contents is being output to the screen, even though I am using header('Content-type: application/vnd.fdf'); 回答1: For