Dynamic Fill in PDF Files

Hello,
i have a PHP Site where a user can type his personal data. When he click on the Button "Send", a PDF form open and fill the data into the form. The static PDF works with FDF, but the dynamic PDF with XFDF doesn´t work. Here my XFDF:
<?php
$pdf_file= 'http://localhost/Kunde2.pdf';
function array2xfdf($xfdf_data, $pdf_file)
// Creates an XFDF File from a 2 dimensional
// Array Format: "array ("key1" => "content1", "key2" => "content2");
$xfdf = "<?xml version='1.0' encoding='UTF-8'?>\n";
$xfdf .= "<xfdf xmlns='http://ns.adobe.com/xfdf/' xml:space='preserve'>\n";
$xfdf .= "<fields>\n";
// Loop -> Array to XFDF Data
foreach ($xfdf_data as $key => $val)
$xfdf .= "<field name='".$key."'>\n";
$xfdf .= "<value>".$val."</value>\n";
$xfdf .= "</field>\n";
// XFDF "Footer"
$xfdf .= "</fields>";
$xfdf .= "<f href='".$pdf_file."'/>";
$xfdf .= "</xfdf>";
return $xfdf;
$xfdf_data = array(
"KUNDE"=> $_POST['KUNDE'],
header('Content-type: application/vnd.adobe.xfdf');
echo array2xfdf($xfdf_data, $pdf_file);
?>
The Script open my PDF but without my data. What´s wrong? The XML Structur is ok. I work with the LiveCycle Designer 8. Must I change in the Designer any configuration?
greetings
Daniela

I have a vital form that clients fill out, which is passed to many people in the company along the workflow. The form is a Planner and we have in the following PDF, Word Doc..
Well before, the Planner.pdf was originally created in Word, since most people have access to Word.. but evolved to a PDF form created from the Word Doc via Adobe LiveCycle Designer 8.0 w/ User Rights enabled so that the form could be filled out and saved using Adobe Reader.. which was a step better than Word.. being that it is free. But this needed to be easier and more to the point b/c some clients don't particularly like installing the latest version of Reader, even if you provide them the link. Nor do they like saving the form, filling the form, and attaching the form to send back.
My goal is to have the client fill an HTML version of the form, submit and be done with it, but everyone in the workflow be able to easily receive the filled Planner as a PDF form.
So some months ago I ran into this post Chris Trip, "Populate Livecycle PDF from mySQL database using PHP" #8, 22 Sep 2007 4:37 pm
which uses the command line Win32 pdftk.exe to merge an FDF file into an existing PDF on the remote server, and serve this to whoever.
My problem was with shared hosting and having the ability to use the Win32 pdftk.exe along with PHP which is predominantly used on Linux boxes. And we used a Linux box.
so i created the following unorthodox method, which a client fills the HTML version of the Planner, all field values are INSERTED into a table in MySQL DB, I and all filled planners that have been filled by clients to date can be viewed from a repository page where an XML file is served up of the corresponding client, but someone would have to have Acrobat Professional, to import the form data from the XML file into a blank form.. altoughh this is simple for me.. I have the PHP file already created so that when a Planner is filled and client submits. >> the an email is sent to me with a table row from the repository of the client name, #, email, and a link to d-load the XML file,
But I also have the PHP files created so that the Planner can be sent to by email to various people in the workflow with certain fileds ommitted they they do not need to see, but instead of the XML file beiong served up i need the filled PDF Planner to be served.
I can do this locally with ease on a testing server, but I am currently trying to use another host that uses cross-platform compatibility so i can use PHP and the pdftk.exe to achieve this, as that is why I am having to serve up an XML file b/c we use a Linux server for our website, and cant execute the exe.
Now that I am testing the other server (cross-platform host), just to use them to do the PDF handling (and it's only $5 per month) I am having problems with getting READ, WRITE, EXECUTE permissions..
Si guess a good question to ask is can PHP do the same procedure as the pdftk.exe, and i can eleminate it.
or how in the heck can i get this data from the DB into a blank PDF form, like i have described??
here are some link to reference
Populating a LiveCycle PDF with PHP and MySQL
http://www.andrewheiss.com/Tutorials?page=LiveCycle_PDFs_and_MySQL
HTML form that passed data into a PDF
http://www.mactech.com/articles/mactech/Vol.20/20.11/FillOnlinePDFFormsUsingHTML/index.htm l
and an example
http://accesspdf.com/html_pdf_form/

Similar Messages

  • Howw to fill a pdf file with data

    Hi all,
    In my application I have a pdf file contains 3 input fields.. ProdId,ProdName,ProdQty..Now, I want these three fields be filled with values dynamically using InteractiveForm in WebDynpro. I put this pdf file in
    src->mimes -->components --> <mycomponent>.
       OR
    Suggest me if any other way to do this in WebDynpro.
    Thanks in advance
    LakshmiNarayanChowdary.N

    Hi Lakshmi,
    You have to map the fields in ur pdf with your context. Follow this tutorial.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dynamic%20non-interactive%20pdf%20form.pdf">Dynamic Forms</a>
    Moreover, for your email application, check this tutorial.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/offline%20interactive%20pdf%20form%20using%20e-mail.pdf">Mail Tutorial</a>
    Regards,
    Abdullah Ismail

  • Linking dynamically to a pdf file from Crystal

    I have a Crystal report in which I need to embed a link to a .PDF file   I pass the year and zone into the report which I then need to use to dynamically link to the proper .pdf file within Crystal.  I tried adding an OLE object and selecting .PDF but I need this link to be dynamic to attach the correct .pdf, not static.  Is that possible?If yes then could you please let me know how to do it.
    Thanks
    Mohan Koduru

    Depending on the version of CR... with 11.5 and higher, search the help file for:
    OLE object dynamic
    Ludek

  • Dynamic update of pdf files on web server with xml

    Hi forum
    Is it possible, to make a pdf form quiz, on a web site, there are updating it contents every day just bye replacing a xml file there have the text for the questions.?
    I just need some guindes or ide how to make this. ( i am new in xml/ dynamic pdf files)
    And do i need a LiveCycle form server to to this ?
    Regards
    Th

    Hi there
    I will like to get a mail (xml is fine ) but with the selections the user select in my pdf file.  ( They can select 1 to 3 inside the drop down list )
    Now when i try i only get the source xml, there is used to create the questions.
    I can't see the selection from the user of the form
    like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Quizes Name="Game1" Id="1000">
    - <Quiz QuestionNumber="1">
    <Question>Will you use this forum ?</Question>
    - <Values NoOfValues="5">
    <Value>1</Value>
    <Value>2</Value>
    <Value>3</Value>
    <Value>4</Value>
    <Value>5</Value>
    </Values>
    </Quiz>
    - <Quiz QuestionNumber="2">
    <Question>Are you a designer ?</Question>
    - <Values NoOfValues="2">
    <Value>Yes</Value>
    <Value>No</Value>
    </Values>
    </Quiz>
    - <Quiz QuestionNumber="3">
    <Question>Dette er en test ?</Question>
    - <Values NoOfValues="2">
    <Value>Ja</Value>
    <Value>Nej</Value>
    </Values>
    </Quiz>
    </Quizes>
    I have try to set the databinding but it will not work for me.
    So if you can guide me where change or set the parameters in the Quiz pdf i hope i can see the way it has to be done.
    Regards
    TH

  • FILL IN PDF FILE

    Hi everyone,
    I have a PDF file that I would like to display and fill in with data so that the user could print the form. What is the best and easiest way to perform this?
    Thank you,
    steven

    Google around for FDF

  • How do I add an e-mail address and capability to send a fill-in pdf file

    I have Adobe Acrobat 8.1.2 on my PowerMac G4 running OS 10.4.11. I created some pdf forms which have the fill in capability and posted them on my web site. I want to be able to allow someone to click on a button to automatically send the file to my e-mail address. Is that possible if someone is just using Acrobat Reader on a Windows or Apple machine. I see that one cannot "save" the filled in document but they can "print" the filled in document or print a blank (not filled in version). If they could actually save the filled in document that would be just as good because they could attach it to an e-mail. So, is there a way to create a button to e-mail the filled in form to my e-mail address when someone completes it or a way to save the filled in copy as a file (so they can do that with just Acrobat Reader)? Thanks so much for any info.
    Barry

    >If they could actually save the filled in document that would be just as good because they could attach it to an e-mail
    In Acrobat Pro, open the form and go to the Advanced menu and choose enable usage rights for Reader users.
    Now, they will be able to fill out the form and save it to send it back to you in an email.
    Be aware that there is a 500 use per form limit so this isn't a good answer for high volume use forms.

  • Auto-fill Existing PDF files?

    I have been given some standard shipping forms in an editable PDF format. Instead of spending 200 hours recreating reports in Report Builder that are the exact same thing, I was hoping Oracle Reports (or Forms) could just "send" the data to the PDFs (like passing in parameters) which would auto-fill the existing editable PDFs.
    We DO have Acrobat 8 Professional --- so if there is a way to change the properties of a report to accept these "parameters" (aka "passed in data"), then we can do that. The person who has Acrobat on her computer is out of the office for the next week. So I can't go look on her computer and play with it. :(
    We have the 6i development tools on a 9i db.

    I dont think this is possible in reports.
    However there are third parties who perform this. Search in google.
    Rajesh Alex

  • Software to add text/fill in PDF file

    Hi,
    Been using my MacBookPro about a year now, after 30 years in PC-land. Is there any software that came with the system (Snow Leopard) that allows me to fill in forms (write on top of a PDF form) so I can print out the form typed, instead of filling in the form by hand after printing it?
    I know I won't be able to modify the form, I'd just like to fill it in with type.
    Thanks!

    East Coast user wrote:
    Is there any software that came with the system (Snow Leopard) that allows me to fill in forms (write on top of a PDF form) so I can print out the form typed, instead of filling in the form by hand after printing it?
    Sure! Open the PDF in Preview, go to Tools > Annotate > Add Text.
    When you are done, print it or print it to a new PDF.

  • Email filled out pdf file?

    I can fill out a doc form within the app but when i try to email it comes up blank. Anyone know why??
    Thanks

    Hi kitchen_chef,
    You need to save the filled form and then email.
    You would need to enable this form in Acrobat in order for Reader users to be able to save it.
    The option is located under the "advanced" menu.

  • How to create a pdf-file dynamically

    Hi all,
    does anybody have a tutorial or self-made code, in which is illustrated, how to dynamically create a pdf-file.
    I am getting some information like this: "Line one has a textfield and an input-field", etc. These informations have to be translated as a pdf-file by myself.
    I read, that a pdf-file needs a xdp and the data as an inputstream. Is there anybody who can explain this issue?
    I think, that there are a lot of people, who are interested in this problem.
    Thank you for your help.
    Kind regards, Patrick.

    check this link...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/lw/uuid/10b33628-0207-2a10-908f-de9c02ca6913
    hope it helps.
    regards,
    -amol gupta

  • How read a pdf file and change TableCell height after reading it using itext api

    I have created a pdf form file using itext ( see class CreatingFormClass ) with itext PdfPTable and PdfPCell. It is done successfully .
    Now I  read this pdf file and filling this pdf file(see class FillingFormClass  ) and at this point i want to change  PdfPCell height () according to Items.
    It is possible or Not???
    My code is given below.
    Thanx in advance
    public class FillPdfFormMainClass {
    public static  String RESULT1 = "E:/BlankForm.pdf";
        public static  String RESULT2 = "E:/FilledForm.pdf";
        public static void main(String[] args) throws DocumentException, IOException {
            String empName="Rakesh Kumar Verma";
                    // This part is Dynamic. It can be 1 item Or can be 25 items
            String listOfItem="Item 1 \n Item 2 \n Item 3\n Item 4 \n Item 5 \n Item 6 \n Item 7 \n Item 8 \n Item 9";
            CreatingFormClass example = new CreatingFormClass(0);
            example.createPdf(RESULT1);
            FillingFormClass class1 = new FillingFormClass();
            class1.manipulatePdf(RESULT1, RESULT2,empName,listOfItem);
    public class CreatingFormClass implements PdfPCellEvent {
        protected int tf;
        public CreatingFormClass(int tf) {
            this.tf = tf;
        public void createPdf(String filename) throws DocumentException, IOException {
            Document document = new Document();
            PdfWriter.getInstance(document, new FileOutputStream(filename));
            document.open();
            PdfPCell cell;
            PdfPTable table = new PdfPTable(2);
            table.setWidths(new int[]{1, 2});
            table.addCell("Name:");
            cell = new PdfPCell();
            cell.setCellEvent(new CreatingFormClass(1));
            table.addCell(cell);
            table.addCell("Item List:");
            cell = new PdfPCell();
            cell.setCellEvent(new CreatingFormClass(2));
            cell.setFixedHeight(60);
            table.addCell(cell);
            document.add(table);
            document.close();
        public void cellLayout(PdfPCell cell, Rectangle rectangle, PdfContentByte[] canvases) {
            PdfWriter writer = canvases[0].getPdfWriter();
            TextField text = new TextField(writer, rectangle, String.format("text_%s", tf));
            text.setBackgroundColor(new GrayColor(0.95f));
            switch (tf) {
                case 1:
                    text.setText("Enter your name here...");
                    text.setFontSize(8);
                    text.setAlignment(Element.ALIGN_CENTER);
                    break;
                case 2:
                    text.setFontSize(8);
                    text.setText("Enter Your Address");
                    text.setOptions(TextField.MULTILINE);
                    break;
            try {
                PdfFormField field = text.getTextField();
                writer.addAnnotation(field);
            } catch (IOException ioe) {
                throw new ExceptionConverter(ioe);
            } catch (DocumentException de) {
                throw new ExceptionConverter(de);
    public class FillingFormClass {
        public void manipulatePdf(String src, String dest,String empName,String listOfItem) throws IOException, DocumentException {
            PdfReader reader = new PdfReader(src);
            PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(String.format(dest, empName)));
            AcroFields form = stamper.getAcroFields();
            form.setField("text_1", empName);
            form.setField("text_2", listOfItem);
            stamper.close();
            reader.close();

    Hi,
    I am facing the same problem. Please help me out. I just want to read a PDF file as bytes from one location and write it as another pdf file in some other location with a diolog box prompting to open or save in the location where we want.
    I executed the following code:
    try{
    File report =new File(location);
    BufferedInputStream in=new BufferedInputStream(new FileInputStream(report));
    response.setContentType("application/x-download");
    response.setHeader("Content-Disposition", "attachment; filename=" + report.getName());
    OutputStream outs = response.getOutputStream();
    int readlen;
    byte buffer[] = new byte[ 256 ];
    while( (readlen = in.read( buffer )) != -1 )
    outs.write( buffer, 0, readlen );
    outs.flush();
    outs.close();
    in.close();
    response.setStatus(HttpServletResponse.SC_OK);
    } catch (FileNotFoundException fileNotFoundException) {
    PrintWriter out= response.getWriter();
    out.print("<center><Font color = 'RED'><b>"+PxDSLUtils.getApplicationProperty("label.error.CTM_E017")+"</b></Font></center>");
    Though it prompts with open, save dialog box when i try to open directly or when i save it some where locally and then open it i am getting the following message " File is repaired ot damaged.Operation failed." Any idea about what can be done??? Its very urgent.Please suggest.
    I am not convetin to string just reading and writng as bytes itself.
    Thanks in advance,
    Mani

  • Saving fillable PDF file in Android Adobe Reader Mobile Application

    I'll do my best to explain my situation.
    1. I open the fill-able PDF file from Google Drive with Android Adobe Reader Mobile Application.
    2. I fill out the pdf form using the Android Adobe Reader Mobile Application.
    3. Once I'm done filling-in the PDF, I would like to save the file in a specific folder in Google Drive.
    I cannot find any saving option within the Android Adobe Reader Mobile Application.
    The only way around saving was the "Sharing" feature.  It allows the user to share the pdf file using various android applications such as Google Drive, Email, and Evernote to share the file.
    This does not allow for overwriting of the original file.  Therefore, you will create a new file every time you share the file.
    I wanted to know if there was a way to save the file under the same name to overwrite the same file in the Android Mobile version.
    Thanks in advance.

    You need to duplicate(and/or rename) it first (after finding it in the "Documents"  menu tab), then fill it out. This is the workaround for the missing Save/Save as menu. Once you fill out something, and leave the application, the document will be saved automatically.

  • Fill a PDF form from Excel

    Hello to all.
    I've been googling around for days to find some examples to solve my problem but was unable to find a good one.
    I’m using Excel 2007 and Visual Studio 2010
    Normally I report the data using Excel itself (a workbook). Now the request I have is to fill a PDF file containing a form with a huge number of lines. This means the data i have in the columns and lines of the Excel Worksheet have to be entered in the PDF form fields.
    The PDF file was created withAdobe LiveCycle Designer 11.0 and has the ability to allow the creation and deletion of as many lines as we need.
    I do even have a way to know the PDF form fields names...
    Can someone please give me a clue of how can i achieve this using VB?
    Thanks in advance for any kind help.
    Octavio

    In that case the for loop would be:
        for (var i = 0; i < 8; i += 1) {
            sum += +getField("Total." + i).value;
    So initially, the counter i is equal to zero, so the field name used with the getField method is:
    "Total." + 0, which results in the string "Total.0". With each iteration, the variable i is incremented by 1, so the subsequent field names are the following:
    "Total.1"
    "Total.2"
    "Total.3"
    "Total.4"
    "Total.5"
    "Total.6"
    "Total.7"
    The script gets the value of each field, converts it to a number, and adds the number it to the running sum.

  • I can't properly sync PDF files onto my iPad!

    You see I have numerous PDF files on my iPad. But whenever I try to sync a new one I'm forced to also resync all of my old files too along with my apps that have already been synced! This is obviously frustrating because it takes 10 minutes for everything to sync! All I want to do is sync the *new* files that I had downloaded. Not the old ones because I already synced those! Also, another problem is that I can't delete the PDF files off of my desktop because when iTunes syncs the old &amp; new PDF files it apparently searches to see if those PDF files are still on my desktop. If one PDF file is not found on my desktop iTunes deletes that PDF file off my iPad!!!!!! Wth I can't even place those PDF files in a new folder. This is very irksome because my desktop is now filled with PDF files so now everything is all cluttered and disorganized. I just want to download a PDF file, sync it, and then delete it off my desktop, or at least place it in a folder so it'll all just be in one place instead of scattered all over my desktop. Sorry if this is confusing I'm just really frustrated with how complicated iTunes has been so far when using my iPad. I have an iPhone 4 and iPod touch 4 and I never had such a problem with syncing. Help!

    You must be singed into the Apple ID you used to purchase the movie.  Also, not all movies can be redownloaded.  It must be permitted in your country (see country list for Movies here: http://support.apple.com/kb/HT5085), and also must be permitted by the movie studio (not all studios permit redownloading).  You would have to contact iTunes store support to find out for sure: http://www.apple.com/emea/support/itunes/contact.html.

  • InDesign Transparency Effect vs. pdf file size

    I have an Interactive pdf that was created from InDesign. There is  "inner glow" is an effect style created box style. This box style is used a number of times in the 30  page document. The glow is a gradient from black to transparent which looks  like an inner shadow for the boxes (sample attached). When I generate the pdf file, size is about 12 Mgb, too large for the target audience.
    When I alter the style in InDesign to say something simple like a 10%  black solid fill, the pdf file size decreases to about 1 Mgb.
    Looked into "flattening transparency" options but this creates pdf that has none of the interactive buttons and links that are required.
    Really would like to avoid creating these boxes in photoshop since there are about 40 different sizes of the box.
    Any ideas would be greatly appreciated!

    For some reason I can't find reply on Forums site, so replying to this 
    email
    Exporting an Interactive pdf using the attached (15.8) jpegs settings 
    creates a file that is 15.8 Mgb.
    Exporting an Interactive pdf using the attached (14.5) jpegs settings 
    creates a file that is 15.8 Mgb.
    Any ideas??? Thanks.

Maybe you are looking for

  • How Do I Change my default Address in Mail?

    Hello Everyone, I had to change my Hotmail e-mail address, and I can't believe the programs I've had with that! Anyway, my Apple-Safari-Mail account e-mail address is the same one which I had to change. Naturally, when Mail pops up, My old address sh

  • Current Calendar Day on Selection Screen as Default

    Hi, I have a situation where i need to have a variable which pulls up current calender day as a default value in the selection screen. Here users can use the default value if they want or else they should be able to change the default value to their

  • CSV file output!!

    Hello, i have a working select statment, and i have try to adapt an old CSV output file i have used before, but i am gettin the following error: SQL> @$ORBEXE/sup.sql TYPE wk_tab IS TABLE OF read_input%ROWTYPE ERROR at line 98: ORA-06550: line 98, co

  • BW database table to infoobject

    Hi, I have created a table in bw and filled up the data...... From this table i would like to add the data to infoobject.... how to assign BW Database table to InfoObject.... Plz answer its an urgent. Anjali

  • "Do it for me"

    Hi, We don't officially use captivate at my workplace but we're investigating it's ability to meet our current standards. I'm the guinea pig. Currently, with the software we use, we are able to have an interactive simulation where the user, for examp