www.webdeveloper.com
Results 1 to 8 of 8

Thread: Posting Data to a PDF file

  1. #1
    Join Date
    Nov 2013
    Posts
    4

    Question Posting Data to a PDF file

    I have a server side database for which a JSON file has been created and placed in a client side javascript program's array. The purpose is to post the JSON array data to a PDF, both string and number data.

    My problem is that I don't know how to include the PDF form into the javascript program. My idea is that there likely is a way to do this, something like using a LINK to include modules like *.css and *.js ; if that is true, then where can I find syntax information and a write-up about this?

    I like the LINK idea because the "css" and "js" modules are effectively part of the javascript program even though they are physically separate from it.

    I very much appreciate any help in making the PDF available to the control of the javascript program.

    Thanks to all who can guide me on this task. http://www.webdeveloper.com/forum/im...s/confused.gif

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,405
    You can have a PDF post and accept data from a server but you can't have JavaScript control a PDF unless the JavaScript is embedded in the PDF to start with. Does that make any sense?
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

  3. #3
    Join Date
    Nov 2013
    Posts
    4
    Thank you for your reply and considering my question.

    I understand what you said, but don't know why what you said is true. Doesn't the fact that the PDF is client side and the data is client side make a difference? My case is filling a PDF and printing the filled PDF. I don't want to put anything from the PDF into the server database.
    Isn't there a way to bring the PDF into the range of influence of a javascript program via a LINK command?

    If I have to have all the javascript embedded inside the PDF how is that made to happen? Where do I learn about embedding javascript into a PDF?

    Thank you for your time.

  4. #4
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,405
    I have been try to experiment with pageplusX5 which cam make PDF files that submit data to servers and also accept responses.

    In the tutorials it states that straight JavaScript can be use in the various fields for validation.

    However, JavaScript can not make a PDF file, only a program or a server side, if you went to lengthy extrems of making a WYSIWYG and send your data to a server that can then turn out a PDF, fair enough but JavaScript itself has not got the access or capability of making a PDF file.

    This is possibly what you are looking for http://www.pdfill.com/
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

  5. #5
    Join Date
    Nov 2013
    Posts
    4
    Hi \\.\*,

    Thanks for going to this extra trouble. I am looking at both pageplusX5 and pdfill. They will take closer examination. They seem designed to give power to the user in the creation of the form. Since mine is already created and not to be changed, I will have to look in the details of these to see if they provide a javascript-PDF linkage.

    For now as a first time thread writer I apologize for not adding (what in hindsight would seem to be important to state) some information in my original problem statement.

    My form is a tax document in PDF format. It is already created and set in size and content. My requirement is to use that tax form and not create my own version. I am able to name each field in the tax form PDF in which I need to drop client data. And javascript has the ability to place the data in the right location in the PDF. My stopping point at the moment is how to enable access to the PDF when the javascript is outside the PDF.

    My thought was to use the <link> tag/element to provide a connection between the javascript program and the PDF file. Currently, I have many CSS instructions in a separate CSS file and the same for many javascript functions in a separate JS file. Both CSS and JS are connected to the Javascript program by use of the <link> tag inside the program <head> tag. Why not the PDF module also? I am trying to make that happen. No success yet.

    If I have to go the route of javacript inside the PDF, then I have to find out how to do that. That means a very close study of what these software offerings you pointed out to me will do.

    Thank you again for taking such an interest in my issue. If I discover anything, I will add the discovery to this thread.

  6. #6
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,405
    the latest pageplus is X7

    I am having a problem with X5 or possibly its an Adobe problem, tech guys are looking in to it for me.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

  7. #7
    Join Date
    Nov 2013
    Posts
    4
    the latest pageplus is X7
    I am having a problem with X5 or possibly its an Adobe problem, tech guys are looking in to it for me.
    I will be interested to know what the problem was and their solution. I will have to find out how they use javascript in the PDF.

  8. #8
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,405
    IDK, its hard to say because I wrote a very simple PHP capture script for the POST data and it then dumps in to a log file the data received.

    The guys tell me that my post method should be FDF and not HTML because Adobe was reporting an error finding the server, my test server is on my local machine, so quite why Adobe couldn't find it is baffling.

    Anyway, I got the thing posting but the data stream is a blank line, nothing in it.

    So I am in the middle of re-installing Adobe.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles