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>
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.
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.
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.
Copy link to clipboard
Copied
Try a forum for jspdf.
Copy link to clipboard
Copied
This has nothing to do with Acrobat, or any other Adobe software.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now