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: 7
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: 24,071
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: 7
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: 24,071
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: 7
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: 24,071
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!
Dap
Posted: Thursday, October 28, 2021 3:53:02 AM
Rank: Newbie
Groups: Member

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

Do you have any input about the next release date?

Thanks
eo_support
Posted: Thursday, October 28, 2021 2:34:27 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

We have already fixed this issue internally. The new build should be out in the first half of next month.

Thanks!
eo_support
Posted: Friday, November 12, 2021 10:07:25 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

This is just to let you know that we have posted a new build that should resolve this issue. Please download the new build from our download page and let us know how it goes.

Thanks!
Dap
Posted: Friday, November 26, 2021 10:41:02 AM
Rank: Newbie
Groups: Member

Joined: 9/22/2016
Posts: 7
Great! thank you for your support on this point !
eo_support
Posted: Sunday, November 28, 2021 9:48:35 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
You are very welcome. Please feel free to let us know if there is anything else.


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.