Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » How to upload a PDF file to a web page, get the PDF fields values and render them into the same web
How to upload a PDF file to a web page, get the PDF fields values and render them into the same web [message #1850856] Fri, 18 March 2022 16:10 Go to next message
Sameh Khalil is currently offline Sameh KhalilFriend
Messages: 1
Registered: March 2022
Junior Member
{I am trying to develop a web page where I want to upload a PDF file to this web page, get the values of the PDF fields then insert them into the web page fields using JavaScript. May I ask for a sample code on how to do this I tried the following code but did not work

<!DOCTYPE html>
<html>
<head>

</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");
//alert(input.files[0].name);
pdfjsLib.getDocument('./test1.pdf').then(doc=>{
console.log("This PDF has "+doc._pdfInfo.numPages+" pages");
});
}
</script>
</body>
</html>
Re: How to upload a PDF file to a web page, get the PDF fields values and render them into the same [message #1850857 is a reply to message #1850856] Fri, 18 March 2022 16:17 Go to previous message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
Hi Sameh

Since your question is not related to the Eclipse Scout framework, we cannot help you with this issue. Please check our forum rules and re-post your question in the appropriate forum.

Cheers,
André


Eclipse Scout Homepage | Documentation | GitHub
Previous Topic:Scout 22 Contacts App
Next Topic:Application set up wizard
Goto Forum:
  


Current Time: Thu Dec 12 02:35:19 GMT 2024

Powered by FUDForum. Page generated in 0.03442 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top