[英]PDF validate using PDFBOX PreflightParser for PDDocument
[英]Using PdfBox, how do I retrieve contents of PDDocument as a byte array?
我目前正在使用PdfBox作為pdf文件編輯器應用程序的驅動程序。 我需要pdf文件(PDDocument)的PdfBox表示的內容作為字節數組。 有誰知道如何做到這一點?
我希望現在還為時不晚......
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
document.save(byteArrayOutputStream);
document.close();
InputStream inputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
瞧! 你有兩個輸入流!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.