• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

How to upload a PDF file from a webpage, get its fields values and render them into the same webpage

New Here ,
Mar 17, 2022 Mar 17, 2022

Copy link to clipboard

Copied

I am trying to develop a web page where I want to upload a PDF file from a web page, get the values of its fields then render them into the web page fields using JavaScript. I started with the following code but I can not get the value of the PDF fields. May I ask for a sample code on how to do this

 

<html>
<head>
<script src="jquery-2.1.4.js"></script>
<script src="jspdf.min.js"></script>
</head>
<body>
<input type="file" id="file-id" name="file_name" onchange="ExtractText();">
<!-- a container for the output -->
<div id="output"></div>
<script>
function ExtractText() {
var input = document.getElementById("file-id");
// Insert get doc field code here
var doc = new jsPDF(input.files[0]);
}
</script>
</body>
</html>

TOPICS
Acrobat SDK and JavaScript

Views

480

Translate

Translate

Report

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
LEGEND ,
Mar 17, 2022 Mar 17, 2022

Copy link to clipboard

Copied

This wouldn't a question of a little code to copy/paste. You need to install a PDF parsing library on the web site and write SERVER SIDE code to run it, as a web script. Then finally some simple HTML to call the web script.

Votes

Translate

Translate

Report

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 ,
Mar 17, 2022 Mar 17, 2022

Copy link to clipboard

Copied

I do not need the whole code I just need to know which function and class I can use to get the PDF document. With the above script, I can upload the file but which class I can use to get this PDF so I can use the  getElementByName() function or a similar one.

Votes

Translate

Translate

Report

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
LEGEND ,
Mar 17, 2022 Mar 17, 2022

Copy link to clipboard

Copied

I realise you want this to be something simple, but it isn't. This is a serious programming task which could take an experienced programmer several days. You need to do all of the steps I outlined. 

Votes

Translate

Translate

Report

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 ,
Mar 17, 2022 Mar 17, 2022

Copy link to clipboard

Copied

Try a forum for jspdf.

Votes

Translate

Translate

Report

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 ,
Mar 18, 2022 Mar 18, 2022

Copy link to clipboard

Copied

LATEST

This has nothing to do with Acrobat, or any other Adobe software.

Votes

Translate

Translate

Report

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