No xml tags are displaying in print

Having trouble installing Oxygen? Got a bug to report? Post it all here.
shilpa
Posts: 66
Joined: Mon Jul 04, 2022 8:42 am

No xml tags are displaying in print

Post by shilpa »

Hi team,

We have print action in web author.
image.png
image.png (16.23 KiB) Viewed 1299 times
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
image.png (167.26 KiB) Viewed 1299 times
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: No xml tags are displaying in print

Post by mihaela »

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
Mihaela Calotescu
http://www.oxygenxml.com
shilpa
Posts: 66
Joined: Mon Jul 04, 2022 8:42 am

Re: No xml tags are displaying in print

Post by shilpa »

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
image.png
image.png (98.26 KiB) Viewed 1291 times
I have uploaded the plugin which you mentioned, after that i am getting below error when i click on print

image.png
image.png (29.84 KiB) Viewed 1291 times
cristi_talau
Posts: 496
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)

Code: Select all

@media print {
  .tag-full.tag-full {
    display: inline !important;
  }
}
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
shilpa
Posts: 66
Joined: Mon Jul 04, 2022 8:42 am

Re: No xml tags are displaying in print

Post by shilpa »

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
image.png
image.png (160.6 KiB) Viewed 1280 times
Bogdan Dumitru
Site Admin
Posts: 142
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:

Code: Select all

@media print {
  .tag-full.tag-full {
    display: inline !important;
    -webkit-print-color-adjust:exact;
  }
}
Bogdan Dumitru
http://www.oxygenxml.com
shilpa
Posts: 66
Joined: Mon Jul 04, 2022 8:42 am

Re: No xml tags are displaying in print

Post by shilpa »

Hi Dumitru,
Its working.. Thank you so much..
shilpa
Posts: 66
Joined: Mon Jul 04, 2022 8:42 am

Re: No xml tags are displaying in print

Post by shilpa »

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:1967:189743)
at Fa.actionPerformed (workspace-99b461af0a.js:1967:190482)
at o.actionPerformed (workspace-99b461af0a.js:1905:124014)
at fi.executeAction (workspace-99b461af0a.js:1905:125977)
at F.executeAction_ (workspace-99b461af0a.js:1928:177333)
at F.scheduleImmediately_ (workspace-99b461af0a.js:1928:176044)
at F.schedule (workspace-99b461af0a.js:1928:175848)
at bl.executeAction (workspace-99b461af0a.js:1929:99614)
at ft.performActionInternal (workspace-99b461af0a.js:1906:16310)
at goog.ui.Control.handleMouseUp (workspace-99b461af0a.js:1228:167)


Please let us know any other method to hide or remove the review panel view from web author.

Thanks & Regards
Shilpa.P
cristi_talau
Posts: 496
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:

Code: Select all

var div = document.createElement('div');
div.id = 'review-panel-list'
document.body.append(div)
Best,
Cristian
shilpa
Posts: 66
Joined: Mon Jul 04, 2022 8:42 am

Re: No xml tags are displaying in print

Post by shilpa »

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.
image.png
image.png (59.98 KiB) Viewed 990 times
Below image from the print where only font color has rendered where as background color is not.
image.png
image.png (51.31 KiB) Viewed 990 times
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
cristi_talau
Posts: 496
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:

Code: Select all

* {
  -webkit-print-color-adjust:exact !important;
}
Best,
Cristian
shilpa
Posts: 66
Joined: Mon Jul 04, 2022 8:42 am

Re: No xml tags are displaying in print

Post by shilpa »

Thank you Cristian..
It's working.
Post Reply