No xml tags are displaying in print
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 68
- Joined: Mon Jul 04, 2022 8:42 am
No xml tags are displaying in print
Hi team,
We have print action in web author.
Below is the image for reference.
Please let us know what needs to be done to get tags , attributes and css
We have print action in web author.
image.png
when we click on print action, tags, attributes and few css are not adding to the print document.Below is the image for reference.
Please let us know what needs to be done to get tags , attributes and css
image.png
You do not have the required permissions to view the files attached to this post.
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: No xml tags are displaying in print
Hello,
Please give us more details about what you need to appear in the printed output.
Also, you can try the Web Author PDF Plugin, maybe the output is closer than what you expect.
Best Regards,
Mihaela
Please give us more details about what you need to appear in the printed output.
Also, you can try the Web Author PDF Plugin, maybe the output is closer than what you expect.
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 68
- Joined: Mon Jul 04, 2022 8:42 am
Re: No xml tags are displaying in print
Thanks Mihaela for the response.
Actually when we click print , the pdf should include all the tags with attributes and also the css styles need to be added. Please find the below screenshot for the reference
Actually when we click print , the pdf should include all the tags with attributes and also the css styles need to be added. Please find the below screenshot for the reference
image.png
I have uploaded the plugin which you mentioned, after that i am getting below error when i click on printimage.png
You do not have the required permissions to view the files attached to this post.
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: No xml tags are displaying in print
Post by cristi_talau »
Now I understand that you want to have the element tag markers (that display the element tag name and its attributes) visible when you print the current document.
To make the tag markers visible you can add the following rule to your CSS used to customize the Web Author UI (not the CSS in the framework)
The PDF Plugin does not have an option to display the tag markers. However, if you want to troubleshoot the error you are getting, it would help to look in the server logs for a stack trace.
Best,
Cristian
To make the tag markers visible you can add the following rule to your CSS used to customize the Web Author UI (not the CSS in the framework)
Code: Select all
@media print {
.tag-full.tag-full {
display: inline !important;
}
}
Best,
Cristian
-
- Posts: 68
- Joined: Mon Jul 04, 2022 8:42 am
Re: No xml tags are displaying in print
Hi Chtistian,
Thanks for the response.
After applying the css now i am getting tag and attributes like below. But i need the same way like how it display in UI
Thanks for the response.
After applying the css now i am getting tag and attributes like below. But i need the same way like how it display in UI
image.png
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 172
- Joined: Tue Mar 20, 2018 5:28 pm
Re: No xml tags are displaying in print
Post by Bogdan Dumitru »
Hello,
To overcome this, specify the "-webkit-print-color-adjust:exact;" CSS property.
So the complete CSS would be:
To overcome this, specify the "-webkit-print-color-adjust:exact;" CSS property.
So the complete CSS would be:
Code: Select all
@media print {
.tag-full.tag-full {
display: inline !important;
-webkit-print-color-adjust:exact;
}
}
Bogdan Dumitru
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 68
- Joined: Mon Jul 04, 2022 8:42 am
Re: No xml tags are displaying in print
Hi Team,
Print is not working if we add below code in plugin.js file and getting below script error when we click Print icon in web author.
workspace.getViewManager().uninstallView('review-panel-list');
workspace-99b461af0a.js:1905 TypeError: Cannot read properties of null (reading 'cloneNode')
at Fa.addReviewItems (workspace-99b461af0a.js
189743)
at Fa.actionPerformed (workspace-99b461af0a.js
190482)
at o.actionPerformed (workspace-99b461af0a.js
124014)
at fi.executeAction (workspace-99b461af0a.js
125977)
at F.executeAction_ (workspace-99b461af0a.js
177333)
at F.scheduleImmediately_ (workspace-99b461af0a.js
176044)
at F.schedule (workspace-99b461af0a.js
175848)
at bl.executeAction (workspace-99b461af0a.js
99614)
at ft.performActionInternal (workspace-99b461af0a.js
16310)
at goog.ui.Control.handleMouseUp (workspace-99b461af0a.js
167)
Please let us know any other method to hide or remove the review panel view from web author.
Thanks & Regards
Shilpa.P
Print is not working if we add below code in plugin.js file and getting below script error when we click Print icon in web author.
workspace.getViewManager().uninstallView('review-panel-list');
workspace-99b461af0a.js:1905 TypeError: Cannot read properties of null (reading 'cloneNode')
at Fa.addReviewItems (workspace-99b461af0a.js
at Fa.actionPerformed (workspace-99b461af0a.js
at o.actionPerformed (workspace-99b461af0a.js
at fi.executeAction (workspace-99b461af0a.js
at F.executeAction_ (workspace-99b461af0a.js
at F.scheduleImmediately_ (workspace-99b461af0a.js
at F.schedule (workspace-99b461af0a.js
at bl.executeAction (workspace-99b461af0a.js
at ft.performActionInternal (workspace-99b461af0a.js
at goog.ui.Control.handleMouseUp (workspace-99b461af0a.js
Please let us know any other method to hide or remove the review panel view from web author.
Thanks & Regards
Shilpa.P
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: No xml tags are displaying in print
Post by cristi_talau »
Hello,
Thanks for reporting this issue. It will be fixed in Web Author version 25.1 which is planned to be released soon.
As a temporary workaround you can create an HTML element with the ID: "review-panel-list" as in the code snippet below:
Best,
Cristian
Thanks for reporting this issue. It will be fixed in Web Author version 25.1 which is planned to be released soon.
As a temporary workaround you can create an HTML element with the ID: "review-panel-list" as in the code snippet below:
Code: Select all
var div = document.createElement('div');
div.id = 'review-panel-list'
document.body.append(div)
Cristian
-
- Posts: 68
- Joined: Mon Jul 04, 2022 8:42 am
Re: No xml tags are displaying in print
Thanks Cristian, It's working now.
When we print, the font color is rendering but background color is not rendering.
Please find the below images.
Below image from the web author where both font and background colors are present.
@media print {
.tag-full.tag-full {
display: inline !important;
-webkit-print-color-adjust:exact;
}
}
please let us know the css to display of background color in print..
Regards
Shilpa.P
When we print, the font color is rendering but background color is not rendering.
Please find the below images.
Below image from the web author where both font and background colors are present.
image.png
Below image from the print where only font color has rendered where as background color is not.image.png
and the css which we used is below@media print {
.tag-full.tag-full {
display: inline !important;
-webkit-print-color-adjust:exact;
}
}
please let us know the css to display of background color in print..
Regards
Shilpa.P
You do not have the required permissions to view the files attached to this post.
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: No xml tags are displaying in print
Post by cristi_talau »
Hello,
You can try to use the "-webkit-print-color-adjust:exact;" property on all elements:
Best,
Cristian
You can try to use the "-webkit-print-color-adjust:exact;" property on all elements:
Code: Select all
* {
-webkit-print-color-adjust:exact !important;
}
Cristian
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: No xml tags are displaying in print
Post by julien_lacour »
Hello,
If you want to display the XML tags, you can add the following rules in your CSS stylesheet(s):
This example works for DITA documents transformed using the DITA Map PDF - based on HTML5 & CSS scenario.
You can use similar rules for Docbook or basic XML files, just remember to exclude tables and rows from the selector, the transformation will fail otherwise. For example you will obtain selectors like *:not(table):not(row)::before(1000) for Docbook.
If you were talking about PDF accessibility tags, you can read the following topics:
Julien
If you want to display the XML tags, you can add the following rules in your CSS stylesheet(s):
Code: Select all
*:not([class ~= "topic/table"]):not([class ~= "topic/row"])::before(1000) {
display: inline;
content: "<" oxy_name() ">";
}
*:not([class ~= "topic/table"]):not([class ~= "topic/row"])::after(1000) {
display: inline;
content: "</" oxy_name() ">";
}
You can use similar rules for Docbook or basic XML files, just remember to exclude tables and rows from the selector, the transformation will fail otherwise. For example you will obtain selectors like *:not(table):not(row)::before(1000) for Docbook.
If you were talking about PDF accessibility tags, you can read the following topics:
- https://helpx.adobe.com/acrobat/using/c ... -pdfs.html
- https://www.oxygenxml.com/doc/versions/ ... essibility
- https://www.oxygenxml.com/doc/versions/ ... _documents
Julien
-
- Posts: 33
- Joined: Thu Jun 09, 2022 2:49 pm
Re: No xml tags are displaying in print
Thanks Julien, works perfectly. Yes we are using DITA Map PDF - based on HTML5 & CSS scenario.
Is it also possible to show the value of an attribute in the generated pdf, the id attribute in our case?
Br, Mikael
Is it also possible to show the value of an attribute in the generated pdf, the id attribute in our case?
Br, Mikael
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: No xml tags are displaying in print
Post by julien_lacour »
Hello,
Sure you can, besides the rule I gave you previously you can add the following one:
Regards,
Julien
Sure you can, besides the rule I gave you previously you can add the following one:
Code: Select all
*:not([class ~= "topic/table"]):not([class ~= "topic/row"])[oid]::before(1000) {
display: inline;
content: "<" oxy_name() " id=\"" attr(oid) "\">";
}
Julien
-
- Posts: 33
- Joined: Thu Jun 09, 2022 2:49 pm
Re: No xml tags are displaying in print
That works nicely on topics, but not on other elements, a note for example.
I also tried the second code set without the first one, with the same result: it shows the id:s for topics.
/Mikael
I also tried the second code set without the first one, with the same result: it shows the id:s for topics.
/Mikael
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: No xml tags are displaying in print
Post by julien_lacour »
Hello Mikael,
You're right, for all elements having an ID in the DITA source you need to replace the previous rule by this one:
Regards,
Julien
You're right, for all elements having an ID in the DITA source you need to replace the previous rule by this one:
Code: Select all
@namespace nd url('http://www.oxygenxml.com/css2fo/named-destinations');
*:not([class ~= "topic/table"]):not([class ~= "topic/row"])[nd|nd-id]::before(1000) {
display: inline;
content: "<" oxy_name() " id=\"" attr(nd|nd-id) "\">";
}
Julien
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: No xml tags are displaying in print
Post by julien_lacour »
Hello Mikael,
I don't think so, as detailed in the specification:
Regards,
Julien
I don't think so, as detailed in the specification:
So you need the rule to be at the beginning of your stylesheet.Any @namespace rules must follow all @charset and @import rules and precede all other non-ignored at-rules and style rules in a style sheet.
Regards,
Julien
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