You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
To get around the fact that it does not seem possible at the moment to generate a multi-lingual pdf from the search page (either labels or metadata) I have been trying to get the formatter approach to work as mentioned in web/src/main/webapp/xslt/services/pdf/portal-present-fop.xsl. I have a working formatter that generates results correctly when called from a browser using (eg) http://localhost/geonetwork/api/records/UUID/formatters/myformatter?language=wel&output=pdf but I am struggling to get this to work as the src in
I have tried simply assigning the URL to src, and building it using concat statements but nothing makes any difference. When I print out the value of src as an xsl:message it is correct, and the code generates a pdf, but it is blank. I have tried debugging this in debug mode and in the web console in my browser but I can't see any errors. My record is public so there should be no authentication problems.
Describe the bug
To get around the fact that it does not seem possible at the moment to generate a multi-lingual pdf from the search page (either labels or metadata) I have been trying to get the formatter approach to work as mentioned in web/src/main/webapp/xslt/services/pdf/portal-present-fop.xsl. I have a working formatter that generates results correctly when called from a browser using (eg)
http://localhost/geonetwork/api/records/UUID/formatters/myformatter?language=wel&output=pdf
but I am struggling to get this to work as thesrc
inI have tried simply assigning the URL to
src
, and building it usingconcat
statements but nothing makes any difference. When I print out the value ofsrc
as anxsl:message
it is correct, and the code generates a pdf, but it is blank. I have tried debugging this in debug mode and in the web console in my browser but I can't see any errors. My record is public so there should be no authentication problems.Additional context
Related issues, to do with generating multi-lingual pdfs from the search page include #6630 but that just refers to the language of the labels.
I have also tried to get around these problems by reverting to the traditional non-formatter approach in https://github.com/geonetwork/core-geonetwork/blob/4.2.x/web/src/main/webapp/xslt/services/pdf/portal-present-fop.xsl and adapting https://github.com/geonetwork/core-geonetwork/blob/4.2.x/web/src/main/webapp/xslt/services/pdf/metadata-fop.xsl. I can hard-code the labels to a certain extent but I'm stuck with the fact that elements like
resourceAbstractObject
only include the default value from the index and not the translations.Any help with either approach would be much appreciated!
The text was updated successfully, but these errors were encountered: