Browse our Products

Aspose.PDF for Java 19.12 Release Notes

Improvements and Changes

KeySummaryCategory
PDFJAVA-38667Hyperlinks and cross-references support on converting PDF to DOCXNew Feature
PDFJAVA-38483Support DICOM image to PDFNew Feature
PDFJAVA-39017Set Font Size of Overlay Text in Redaction AnnotationNew Feature
PDFJAVA-39063Add Font subsets optimization methodEnhancement
PDFJAVA-38960Exception when loading LatexBug
PDFJAVA-36774When PDF is converted to Word document, a hyperlink is lostBug
PDFJAVA-38942PDF to HTML long conversion timeBug
PDFJAVA-39049Merging XFDF with the PDF template produces all checkboxes uncheckedBug
PDFJAVA-34853PDF to HTML: Table is not being rendered incorrectlyBug
PDFJAVA-34865PDF to HTML - Text is not properly being rendered (character overwrite)Bug
PDFJAVA-35744PDF to PDFA throws OutOfMemory ExceptionBug
PDFJAVA-34325XPS to PDF: Issues with Glyphs in output PDF fileBug

Public API and Backward Incompatible Changes

Setting Font Size of Overlay Text in Redaction Annotation

 Document doc = new Document("HelloWorld.pdf");

Rectangle rect = new Rectangle(200, 500, 300, 600);

RedactionAnnotation annot = new RedactionAnnotation(doc.getPages().get_Item(1), rect);

annot.setFillColor(Color.getBlack());

annot.setBorderColor(Color.getYellow());

annot.setColor(Color.getBlue());

annot.setFontSize(20);

annot.setOverlayText("REDACTED");

annot.setTextAlignment(HorizontalAlignment.Center);

annot.setRepeat(true);

doc.getPages().get_Item(1).getAnnotations().add(annot);

doc.save("Redaction_out.pdf");

Adding Font Subsets Optimization Method

 Document pdfDocument = new Document("source.pdf");

OptimizationOptions opt = new OptimizationOptions();

opt.setAllowReusePageContent(true);

opt.setLinkDuplcateStreams(true);

opt.setRemoveUnusedObjects(true);

opt.setRemoveUnusedStreams(true);

opt.setSubsetFonts(true);

pdfDocument.optimizeResources(opt);

pdfDocument.save("result.pdf");

New Methods Added