Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add image cache folder feature #229

Closed
Intelligent2013 opened this issue Nov 5, 2023 · 3 comments
Closed

Add image cache folder feature #229

Intelligent2013 opened this issue Nov 5, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Intelligent2013
Copy link
Contributor

Source ticket: metanorma/metanorma-ogc#600

To do: in case of big XML (>50mb) extract images from the XML to the temporarily folder, so the XML will contains the file links only.

@Intelligent2013 Intelligent2013 added the enhancement New feature or request label Nov 5, 2023
@Intelligent2013 Intelligent2013 self-assigned this Nov 5, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Nov 5, 2023
@ronaldtse
Copy link
Contributor

Is this an mn2pdf thing or a general Metanorma XML feature?

@Intelligent2013
Copy link
Contributor Author

Is this an mn2pdf thing or a general Metanorma XML feature?

@ronaldtse mn2pdf thing.

But I've found the Metanorma document attribute :data-uri-image: false (https://www.metanorma.org/author/ref/document-attributes/#visual-appearance) that allows to don't integrate the images inline in the XML. I this case the Presentation XML contains the images paths instead of base64 encoded images, like this:

<image src="images/figure-overview.png" ...

:data-uri-image: false should solve the initial issue [mn2pdf] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space.

:data-uri-image: affects on HTML output also:

Encode all images in HTML output as inline data-URIs.

@ronaldtse now I don't sure that I have to do it:

To do: in case of big XML (>50mb) extract images from the XML to the temporarily folder, so the XML will contains the file links only.

What do you think? :data-uri-image: false is enough to solve the issue, or should I 'extract images from XML into the temp folder` in any case?

@Intelligent2013 Intelligent2013 moved this from 🆕 New to 🏗 In progress in Metanorma Nov 11, 2023
Intelligent2013 added a commit that referenced this issue Aug 22, 2024
Intelligent2013 added a commit that referenced this issue Aug 22, 2024
Intelligent2013 added a commit that referenced this issue Aug 23, 2024
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Aug 23, 2024
Intelligent2013 added a commit that referenced this issue Aug 23, 2024
Intelligent2013 added a commit that referenced this issue Aug 23, 2024
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Aug 23, 2024
@Intelligent2013
Copy link
Contributor Author

mn2pdf updated. Now mn2pdf extracts the images from base64 to the temporarily folder on disk. I.e. base64 streams don't spent the memory in XSLT processing.

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Metanorma Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants