Skip to main content
Skip table of contents

pdfOffice: improved conversion of docx files containing embedded videos

With the release of iText 7.2.2 and pdfOffice 2.0.2, we've resolved an issue affecting the conversion of .docx files containing embedded videos. While previous releases would convert such files without errors, the resulting document would only contain an embedded image of the video's thumbnail.

Now, such conversions will preserve the embedded video's link to the online version in the resulting PDF documents.

Below is a Java example showing how to do this:

Java

JAVA
public static void main(String[] args) throws IOException {
        // Load License Key
        LicenseKey.loadLicenseFile(new File("LicenseKey.json"));
        // Create the input and output files
        File demoFile = new File("EmbeddedVideoExample.docx");
        File pdfOutFile = new File("outputFileWithEmbeddedVideo.pdf");
        // Convert the docx file to PDF
        OfficeConverter.convertOfficeDocumentToPdf(demoFile, pdfOutFile);

        System.out.println("Your PDF File was successfully created!");
}

Resources

You can find the input .docx file and the output PDF file below.

EmbeddedVideoExample.docx  outputFileWithEmbeddedVideo.pdf




JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.