Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

How to get website inputed text into a PDF file?

  • 04-01-2019 12:59pm
    #1
    Registered Users, Registered Users 2 Posts: 38


    Happy New Year!

    Here's my requirement:

    I've a pre-existing PDF file that needs various parts of it filled with info such as Name, Address contact numbers etc and then emailed out to individual involved.

    The info needed can be captured via a website, but would anyone have any suggestion regards automated tools that we could use to update PDF file in pre-defined areas with captured data and then email it back to the user.

    Ideally tool would run automatically on the server side of things, but also happy to look at deskside based options.


    FYI: Our budget is v-v-v-v-low!


    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Do you need the end-product to be editable by the user? Do you need to use the actual pre-existing PDF, or can you just create a new one?

    If not, then basically what you do is create a web form which replicates the content of the PDF, gets the values from the user and then uses a PDF library at the backend to generate a new PDF file using the inputted values.

    If you absolutely need to use the PDF file that you currently have, then something like https://pypi.org/project/PyPDF2/ might let you edit it and save a copy to send to the end-user.


  • Registered Users, Registered Users 2 Posts: 3,454 ✭✭✭NSAman


    Might be a bit cumbersome, might not capture information but a word email merger using the .pdf as the main file and a database with the information linked?


  • Registered Users, Registered Users 2 Posts: 38 crkcvnirl


    Thanks very much for taking the time to reply.

    Prob is the original PDF is not ours and may have changes applied every 6 months by the author, so an on-line PDF form would leave plenty of scope for human error to creep in!

    There's a lot of data duplication on the form that we want to eliminate for the user eg Name, address etc is needed on a few different pages. Ideally just want our user to enter data once and we'll automatically populate the PDF.

    When data population is done we'll email form back to the original user or print and post it back to them.

    Been doing some googling but nothing jumps out at us.

    Any and all thoughts are much appreciated.

    Regards


  • Closed Accounts Posts: 9,046 ✭✭✭Berserker


    Trying to think of the tools I used to tackle this kind of problem before and PdfSharp springs to mind. Had a quick read of the documentation that was there and editing pdf documents is supported, apparently. Stackoverflow gave me the following example. Are you sure all the fields you need to edit are text?


  • Registered Users, Registered Users 2 Posts: 6,570 ✭✭✭daymobrew


    TCPDF is available for use with PHP.
    I came across it in a WordPress/WooCommerce plugin to generate PDF invoices.

    I looked at the TCPDF docs but I think that it creates PDFs from scratch.
    Having said that, the plugin does allow images to be inserted into the PDFs. Maybe the incoming PDF could be converted to image and then you add them to the new PDF, adding your address fields at the same time.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 38 crkcvnirl


    Thanks for all your responses. I've just got back to this so will look at the suggestions offered.

    Happy New Year!


  • Registered Users, Registered Users 2 Posts: 9,605 ✭✭✭gctest50


    Easy enough, you can lay out the "questions" on the website any old way then send the output to a .fdf of the pdf then just mate them together and email them or offer it for printing


Advertisement