Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
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

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

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.

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

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.

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

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. 

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

Try a forum for jspdf.

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

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

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