Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need help transferring data from aspx form to pdf form

New Here ,
Feb 18, 2023 Feb 18, 2023

I have an information form in my software application (de_school.aspx) that contains a link to a pdf. When the user clicks on the pdf link I want the customer's name from de_school.aspx to appear in the School field on my pdf form.  

 

de_school.aspx is the name of the form i want to take the data from

txtSchoolName is the field on the de_school.aspx form I want to get

School is the field on the PDF I am trying to populate

TOPICS
JavaScript
2.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2023 Feb 19, 2023

So right off, this is not an Acobat issue. Since you have a server based web app, transfering data from a PDF (on a server) and into the aspx web app, a PDF library, or some tool that can read PDF form data is required. Acrobat isn't part of this process.

Ideally you'd want an easy connection to your mananaged environment, but AFAIK, there are no built-in .NET PDF libraries or tools.  There are however several 3rd party .NET PDF tools. Do a google search for "PDF .NET Library" or something similar. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2023 Feb 19, 2023

I am trying to do the opposite.  Transfer the data from the aspx page to the pdf. Does your answer still apply?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2023 Feb 19, 2023

Yes and No. Putting data into the PDF has more options.  However, the very best method is to use a server side tool to populate the PDF before serving it up to the user. This provides the best ease use and robustness for the user. 

 

The other options for doing this rely on the user being setup to to directly load the PDF into Acrobat/Reader when the link is pressed. And this won't work on mobile. Which basically means this set of techniques are unusable unless you have a tighly controlled environment. 

For example one technique is to modify(redirect) the link URL at the time it is pressed to include an URL to an FDF file.

Like this:

http://example.org/doc.pdf#fdf=http://example.org/doc.fdf

 

Your code will need to create the FDF on the fly, with the data you want populated into the PDF. 

   

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2023 Feb 19, 2023

This is very helpful.  Most of my users are are not on phones.  Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2023 Feb 19, 2023
LATEST

There may be another option, which is the PDF Embed API

https://developer.adobe.com/document-services/apis/pdf-embed/

It's a free service provided by Adobe for displaying PDF in an HTML page. It's setup with HTML JavaScript.  I don't know if it provides any access to the form fields or anything internal in the PDF, but it's worth looking into.   

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines