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
Eclipse UserFriend
{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
Eclipse UserFriend
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é
Previous Topic:Scout 22 Contacts App
Next Topic:Application set up wizard
Goto Forum:
  


Current Time: Fri Feb 14 03:11:25 GMT 2025

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

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

Back to the top