Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me
- import java.io.{File, FileInputStream}
- import org.apache.pdfbox.pdmodel.PDDocument
- import org.apache.pdfbox.tools.PDFText2HTML
- object PDFtoHTML {
- def main(args: Array[String]): Unit = {
- val stream = new FileInputStream(new File("/Users/me/Downloads/example.pdf"))
- val document = PDDocument.load(stream)
- val converter = new PDFText2HTML()
- val html = converter.getText(document)
- println(html)
- document.close()
- stream.close()
- }
- }
Add Comment
Please, Sign In to add comment