PDF-to-PPTX in Java: Conversion Error - Cannot Invoke "com.aspose.slides.t1z.h5()" Because "Image" Is Null

When converting the PDF and then to PPTX, report is failed with NullPointerException .
Aspose version:
implementation ‘com.aspose:aspose-pdf:26.7’
implementation ‘com.aspose:aspose-slides:26.8:jdk16’

Stack Trace:

java.lang.NullPointerException: Cannot invoke “com.aspose.slides.t1z.h5()” because “image” is null
at com.aspose.slides.ImageCollection.addImage(Unknown Source)
at com.aspose.slides.t7p.h5(Unknown Source)
at com.aspose.slides.u4t.h5(Unknown Source)
at com.aspose.slides.u4t.h5(Unknown Source)
at com.aspose.slides.SlideCollection.h5(Unknown Source)
at com.aspose.slides.SlideCollection.addFromPdf(Unknown Source)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at PowerPointService.createPresentationFromPdf(ideaGroovyConsole.groovy:20)

Code Sample

import com.aspose.cells.*
import com.aspose.pdf.*
import com.aspose.pdf.DocSaveOptions
import com.aspose.pdf.PptxSaveOptions
import com.aspose.slides.Presentation
import com.aspose.slides.SlideSizeScaleType
import us.cgt.common.template.PdfService

import java.io.FileInputStream

import com.aspose.pdf.Document
import com.aspose.pdf.PptxSaveOptions

class PowerPointService {
    Presentation createPresentationFromPdf(String pdfLocation) {
        Integer width = 792
        Integer height = 612

        Presentation presentation = new Presentation()
        presentation.slides.addFromPdf(pdfLocation);
        presentation.slides.removeAt(0)
        presentation.slideSize.setSize(width, height, SlideSizeScaleType.EnsureFit)

        return presentation
    }

}

def service = new PowerPointService()


def ppt = service.createPresentationFromPdf( "'Downloads/PPTX aspose test rm-08-17-2026-1786941558033.pdf'")

ppt.save("Downloads/Lorem ipsum.pptx", com.aspose.slides.SaveFormat.Pptx)

The input PDF has been attached.
PPTX aspose test rm-08-17-2026-1786941558033.pdf (200.3 KB)

Thanks,
Nitesh

@NiteshCG
We apologize for any inconvenience caused. Our team has reproduced the NullPointerException you encountered when converting PDF to PPTX using Aspose.PDF 26.7 and Aspose.Slides 26.8. The issue has been logged and is being addressed internally by our development team as soon as possible.

Issue ID(s): SLIDESJAVA-39855

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Any update on the fixes timleine?

Thanks,
NiteshKC

@NiteshCG,
The issue may potentially be resolved in Aspose.Slides for Java 26.9. However, this is not confirmed yet, and the fix may be postponed to a later release depending on the development and testing results.

We will keep you informed of any progress.

The issues you found earlier (filed as SLIDESJAVA-39855) have been resolved in Aspose.Slides for Java 26.9 (Maven, JAR).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.