Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

ConvertUrl : ShadowDOM with page-break-inside Options
Dap
Posted: Wednesday, October 13, 2021 4:23:29 AM
Rank: Newbie
Groups: Member

Joined: 9/22/2016
Posts: 3
Hi,

We use EOWP ConvertUrl (21.2.31.0) on pages with ShadowRoot embedding multiple div with CSS style "page-break-inside:avoid" but the output PDF do not avoid page breaks inside the div.
If we print the page with Chrome, the div aren't breaked.
A simple test can be setup with the following HTML/JS :
Code: HTML/ASPX
<!DOCTYPE html>
<html>

  <head>
	<script>
	function init(){
		var container = document.getElementById("container");
		var root = container.attachShadow( { mode: "open" } )
		
		var style = document.createElement("style");
		style.textContent = ".unbreakable { display:block; border: 1px solid black;background-color: pink;height:300px;page-break-inside:avoid }"
		root.appendChild(style);
		
		for(var i = 0; i < 10; i++) {
				var unbreakableDiv = document.createElement( "div" )
				unbreakableDiv.textContent = "Element number " + i
				unbreakableDiv.classList.add("unbreakable")
				root.appendChild( unbreakableDiv )
		}
	}

	</script>

  </head>

  <body onLoad="init()">
    <div id="container">
	</div>
  </body>

</html>


Do you have any solution to make it work with ConvertUrl?

Thanks
eo_support
Posted: Wednesday, October 13, 2021 2:39:06 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,072
Hi,

The paging process does not support shadow tree. Is it possible for you to insert the elements in the real tree but inside an absolute positioned root DIV? That way they will not affect your main content layout but the page instruction should still be honored since they are part of the "real" DOM tree.

Thanks!
Dap
Posted: Wednesday, October 13, 2021 3:16:47 PM
Rank: Newbie
Groups: Member

Joined: 9/22/2016
Posts: 3
Hi,

We do need shadow trees to encapsulate user defined HTLM with both JS and CSS. Our users may create large reports with a lot of elements within an HTML layout.
We then need to preview the reports (without any interference to our app) and to print them.
Do you plan to add shadowRoot support in the near future?

Thanks
eo_support
Posted: Thursday, October 14, 2021 9:14:54 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,072
Hi,

Yes. We have looked into this and we can support shadow trees in our next build. We will reply here again when the new build is out.

Thanks!
Dap
Posted: Thursday, October 14, 2021 9:58:20 AM
Rank: Newbie
Groups: Member

Joined: 9/22/2016
Posts: 3
Great news!
Could you give us an estimated date (or week) for the next build?

Thank you very much
eo_support
Posted: Thursday, October 14, 2021 10:27:59 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,072
Hi,

We usually post a new update every month. Since we have just posted a new build this week. So the next one should be at early next month.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.