xfdf

Receiving PDF form data into PHP

陌路散爱 提交于 2020-01-11 13:27:25
问题 So I have been looking online for several hours for what I think is a very simple answer but I can't seem to find it. I am trying to understand how PDF form data submitting works. My goal is to read form data submitted from a PDF form that I set up into my PHP script. I want my PHP script to parse the form data and plug it into my SQL database. The roadblock I am running into is how do I receive the file so I can parse it? What is the filename of the file that gets submitted? I have my submit

Saving .xfdf as .pdf

你说的曾经没有我的故事 提交于 2019-12-31 03:55:11
问题 I am currently using Excel to populate a PDF file with form fields. It all works but it exports it as a .xfdf. Does anyone know how I can save it as a pdf instead? FullFileName = FilePath & "Requisition - " & Trim(MyRecord.CompanyName) & " - " & _ Year & "-" & Month & "-" & Day & "-" & Hour & "-" & Minute & "-" & Seconds & ".xfdf" Open FullFileName For Output As #1 Print #1, "<?xml version=""1.0"" encoding=""ISO-8859-1""?>" Print #1, "<xfdf xmlns=""http://ns.adobe.com/xfdf/"" xml:space="

How to set the font color for PDAnnotationFreeText with using pdfbox 2.0.16

怎甘沉沦 提交于 2019-12-11 19:55:49
问题 After imported XFDF to FDFAnnotation and converted to PDAnnotation, I find that the font color of PDAnnotationFreeText is missing. <freetext page="0" rect="376.81193,778.184946,500.283994,807.936941" flags="print" name="373b558a-4892-5fb4-a9aa-b4d7175d3966" title="wwh" subject="Free text" date="D:20190808175721+08'00'" width="0" creationdate="D:20190808175700+08'00'" TextColor="#00CC63" FontSize="17"> <contents>English</contents> <defaultappearance>0 0 0 rg /Arial 17 Tf</defaultappearance>

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

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(

pdftk + xfdf + php can't handle umlauts

大兔子大兔子 提交于 2019-12-06 11:35:22
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($val)){ foreach($val as $opt) $data.='<value>'.htmlentities($opt,ENT_COMPAT,$enc).'</value>'."\n"; }else

Flatten FDF / XFDF forms to PDF in PHP with utf-8 characters

老子叫甜甜 提交于 2019-11-28 10:59:06
My scenario: A PDF template with formfields: template.pdf An XFDF file that contains the data to be filled in: fieldData.xfdf Now I need to have these to files combined & flattened. pdftk does the job easily within php: exec("pdftk template.pdf fill_form fieldData.xfdf output flatFile.pdf flatten"); Unfortunately this does not work with full utf-8 support. For example: Cyrillic and greek letters get scrambled. I used Arial for this, with an unicode character set. How can I accomplish to flatten my unicode files? Is there any other pdf tool that offers unicode support? Does pdftk have an

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

Flatten FDF / XFDF forms to PDF in PHP with utf-8 characters

寵の児 提交于 2019-11-27 03:56:10
问题 My scenario: A PDF template with formfields: template.pdf An XFDF file that contains the data to be filled in: fieldData.xfdf Now I need to have these to files combined & flattened. pdftk does the job easily within php: exec("pdftk template.pdf fill_form fieldData.xfdf output flatFile.pdf flatten"); Unfortunately this does not work with full utf-8 support. For example: Cyrillic and greek letters get scrambled. I used Arial for this, with an unicode character set. How can I accomplish to