Spire.PDF for Java 11.2.3 supports extracting video and audio content from PDF documents

Spire.PDF for Java 11.2.3 supports extracting video and audio content from PDF documents

2025-02-28 08:12:23

We are excited to announce the release of Spire.PDF for Java 11.2.3. This version supports extracting video and audio content from PDF documents. It also enhances the conversion from PDF to OFD. What’s more, some known issues are fixed successfully in this version, such as the issue that the content overlapped when drawing grid table text. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREPDF-7349 Supports extracting video and audio content from PDF documents.
PdfDocument pdf = new PdfDocument();
pdf.loadFromFile(inputFile);
FileOutputStream outputFileStream =null;
for (int i = 0; i < pdf.getPages().getCount(); i++)
{
	PdfPageBase page = pdf.getPages().get(i);
	PdfAnnotationCollection ancoll = page.getAnnotations();
	for (int j = 0; j < ancoll.getCount(); j++)
	{
		PdfRichMediaAnnotationWidget MediaWidget = (PdfRichMediaAnnotationWidget)ancoll.get(j);
		byte[] data = MediaWidget.getRichMediaData();
		String embedFileName = MediaWidget.getRichMediaName();
		outputFileStream = new FileOutputStream(String.format(outputFile + embedFileName));
		outputFileStream.write(data);
	}
}
Bug SPIREPDF-7276 Fixes the issue that the content overlapped when drawing grid table text.
Bug SPIREPDF-7295 Fixes the issue that the program threw an exception NullPointerException when merging PDF documents in multiple threads.
Bug SPIREPDF-7330 Fixes the issue that the result of calling PDF.getForm().isFlatten(true) was incorrect.
Bug SPIREPDF-7341 Fixes the issue that the program threw the problem that font could not be obtained when converting PDF to OFD in Centos7.
Click the link below to download Spire.PDF for Java 11.2.3: