StackOverflowError converting PDF to PDFA

Hello!
GeoTopo.pdf (1.7 . MB)

When we attempt to convert this file from PDF to PDF/A-1b we get a java.lang.StackOverflowError.

We are using com.groupdocs:groupdocs-conversion 24.5

Here’s the conversion code (in kotlin):

val pdfOptions = PdfOptions()
pdfOptions.pdfFormat = PdfFormats.PdfA_1B

val convertOptions = PdfConvertOptions()
convertOptions.format = PdfFileType.Pdf
convertOptions.pdfOptions = pdfOptions

val byteArrayInputStream = { ByteArrayInputStream(documentFromUrl) }
val converter = Converter(byteArrayInputStream)

val pdfOutputStream = ByteArrayOutputStream()
val pdf = { pdfOutputStream }
converter.convert(pdf, convertOptions) 

And we tried alternative code (with same result):

val pdfFormatConversionOptions = PdfFormatConversionOptions(PdfFormat.PDF_A_1B, ConvertErrorAction.Delete)
pdfFormatConversionOptions.isLowMemoryMode = true
pdfFormatConversionOptions.logStream = ByteArrayOutputStream()

Document(dokument).use { pdf ->
   pdf.convert(pdfFormatConversionOptions)
}

Here is the stacktrace:

java.lang.StackOverflowError: null
	at com.groupdocs.conversion.internal.c.a.pd.internal.l10v.l0if.lI(Unknown Source)
...
Wrapped by: jakarta.servlet.ServletException: Handler dispatch failed: java.lang.StackOverflowError
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1104)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at pache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)

@JohnnyP
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CONVERSIONJAVA-2429

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.