jquery, populate pdf form fields

Any one knows how to populate pdf fields using jquery? I have all of the data on browser and I want to populate values into pdf fields.
I know we can use c#, itextsharp but there is no point for me to use server side language if jquery can do the faster job for me...

Let me know if you know how....
LVL 1
ITsolutionWizardAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim RiddlesPrepress/OMS SpecialistCommented:
I know of several JavaScript libraries that allow you to work with PDFs, however none that I know of that allow working with form fields in PDFs, at least on the client side.  There are a few Node modules that allow you to do this from the server side, however.  One of them is pdffiller: https://www.npmjs.com/package/pdffiller.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lenamtlCommented:
Hi,

 you can use LocalStorage for this

LocalStorage value will be saved to user browser and then you can read the value from there too.

To set an item in LocalStorage:
localStorage.setItem('key', 'some value');

Open in new window


To read an item from LocalStorage:
var value = LocalStorage.getItem('key');

Open in new window


Using chrome dev tool (right click - inspect) the value will appear under Application tab / LocalStorage
You can set a limit of time or unlimited for LocalStorage
(if you need the info only for a session you can use SessionStorage)

You can also use cookies for this if you prefer...

This is working ok with regular form, so depending how you render the PDF form you are probabaly be able to use the same technique.

I'm using PHP, AJax & Jquery with this PDF library
mPDF https://github.com/mpdf/mpdf
0
Jim RiddlesPrepress/OMS SpecialistCommented:
I think the author was asking about filling the PDF form on the client side with jQuery.  Of course, if you are going to use AJAX, you can use any server side solution you like, as the author already alluded to by mentioning C# with iTextSharp, as well as my mention of pdffiller for use with Node.js.

If the author was serious about using a server side solution, I would consider using SyncFusion's excellent PDF library.  Here is a link to their page showing how to use their library with PDF forms from C#:
http://asp.syncfusion.com/demos/reporting/Pdf/Modify%20Documents/Form%20Filling/cs/default.aspx

That said, your solution does not answer the author's question of how to do this without a server side solution.
0
Jim RiddlesPrepress/OMS SpecialistCommented:
The answer to the author's question is that it is not currently possible.  The proposed solution offers a server side solution.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.