Skip to content

Commit 756a90a

Browse files
LonelyMidoriyabundolee
authored andcommitted
Change method how we creating output PDF
1 parent 94971c9 commit 756a90a

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/processors/AutoTaggingProcessor.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ public static synchronized void createTaggedPDF(File inputPDF, String outputFold
6060
createParentTree(cosDocument, structTreeRoot);
6161
String outputFileName = outputFolder + File.separator +
6262
inputPDF.getName().substring(0, inputPDF.getName().length() - 4) + "_tagged.pdf";
63-
try (OutputStream output = new FileOutputStream(outputFileName)) {
64-
document.saveTo(output);
65-
} catch (IOException e) {
66-
throw new RuntimeException(e);
67-
}
63+
document.saveAs(outputFileName);
6864
}
6965

7066
private static void updatePages(PDDocument document, COSDocument cosDocument) throws IOException {

0 commit comments

Comments
 (0)