Closed Intelligent2013 closed 3 months ago
Currently, if the file from @name
is exists on the disk:
<attachment name="_document_attachments/READY-20230316-no-toc-iso-10303-49.pdf">data:application/pdf;base64,JVBERi0xLjYNJeLjz9MNCjExNDU0IDAg b2JqDTw8L0xpbmVhcml6ZWQgMS9MIDE1NTExOTQvTyAxMTQ1Ni9FIDEyNDQz
then attachment/text()
is cleaning in the XSLT to free the memory resources.
If file doesn't exist, then attachment/text()
is using as the attachment source.
Currently, the are two issues:
[x] if file is exists _document_attachments/READY-20230316-no-toc-iso-10303-49.pdf
the errors occurs:
java.net.URISyntaxException: Illegal character in opaque part at index 60: data:application/pdf;base64,JVBERi0xLjYNJeLjz9MNCjExNDU0IDAg
b2JqDTw8L0xpbmVhcml6ZWQgMS9MIDE1NTExOTQvTyAxMTQ1Ni9FIDEyNDQz
[x] if file doesn't exist, then error occurs:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
java.net.URISyntaxException: Illegal character in opaque part at index 60: data:application/pdf;base64,JVBERi0xLjYNJeLjz9MNCjExNDU0IDAg b2JqDTw8L0xpbmVhcml6ZWQgMS9MIDE1NTExOTQvTyAxMTQ1Ni9FIDEyNDQz
Line breaks don't allowed in URI in XSL-FO. Fixed.
Fixed.
Source issue: https://github.com/metanorma/metanorma-standoc/issues/900#issuecomment-2291013304
Source Presentation XML file size is 144Mb (contains attachments).