EPS Image Preview
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 2
- Joined: Fri Jan 13, 2023 4:07 am
EPS Image Preview
Post by Miles Jeong »
Hello all,
I've been using a CMS in Oxygen XML Editor through WebDAV connection.
In Author mode, eps images in ditas are shown as tiff preview,
but the quality and redering performance is poor.
I want to display eps files with jpeg renditions in the CMS.
I tried to return jpeg content for eps via WebDAV but it didn't work. ("cannot display image" message shows up)
How can I override the default tiff preview behaviour for eps images in Author mode?
I have to consider when local files are opened. It's not going to be simple.
Regards,
Miles
I've been using a CMS in Oxygen XML Editor through WebDAV connection.
In Author mode, eps images in ditas are shown as tiff preview,
but the quality and redering performance is poor.
I want to display eps files with jpeg renditions in the CMS.
I tried to return jpeg content for eps via WebDAV but it didn't work. ("cannot display image" message shows up)
How can I override the default tiff preview behaviour for eps images in Author mode?
I have to consider when local files are opened. It's not going to be simple.
Regards,
Miles
Re: EPS Image Preview
Hello Miles,
Please see some answers below:
One could add their own CSS customization, for example as a DITA XML framework extension if you are editing DITA XML:
https://blog.oxygenxml.com/topics/customizeDITACSS.html
and you can use CSS functions that Oxygen supports like oxy_replace:
https://www.oxygenxml.com/doc/versions/ ... ction.html
so you could actually instruct Oxygen to render a ".jpeg" URL instead of a ".tiff" URL and then handle the request of the JPEG url on the webdav server maybe.
Regards,
Radu
Please see some answers below:
Ok. What XML vocabulary are you using? Is it DITA XML, Docbook, or something else?I've been using a CMS in Oxygen XML Editor through WebDAV connection.
Yes.In Author mode, eps images in ditas are shown as tiff preview,
but the quality and redering performance is poor.
As the URL extension remains "EPS" probably Oxygen triggers the same EPS rendering technique which attempts to find the TIFF inside the EPS.I want to display eps files with jpeg renditions in the CMS.
I tried to return jpeg content for eps via WebDAV but it didn't work. ("cannot display image" message shows up)
The Author visual editing mode is CSS based, for example for DITA XML files the CSS selector which sets up the image rendering looks like this:How can I override the default tiff preview behaviour for eps images in Author mode?
Code: Select all
*[class~="topic/image"] {
content: attr(href, url);
}
https://blog.oxygenxml.com/topics/customizeDITACSS.html
and you can use CSS functions that Oxygen supports like oxy_replace:
https://www.oxygenxml.com/doc/versions/ ... ction.html
so you could actually instruct Oxygen to render a ".jpeg" URL instead of a ".tiff" URL and then handle the request of the JPEG url on the webdav server maybe.
Here you would need to have some kind of pairs, for each TIFF file have also a JPEG file in a sibling folder or in the same folder and again use CSS to redirect the reference to the TIFF to load the JPEG instead...I have to consider when local files are opened. It's not going to be simple.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Fri Jan 13, 2023 4:07 am
Re: EPS Image Preview
Post by Miles Jeong »
Hello Radu,
Thank you for your help and it's really helpful.
Following "CSS Customization" instruction, I made a custom css and deployed like this.
*[class~="topic/image"][href$=".eps"]{
content: oxy_url(oxy_base-uri(), oxy_concat(attr(href, url), oxy_xpath("if (starts-with(base-uri(/), 'http://') or starts-with(base-uri(/), 'https://')) then '._rend_.jpg' else ''")));
}
this code adds '_rend_.jpg' suffix to the url if it ends with '.eps'. and then WebDAV returns jpg rendition content for the request.
It works great in Author view and I noticed this never works if the composite url ends with ".eps".
Thank you for your help and it's really helpful.
Following "CSS Customization" instruction, I made a custom css and deployed like this.
*[class~="topic/image"][href$=".eps"]{
content: oxy_url(oxy_base-uri(), oxy_concat(attr(href, url), oxy_xpath("if (starts-with(base-uri(/), 'http://') or starts-with(base-uri(/), 'https://')) then '._rend_.jpg' else ''")));
}
this code adds '_rend_.jpg' suffix to the url if it ends with '.eps'. and then WebDAV returns jpg rendition content for the request.
It works great in Author view and I noticed this never works if the composite url ends with ".eps".
Last edited by Miles Jeong on Wed Nov 13, 2024 7:38 am, edited 1 time in total.
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service