OutOfMemoryError in xhtmlrenderer.layout() with Deeply Nested XHTML

56 views
Skip to first unread message

Jeffery Xie

unread,
Feb 24, 2025, 5:54:40 PMFeb 24
to Flying Saucer Users

Hi all,

I’m new to xhtmlrenderer and currently using it to convert XHTML to PDF. However, we encountered an issue where xhtmlrenderer.layout() throws an OutOfMemoryError when processing XHTML with deeply nested tags. Below is an example where the document consists solely of nested <ul><li> elements.

It seems that layout() does not support streaming, which might be causing excessive memory usage. I’m wondering if there are any recommended approaches to handle this issue or potential workarounds.

Any help or insights would be greatly appreciated. Thanks in advance!


Library Versions
  • org.xhtmlrenderer:flying-saucer-pdf:9.4.0
  • com.github.librepdf:openpdf:1.3.43


Exception

[java.lang.OutOfMemoryError: Java heap space]
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.Arrays.copyOf(Arrays.java:3481)
at java.base/java.util.ArrayList.grow(ArrayList.java:237)
at java.base/java.util.ArrayList.grow(ArrayList.java:244)
at java.base/java.util.ArrayList.add(ArrayList.java:454)
at java.base/java.util.ArrayList.add(ArrayList.java:467)
at org.xhtmlrenderer.css.newmatch.Matcher$Mapper.mapChild(Matcher.java:324)
at org.xhtmlrenderer.css.newmatch.Matcher.matchElement(Matcher.java:146)
at org.xhtmlrenderer.css.newmatch.Matcher.getMapper(Matcher.java:203)
at org.xhtmlrenderer.css.newmatch.Matcher.getCascadedStyle(Matcher.java:89)
at org.xhtmlrenderer.context.StyleReference.getCascadedStyle(StyleReference.java:172)
at org.xhtmlrenderer.layout.SharedContext.getStyle(SharedContext.java:481)
at org.xhtmlrenderer.layout.SharedContext.getStyle(SharedContext.java:458)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:1083)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:119)
at org.xhtmlrenderer.render.BlockBox.ensureChildren(BlockBox.java:961)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:1170)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:119)
at org.xhtmlrenderer.render.BlockBox.ensureChildren(BlockBox.java:961)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:1170)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:119)
at org.xhtmlrenderer.render.BlockBox.ensureChildren(BlockBox.java:961)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:1170)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:119)
at org.xhtmlrenderer.render.BlockBox.ensureChildren(BlockBox.java:961)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:1170)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:119)
at org.xhtmlrenderer.render.BlockBox.ensureChildren(BlockBox.java:961)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:1170)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:119)
at org.xhtmlrenderer.render.BlockBox.ensureChildren(BlockBox.java:961)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:1170)
at org.xhtmlrenderer.layout.BoxBuilder.createChildren(BoxBuilder.java:119)



Xhtml Example

<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li style="list-style-type: none;">
<ul>
<li>Test Page</li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul>



Andrei Solntsev

unread,
Feb 25, 2025, 3:49:03 AMFeb 25
to flying-sa...@googlegroups.com
Sorry, but I cannot reproduce the problem.
I've tried your HTML, and the pdf gets quickly generated without any problems.

Please try the latest version "org.xhtmlrenderer:flying-saucer-pdf:9.11.4".

Andrei Solntsev


--
You received this message because you are subscribed to the Google Groups "Flying Saucer Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flying-saucer-u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/flying-saucer-users/94d78303-fdd9-420a-9ad2-8787fd90a95cn%40googlegroups.com.

Peter Brant

unread,
Feb 25, 2025, 8:57:47 AMFeb 25
to flying-sa...@googlegroups.com
FS builds both the CSS style tree and the CSS box tree in memory. It is endemic to its design and there is no way around this. That said, it's reasonably memory efficient and folks routinely generate some pretty large documents with it.

Barring a really weird bug, I can't see that document using a significant amount of memory. What's your heap size?

Saba Taseer

unread,
Mar 19, 2025, 3:43:45 AMMar 19
to Flying Saucer Users
Hi,
Taking over from Jeffery here, this HTML is unique in the sense that with 5GB memory and 240s timeout, it times out, anything less than that memory simply throws an OOM exception. 

Another interesting observation is that following html processes at 3GB memory without any issues but the generated pdf only has the list till alphabet p. I tried the same test on nested tables, but this doesn't seem to effect them, I could generate pdf with 20 nested tables on the page.

<ul><li data-uuid="6e26be8e-7bc9-44c9-a8c6-b946a39d7be8">a<ul><li data-uuid="b1227af3-1d44-4141-8827-eb5124a4ebaf">b<ul><li data-uuid="c10ce451-7d4e-4940-8fc7-e73e637d94be">c<ul><li data-uuid="ad4e8d62-bc7f-46eb-baa3-abbce4cdaae8">d<ul><li data-uuid="55364017-dac7-4564-aa07-b0c028e251fc">e<ul><li data-uuid="0ce799ac-e1fe-42bb-ae83-f9056ed80072">f<ul><li data-uuid="2d88ec20-d626-4d32-8b9d-15257e64336a">g<ul><li data-uuid="83dadcd8-8198-4e1c-aa10-ec06d7878bb3">h<ul><li data-uuid="e0b39524-b6d6-4716-970a-d08d0436c937">i<ul><li data-uuid="45c28d10-50b5-4fef-b2c1-821a058db6bb">j<ul><li data-uuid="b9574bf5-05f4-4c4f-b746-be3751ae04f1">k<ul><li data-uuid="13b9e998-dad9-423b-b8a0-2db9f4e5de52">l<ul><li data-uuid="e4350a71-d4aa-4044-aee9-d391fa000291">m<ul><li data-uuid="dae80041-81e8-4be1-be21-a1669dfed369">n<ul><li data-uuid="8511f0c0-ac79-4b1f-92e3-51d0647c6797">o<ul><li data-uuid="49de9333-b60b-426c-baef-dfde4f543b90">p<ul><li data-uuid="f73a8297-a8f9-4425-822c-bcba2b66737c">q<ul><li data-uuid="275cec1d-bd6e-4bdf-8689-83287e4b5d84">R<ul><li data-uuid="a38e8411-a19f-470a-b4ac-32d1312a26d3">s<ul><li data-uuid="d14face0-13de-4579-bf1a-1d26b53b3d21">t<ul><li data-uuid="f042aaf5-4a80-4561-8033-1beb9ab55776">u<ul><li data-uuid="3c8d2178-8f95-41cd-8e72-9cb679ff208b">v<ul><li data-uuid="aad2058f-4bce-43da-b33b-24d6b1ce9816">w<ul><li data-uuid="aede1d64-5aeb-4f0b-b589-b45588a11063">x<ul><li data-uuid="84296128-e233-4362-9382-09067be5b94b">y<ul><li data-uuid="668a0869-c8b7-4d89-8b8b-090a3e5739b9">z</li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul>

I will have a look later to see if there are any changes in the more recent versions in flying saucer that could have improved things. 

Thanks,
Regards,
Saba

Andrei Solntsev

unread,
Mar 19, 2025, 3:52:43 AMMar 19
to flying-sa...@googlegroups.com
Hi Saba!
I still cannot reproduce the problem.
I've tried to generate PDF from your HTML, and it works well with just 32MB of memory  (-Xmx32M).

(and yes, 16MB is not enough - fails with OutOfMemory)

Could you please create a sample project which stably reproduces the issue?

Andrei Solntsev


Saba Taseer

unread,
Mar 20, 2025, 4:07:09 AMMar 20
to Flying Saucer Users
Can you try one more HTML before I try to setup a separate project for this, I was debugging to see where things are going out of hand when I realised that actually the style calculation slows things significantly as we move down the tree, I realised that we have not shared with you the styles in the head element, can you retry this this html plz.
The dynamic content is passed into the pdf generation so it seems we have all the styles here.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <!-- include all the required resources found while rendering individual pages e.g. from macros -->
                <style id="confluence.flyingpdf.styleId">
        @page
{
    size: letter;
    margin: 0.5in;
    padding: 1em;
    @top-left
    {
        content: element(header);
    }
    @bottom-left
    {
        content: element(footer);
    }
}

@page title
{
    margin: 0.5in;
    padding: 1em;

    @top-left
    {
    }
    @bottom-left
    {
    }
}

p {
    page-break-inside: avoid;
}

a
{
    color: #0052cc;
    text-decoration:none;
}

a .grey
{
    color: #666;
}

body
{
    margin: 0;
    padding: 0;
    font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
}

/* table view for several macros*/
.tableview td
{
    border-color:#CCCCCC;
    border-style:solid;
    border-width:0 0 1px;
    margin:0;
    padding:4px 10px 4px 5px;
    text-align:left;
}

/* built in gallery macro */
div.gallery > table
{
    display: table-cell;
}

div.gallery > table > tr
{
    display: inline;
}

div.gallery > table > tr > td
{
    display: inline;
}

div.gallery > table > tr > th
{
    display: inline;
}

div.gallery > table > tr:first-child
{
    display: block;
}

pre
{
    white-space: pre-wrap;
}

div.panelMacro
{
    page-break-inside: avoid;
}

/* wraps the section columns underneath each other so they don't run off the page */
table.sectionMacro
{
    display: block;
}

table.sectionMacro > tbody
{
    display: block;
}

table.sectionMacro > tbody > tr
{
    display: block;
}

table.sectionMacro > tbody > tr > td
{
    display: block;
}

table.sectionMacro > tbody > tr > td
{
    width: 98%
}

table.sectionMacroWithBorder
{
    display: block;
}

table.sectionMacroWithBorder>tbody
{
    display: block;
}

table.sectionMacroWithBorder > tbody > tr
{
    display: block;
}

table.sectionMacroWithBorder > tbody > tr > td
{
    display: block;
}

table.sectionMacroWithBorder > tbody > tr > td
{
   /* why 99 you ask? because the right border won't show in the export up if it's 100 */
    width: 99%
}

body.content-preview
{
    background-color: #fff;
    border: none;
}

body,li,table,.bodytext,.stepfield
{
    font-size: 10px;
    color: #000;
    font-weight: normal;
    word-wrap: break-word;
}

table tr td ul
{
    margin-left: -30px;
}

table li,table p
{
    font-size: inherit;
}

.print-only
{
    display: none;
}

.monospaceInput
{
    font: 10pt monospace;
}

pre
{
    padding: 0;
    margin: 10px 0;
    text-align: left;
    overflow: auto;
}

hr
{
    border: none;
    border-bottom: 1px solid #ccc;
}

h1 a:link,h1 a:visited,h1 a:active
{
    text-decoration: none;
}

h1,h2,h3,h4,h5,h6
{
    font-weight: normal;
}

h1.title-header
{
    font-size: 24px;
    font-weight: bold;
}

h1
{
    font-size: 20px;
    margin: 24px 0 0 0;
}

h2
{
    font-size: 16px;
    margin: 20px 0 0 0;
}

h3
{
    font-size: 14px;
    font-weight: bold;
    margin: 16px 0 0 0;
}

h4
{
    font-size: 12px;
    font-weight: 600;
    margin: 14px 0 0 0;
}

h5
{
    color: #5E6C84;
    font-size: 12px;
    margin: 14px 0 0 0;
}

h6
{
    color: #5E6C84;
    font-size: 10px;
    margin: 12px 0 0 0;
}

.grid
{
    margin: 2px 0 5px 0;
    border-collapse: collapse;
}

.grid th
{
    border: 1px solid #ccc;
    padding: 2px 4px 2px 4px;
    background: #f0f0f0;
    text-align: center;
}

.grid td
{
    border: 1px solid #ccc;
    padding: 3px 4px 3px 4px;
}

.gridHover
{
    background-color: #f9f9f9;
}

td.infocell
{
    background-color: #f0f0f0;
}

/* block quote */
blockquote {
    font-style: italic;
    border-left: 1px solid #dfe1e6;
    color: #7a869a;
    margin-left: 19px;
    padding: 10px 20px;
}
blockquote em
{
    font-style: normal;
}
blockquote > cite {
    display: block;
    margin-top: 10px;
}
q {
    color: #7a869a;
}
q:before {
    content: open-quote;
}
q:after {
    content: close-quote;
}
abbr {
    border-bottom: 1px #7a869a dotted;
    cursor: help;
}

table.admin
{
    margin: 5px;
    border-collapse: collapse;
    width: 100%;
}

table.admin td,table.admin th
{
    width: 50%;
    border: 1px solid #ccc;
    padding: 5px;
    vertical-align: top;
}

table.admin th
{
    background-color: #f0f0f0;
    text-align: right;
    font-weight: bold;
}

table.admin td.controls
{
    text-align: center;
}

small
{
    color: #7a869a;
    font-size: 8px;
    line-height: 1.33333333;
}

div.small
{
    font-size: 9px;
}

div.titlepage,div.toc
{
    page:title;
}

.pagetitle
{
    page-break-before: always;
}

.pagename
{
    margin-top: 0;
}

span.toclead:before
{
    content: leader(dotted);
}

span.tocnum:before
{
    content: target-counter(attr(href), page, decimal );
}

div.toc
{
    padding-right: 4em;
    page-break-after: always;
    counter-reset: chapter 0;
}

div.toc a
{
    text-decoration: none;
    color: black;
}

div.toclvl0:before
{
    content:  counter(chapter) ". ";
    counter-increment: chapter;  /* Add 1 to chapter */
}

div.toclvl0
{
    padding-left: 20px;
    counter-reset: section 0;      /* Set section to 0 */
}

div.toclvl1:before
{
    content:  counter(chapter) "." counter(section) " ";
    counter-increment:section;
}

div.toclvl1
{
    padding-left: 40px;
    counter-reset: subsection 0;
}

div.toclvl2:before
{
    content:  counter(chapter) "." counter(section) "." counter(subsection) " ";
    counter-increment:subsection;
}

div.toclvl2
{
    padding-left: 60px;
    counter-reset: subsubsection 0;
}

div.toclvl3:before
{
    content:  counter(chapter) "." counter(section) "." counter(subsection) "." counter(subsubsection)  " ";
    counter-increment:subsubsection;
}

div.toclvl3
{
    padding-left: 80px;
    counter-reset: subsubsubsection 0;
}

div.toclvl4:before
{
    content:  counter(chapter) "." counter(section) "." counter(subsection) "." counter(subsubsection)  "." counter(subsubsubsection) " ";
    counter-increment:subsubsubsection;
}

div.toclvl4
{
    padding-left: 100px;
}

/* hide any toc items beyond lvl 4 */
div.toclvl5, div.toclvl6, div.toclvl7,div.toclvl8,div.toclvl9,div.toclvl10,div.toclvl11,div.toclvl12
{
    display:none;
}

span.pageName:before
{
    content: counter(page);
}

/* title area of tables for certain bundled macros (favpages)*/
.tabletitle, .heading-text-color
{
    color:#003366;
}

.tabletitle, .pageSectionHeader
{
    border-bottom-color:#6699CC;
}

.tabletitle
{
    border-bottom-style:solid;
    border-bottom-width:2px;
    font-weight:bold;
    margin:8px 4px 2px 0;
    padding:3px 0 2px;
}

/* tabs */
.tabnav, .comment .tabnav, ul.tabnav
{
    border-bottom-color:#6699CC;
}
.tabnav, .comment .tabnav
{
    border-bottom-style:solid;
    border-bottom-width:1px;
    display:inline;
    float:left;
    font-weight:bold;
    list-style-position:outside;
    margin:0;
    padding:0;
    width:100%;
}
.tabnav .tabs a:hover
{
    background:#003366 none repeat scroll 0 0;
    border-color:#003366;
    color:#FFFFFF;
}
.tabnav .tabs a:link, .tabnav .tabs a:visited
{
    color:#FFFFFF;
}
.tabnav .tabs a
{
    border-bottom:medium none;
    border-style:solid solid none;
    border-width:1px 1px medium;
    display:block;
    float:left;
    margin:5px 3px 0 0;
    padding:5px 5px 4px;
    text-decoration:none;
}
.tabnav .tabs a
{
    background:#6699CC none repeat scroll 0 0;
    border-color:#6699CC;
}
.tabnav .tabs a.current
{
    background:white none repeat scroll 0 0;
    border-bottom:1px solid white;
    color:black;
}
.tabnav li.tabs
{
    display:block;
    float:left;
    list-style-image:none;
    list-style-position:outside;
    list-style-type:none;
    margin:0 0 -1px 10px;
}

/* space list macro */
tr.spaceList td
{
    border-bottom:1px solid #CCCCCC;
    padding:5px 0 5px 5px;
    vertical-align:top;
}
#spacesLabel
{
    float:left;
    margin-top:5px;
    padding:4px 6px;
}

/*
built in macro: popular-labels style = heatmap
*/
.heatmap
{
    list-style-image:none;
    list-style-position:outside;
    list-style-type:none;
    margin:0 auto;
    width:95%;
}

.heatmap li
{
    display:inline;
}

.heatmap a
{
    text-decoration:none;
}

/*
built in macros: panel, code, info, note, warning, noformat, tip
*/
.noteMacro
{
    background-color:#FFFFCE;
}

.panelMacro
{
    margin:10px 20px;
    overflow:hidden;
}

.panelMacro table
{
    text-align:left;
    width:100%;
    padding:0 20px;
}

.panelMacro td
{
    font-size: 10px;
    padding: 14px 7px;
}

.panel
{
    border: 1px solid #dfe1e5;
    color:black;
    margin:10px 0;
    overflow:hidden;
    padding:0;
    page-break-inside: avoid;
    font-size: 10px;
    min-height: 20px;
}

.codeHeader, .panelHeader {
    background:#F0F0F0 none repeat scroll 0 0;
}

.panelHeader {
    padding: 6px;
    border-bottom: 1px solid #ddd;
    background-color: #f7f7f7;
    line-height:2;
}

.menuheading, .pageheader, .sectionbottom
{
    border-bottom-color:#6699CC;
}

.panelContent
{
    color:#000000;
    margin:0;
    padding:6px;
    text-align:left;
}

.code, .preformatted
{
    background-color:#FFFFFF;
    /*padding: 12px 10px;*/
}

.preformattedHeader, .codeContent, .preformattedContent
{
    background:#FFFFFF none repeat scroll 0 0;
}

.code pre, .preformatted pre
{
    font-family:"Courier New",Courier,monospace;
    line-height:1.3;
}

pre
{
    margin:10px 0;
    overflow:auto;
    padding:0;
    text-align:left;
    page-break-inside: avoid;
}

.code
{
    border: 1px solid #dfe1e5;
    overflow:auto;
    page-break-inside: avoid;
}

.code-object
{
    background-color:inherit;
    color:#910091;
}

.code-keyword
{
    background-color:inherit;
    color:#000091;
}

.code-tag
 {
    background-color:inherit;
    color:#000091;
}

.code-quote
{
    background-color:inherit;
    color:#009100;
}

.infoMacro
{
    background-color:#D8E4F1;
    page-break-inside: avoid;
}

.tipMacro
{
    background-color:#DDFFDD;
    page-break-inside: avoid;
}

.warningMacro
{
    background-color:#FFCCCC;
    page-break-inside: avoid;
}

.errorBox
 {
    background-color:#FFCCCC;
    border:1px solid #CC0000;
    margin:5px;
    padding:5px;
}

.status-macro
{
    min-width: 68px;
    padding-bottom: 4px;
}

.recently-updated ul {
    padding: 0;
    margin: 0;
    list-style-type: none !important;
}

/* Hiding elements that we don't want in PDF exports */
.aui-iconfont-page-default, .aui-iconfont-page-blogpost,
.content-by-label .aui-icon,
.view-space-details .aui-icon,
.expand-control,
.search-macro,
#pagetreesearch,
.recently-updated .more-link-container
{
    display: none;
}

/* tables */
table
{
    border-collapse: collapse;
    table-layout: auto;
    width: auto !important;
    clear: left;
}
table.sectionMacro td
{
    border:medium none;
}

table tr, table.lozenge {
    page-break-inside: avoid;
}

table th {
    word-wrap: normal;
}

.confluenceTable {
    margin-bottom: 10px;
}
.confluenceTh,
.confluenceTd {
    border: 1px solid #c1c7d0;
    padding: 7px 10px;
    vertical-align: top;
    text-align: left;
    min-width: 8px;
}
/* Lists in tables */
.confluenceTable ol,
.confluenceTable ul {
    margin-left: 0;
    padding-left: 22px;
}
/* all tables should have a top margin of 10px */
.confluenceTable,
.table-wrap {
    margin: 10px 0 0 0;
    overflow-x: auto;
}
/* an exception to above rule for tables that are first child */
.confluenceTable:first-child,
.table-wrap:first-child {
    margin-top: 0;
}

/* Legacy background colors */
table.confluenceTable th.confluenceTh,
table.confluenceTable th.confluenceTh > p,
table.confluenceTable td.confluenceTd.highlight,
table.confluenceTable td.confluenceTd.highlight > p,
table.confluenceTable th.confluenceTh.highlight-grey,
table.confluenceTable th.confluenceTh.highlight-grey > p,
table.confluenceTable td.confluenceTd.highlight-grey,
table.confluenceTable td.confluenceTd.highlight-grey > p {
    background-color: #f4f5f7;
}
table.confluenceTable th.confluenceTh.info,
table.confluenceTable th.confluenceTh.info > p,
table.confluenceTable td.confluenceTd.highlight.info,
table.confluenceTable td.confluenceTd.highlight.info > p,
table.confluenceTable th.confluenceTh.highlight-blue,
table.confluenceTable th.confluenceTh.highlight-blue > p,
table.confluenceTable td.confluenceTd.highlight-blue,
table.confluenceTable td.confluenceTd.highlight-blue > p {
    background-color: #deebff;
}
table.confluenceTable th.confluenceTh.success,
table.confluenceTable th.confluenceTh.success > p,
table.confluenceTable td.confluenceTd.highlight.success,
table.confluenceTable td.confluenceTd.highlight.success > p,
table.confluenceTable th.confluenceTh.highlight-green,
table.confluenceTable th.confluenceTh.highlight-green > p,
table.confluenceTable td.confluenceTd.highlight-green,
table.confluenceTable td.confluenceTd.highlight-green > p {
    background-color: #e3fcef;
}
table.confluenceTable th.confluenceTh.warning,
table.confluenceTable th.confluenceTh.warning > p,
table.confluenceTable td.confluenceTd.highlight.warning,
table.confluenceTable td.confluenceTd.highlight.warning > p,
table.confluenceTable th.confluenceTh.highlight-red,
table.confluenceTable th.confluenceTh.highlight-red > p,
table.confluenceTable td.confluenceTd.highlight-red,
table.confluenceTable td.confluenceTd.highlight-red > p {
    background-color: #ffebe5;
}
table.confluenceTable th.confluenceTh.note,
table.confluenceTable th.confluenceTh.note > p,
table.confluenceTable td.confluenceTd.highlight.note,
table.confluenceTable td.confluenceTd.highlight.note > p,
table.confluenceTable th.confluenceTh.highlight-yellow,
table.confluenceTable th.confluenceTh.highlight-yellow > p,
table.confluenceTable td.confluenceTd.highlight-yellow,
table.confluenceTable td.confluenceTd.highlight-yellow > p {
    background-color: #fffae5;
}
table.confluenceTable th.confluenceTh,
table.confluenceTable th.confluenceTh > p,
table.confluenceTable td.confluenceTd.highlight,
table.confluenceTable td.confluenceTd.highlight > p {
    font-weight: bold;
}
table.confluenceTable th.confluenceTh.nohighlight,
table.confluenceTable th.confluenceTh.nohighlight > p {
    font-weight: normal;
    background-color: transparent;
}
/* Legacy background colors end */

/* ADG3 colors */
table.confluenceTable th.confluenceTh.highlight-\#000000,
table.confluenceTable td.confluenceTd.highlight-\#000000 {
    background-color: #2C3E5D;
}
table.confluenceTable th.confluenceTh.highlight-\#172b4d,
table.confluenceTable td.confluenceTd.highlight-\#172b4d {
    background-color: #44546F;
}
table.confluenceTable th.confluenceTh.highlight-\#42526e,
table.confluenceTable td.confluenceTd.highlight-\#42526e {
    background-color: #626F86;
}
table.confluenceTable th.confluenceTh.highlight-\#7a869a,
table.confluenceTable td.confluenceTd.highlight-\#7a869a {
    background-color: #8590A2;
}
table.confluenceTable th.confluenceTh.highlight-\#c1c7d0,
table.confluenceTable td.confluenceTd.highlight-\#c1c7d0 {
    background-color: #B3B9C4;
}
table.confluenceTable th.confluenceTh.highlight-\#f4f5f7,
table.confluenceTable td.confluenceTd.highlight-\#f4f5f7 {
    background-color: #F1F2F4;
}
table.confluenceTable th.confluenceTh.highlight-\#091e42,
table.confluenceTable td.confluenceTd.highlight-\#091e42 {
    background-color: #FFFFFF;
}
table.confluenceTable th.confluenceTh.highlight-\#bf2600,
table.confluenceTable td.confluenceTd.highlight-\#bf2600 {
    background-color: #5D1F1A;
}
table.confluenceTable th.confluenceTh.highlight-\#de350b,
table.confluenceTable td.confluenceTd.highlight-\#de350b {
    background-color: #AE2E24;
}
table.confluenceTable th.confluenceTh.highlight-\#ff5630,
table.confluenceTable td.confluenceTd.highlight-\#ff5630 {
    background-color: #C9372C;
}
table.confluenceTable th.confluenceTh.highlight-\#ff7452,
table.confluenceTable td.confluenceTd.highlight-\#ff7452 {
    background-color: #E2483D;
}
table.confluenceTable th.confluenceTh.highlight-\#ff8f73,
table.confluenceTable td.confluenceTd.highlight-\#ff8f73 {
    background-color: #F87168;
}
table.confluenceTable th.confluenceTh.highlight-\#ffbdad,
table.confluenceTable td.confluenceTd.highlight-\#ffbdad {
    background-color: #FFD5D2;
}
table.confluenceTable th.confluenceTh.highlight-\#ffebe6,
table.confluenceTable td.confluenceTd.highlight-\#ffebe6 {
    background-color: #FFECEB;
}
table.confluenceTable th.confluenceTh.highlight-\#ff8b00,
table.confluenceTable td.confluenceTd.highlight-\#ff8b00 {
    background-color: #533F04;
}
table.confluenceTable th.confluenceTh.highlight-\#ff991f,
table.confluenceTable td.confluenceTd.highlight-\#ff991f {
    background-color: #7F5F01;
}
table.confluenceTable th.confluenceTh.highlight-\#ffab00,
table.confluenceTable td.confluenceTd.highlight-\#ffab00 {
    background-color: #946F00;
}
table.confluenceTable th.confluenceTh.highlight-\#ffc400,
table.confluenceTable td.confluenceTd.highlight-\#ffc400 {
    background-color: #B38600;
}
table.confluenceTable th.confluenceTh.highlight-\#ffe380,
table.confluenceTable td.confluenceTd.highlight-\#ffe380 {
    background-color: #E2B203;
}
table.confluenceTable th.confluenceTh.highlight-\#fff0b3,
table.confluenceTable td.confluenceTd.highlight-\#fff0b3 {
    background-color: #F8E6A0;
}
table.confluenceTable th.confluenceTh.highlight-\#fffae6,
table.confluenceTable td.confluenceTd.highlight-\#fffae6 {
    background-color: #FFF7D6;
}
table.confluenceTable th.confluenceTh.highlight-\#702e00,
table.confluenceTable td.confluenceTd.highlight-\#702e00 {
    background-color: #702E00;
}
table.confluenceTable th.confluenceTh.highlight-\#a54800,
table.confluenceTable td.confluenceTd.highlight-\#a54800 {
    background-color: #a54800;
}
table.confluenceTable th.confluenceTh.highlight-\#c25100,
table.confluenceTable td.confluenceTd.highlight-\#c25100 {
    background-color: #c25100;
}
table.confluenceTable th.confluenceTh.highlight-\#e56910,
table.confluenceTable td.confluenceTd.highlight-\#e56910 {
    background-color: #e56910;
}
table.confluenceTable th.confluenceTh.highlight-\#fea362,
table.confluenceTable td.confluenceTd.highlight-\#fea362 {
    background-color: #fea362;
}
table.confluenceTable th.confluenceTh.highlight-\#fedec8,
table.confluenceTable td.confluenceTd.highlight-\#fedec8 {
    background-color: #fedec8;
}
table.confluenceTable th.confluenceTh.highlight-\#fff3eb,
table.confluenceTable td.confluenceTd.highlight-\#fff3eb {
    background-color: #fff3eb;
}
table.confluenceTable th.confluenceTh.highlight-\#006644,
table.confluenceTable td.confluenceTd.highlight-\#006644 {
    background-color: #164B35;
}
table.confluenceTable th.confluenceTh.highlight-\#00875a,
table.confluenceTable td.confluenceTd.highlight-\#00875a {
    background-color: #216E4E;
}
table.confluenceTable th.confluenceTh.highlight-\#36b37e,
table.confluenceTable td.confluenceTd.highlight-\#36b37e {
    background-color: #1F845A;
}
table.confluenceTable th.confluenceTh.highlight-\#57d9a3,
table.confluenceTable td.confluenceTd.highlight-\#57d9a3 {
    background-color: #22A06B;
}
table.confluenceTable th.confluenceTh.highlight-\#79f2c0,
table.confluenceTable td.confluenceTd.highlight-\#79f2c0 {
    background-color: #4BCE97;
}
table.confluenceTable th.confluenceTh.highlight-\#abf5d1,
table.confluenceTable td.confluenceTd.highlight-\#abf5d1 {
    background-color: #BAF3DB;
}
table.confluenceTable th.confluenceTh.highlight-\#e3fcef,
table.confluenceTable td.confluenceTd.highlight-\#e3fcef {
    background-color: #DCFFF1;
}
table.confluenceTable th.confluenceTh.highlight-\#008da6,
table.confluenceTable td.confluenceTd.highlight-\#008da6 {
    background-color: #164555;
}
table.confluenceTable th.confluenceTh.highlight-\#00a3bf,
table.confluenceTable td.confluenceTd.highlight-\#00a3bf {
    background-color: #206A83;
}
table.confluenceTable th.confluenceTh.highlight-\#00b8d9,
table.confluenceTable td.confluenceTd.highlight-\#00b8d9 {
    background-color: #227D9B;
}
table.confluenceTable th.confluenceTh.highlight-\#00c7e6,
table.confluenceTable td.confluenceTd.highlight-\#00c7e6 {
    background-color: #2898BD;
}
table.confluenceTable th.confluenceTh.highlight-\#79e2f2,
table.confluenceTable td.confluenceTd.highlight-\#79e2f2 {
    background-color: #6CC3E0;
}
table.confluenceTable th.confluenceTh.highlight-\#b3f5ff,
table.confluenceTable td.confluenceTd.highlight-\#b3f5ff {
    background-color: #C6EDFB;
}
table.confluenceTable th.confluenceTh.highlight-\#e6fcff,
table.confluenceTable td.confluenceTd.highlight-\#e6fcff {
    background-color: #E7F9FF;
}
table.confluenceTable th.confluenceTh.highlight-\#0747a6,
table.confluenceTable td.confluenceTd.highlight-\#0747a6 {
    background-color: #09326C;
}
table.confluenceTable th.confluenceTh.highlight-\#0052cc,
table.confluenceTable td.confluenceTd.highlight-\#0052cc {
    background-color: #0055CC;
}
table.confluenceTable th.confluenceTh.highlight-\#0065ff,
table.confluenceTable td.confluenceTd.highlight-\#0065ff {
    background-color: #0C66E4;
}
table.confluenceTable th.confluenceTh.highlight-\#2684ff,
table.confluenceTable td.confluenceTd.highlight-\#2684ff {
    background-color: #388BFF;
}
table.confluenceTable th.confluenceTh.highlight-\#4c9aff,
table.confluenceTable td.confluenceTd.highlight-\#4c9aff {
    background-color: #579DFF;
}
table.confluenceTable th.confluenceTh.highlight-\#b3d4ff,
table.confluenceTable td.confluenceTd.highlight-\#b3d4ff {
    background-color: #CCE0FF;
}
table.confluenceTable th.confluenceTh.highlight-\#deebff,
table.confluenceTable td.confluenceTd.highlight-\#deebff {
    background-color: #E9F2FF;
}
table.confluenceTable th.confluenceTh.highlight-\#50253f,
table.confluenceTable td.confluenceTd.highlight-\#50253f {
    background-color: #50253F;
}
table.confluenceTable th.confluenceTh.highlight-\#943d73,
table.confluenceTable td.confluenceTd.highlight-\#943d73 {
    background-color: #943d73;
}
table.confluenceTable th.confluenceTh.highlight-\#ae4787,
table.confluenceTable td.confluenceTd.highlight-\#ae4787 {
    background-color: #ae4787;
}
table.confluenceTable th.confluenceTh.highlight-\#da62ac,
table.confluenceTable td.confluenceTd.highlight-\#da62ac {
    background-color: #da62ac;
}
table.confluenceTable th.confluenceTh.highlight-\#e774bb,
table.confluenceTable td.confluenceTd.highlight-\#e774bb {
    background-color: #e774bb;
}
table.confluenceTable th.confluenceTh.highlight-\#fdd0ec,
table.confluenceTable td.confluenceTd.highlight-\#fdd0ec {
    background-color: #fdd0ec;
}
table.confluenceTable th.confluenceTh.highlight-\#ffecf8,
table.confluenceTable td.confluenceTd.highlight-\#ffecf8 {
    background-color: #ffecf8;
}
table.confluenceTable th.confluenceTh.highlight-\#403294,
table.confluenceTable td.confluenceTd.highlight-\#403294 {
    background-color: #352C63;
}
table.confluenceTable th.confluenceTh.highlight-\#5243aa,
table.confluenceTable td.confluenceTd.highlight-\#5243aa {
    background-color: #5E4DB2;
}
table.confluenceTable th.confluenceTh.highlight-\#6554c0,
table.confluenceTable td.confluenceTd.highlight-\#6554c0 {
    background-color: #6E5DC6;
}
table.confluenceTable th.confluenceTh.highlight-\#8777d9,
table.confluenceTable td.confluenceTd.highlight-\#8777d9 {
    background-color: #8F7EE7;
}
table.confluenceTable th.confluenceTh.highlight-\#998dd9,
table.confluenceTable td.confluenceTd.highlight-\#998dd9 {
    background-color: #9F8FEF;
}
table.confluenceTable th.confluenceTh.highlight-\#c0b6f2,
table.confluenceTable td.confluenceTd.highlight-\#c0b6f2 {
    background-color: #DFD8FD;
}
table.confluenceTable th.confluenceTh.highlight-\#eae6ff,
table.confluenceTable td.confluenceTd.highlight-\#eae6ff {
    background-color: #F3F0FF;
}
table.confluenceTable th.confluenceTh.highlight-\#000000,
table.confluenceTable td.confluenceTd.highlight-\#000000 {
    background-color: #2C3E5D;
}
/* ADG3 colors end */

/* images */
img
{
    page-break-inside: avoid;
    -fs-fit-images-to-width:7in;
}
table img,
ul img,
ol img
{
    -fs-fit-images-to-width:5in;
}
.two-equal .innerCell img.confluence-embedded-image,
.two-right-sidebar .innerCell img.confluence-embedded-image,
.two-left-sidebar .innerCell img.confluence-embedded-image
{
    -fs-fit-images-to-width:3in;
}
.aside .innerCell img.confluence-embedded-image,
.sidebars .innerCell img.confluence-embedded-image,
.three-equal .innerCell img.confluence-embedded-image,
.three-with-sidebars .innerCell img.confluence-embedded-image
{
    -fs-fit-images-to-width:2in;
}
.wiki-content .image-left-wrapper {
    float: left;
    margin: 0 10px 10px 0;
}
.wiki-content .image-center-wrapper {
    display: table;
    margin-left: auto;
    margin-right: auto;
}
.wiki-content .image-right-wrapper {
    float: right;
    margin: 0 0 10px 10px;
}

.wiki-content .confluence-content-image-border {
    border: 1px solid black;
}

img.emoticon, img.icon {
    vertical-align: text-bottom;
    width: 12px;
    height: 12px;
}

.userLogo, img.userLogo {
    width: 48px;
    height: 48px;
    border-radius: 3px;
}

/* Attachments macro */
table.attachments
{
    width: 100%;
}

table.attachments th
{
    color:#003366;
    border-bottom-style:solid;
    border-bottom-width:2px;
    font-weight:bold;

}

table.attachments a
{
    text-decoration: none;
    color: black;
}

/* expand user macro */
.toggle-answer
 {
   display: block !important;
 }

/* User profile macro */
.vcard .values {
    float: left;
}

/* JIRA issues macro */
/* This is copied from the Confluence JIRA3 Plugin's common.css file */
.jira-issue{
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 2px 4px;
    margin: 1px 0;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    display: inline-block;
    min-width: 100px;
    min-height: 16px;
}

.jira-issue > a{
    background-repeat:no-repeat;
    padding-bottom:2px;
    font-weight: bold;
}

#main .wiki-content .jira-issue.resolved > a{
    text-decoration: line-through underline;
}

.single-issue-oauth.unknown-jira-issue > a {
    background: transparent url(../../../images/icons/lock_16_grey.png) no-repeat ;
    background-repeat:no-repeat;
    padding-left:18px;
    padding-bottom:2px;
}

.jira-status{
    color: #777;
    font-size: 10pt;
    font-weight: bold;
    background-repeat:no-repeat;
    padding-left:20px;
    padding-bottom:2px;
    font-weight: bold;
}

/***********************
 * wiki-content styles *
 ***********************/

/* spacing and word wrapping for paragraphs */
.wiki-content p {
    padding: 0;
}

.wiki-content p,
.wiki-content pre {
    margin-bottom: 10px;
}

.wiki-content p:first-child,
.wiki-content h1:first-child,
.wiki-content h2:first-child,
.wiki-content h3:first-child,
.wiki-content h4:first-child,
.wiki-content h5:first-child,
.wiki-content h6:first-child,
.wiki-content div:first-child,
.wiki-content pre:first-child {
    margin-top: 0;
}

.wiki-content p:last-child { /* removes unnecessary margin for the last paragraph element inside panels */
    margin-bottom: 0;
}

/********************
 * wiki-content.css *
 ********************/

/* CONF-25240 - Page layouts not appearing in PDF exports - copied over all page layout related styles from Confluence */

.wiki-content .header,
.wiki-content .footer,
.wiki-content .cell {
    margin: 8px 0;
    box-sizing: border-box;
    word-wrap: break-word;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
}
.wiki-content .columnLayout {
    display: table;
    table-layout: fixed !important;
    width: 100%;
    *clear: both;
}
.wiki-content .columnLayout table {
    table-layout: fixed;
}
.wiki-content .columnLayout.single table {
    table-layout: auto !important;
}
.wiki-content .columnLayout .cell {
    vertical-align: top;
}
.wiki-content .columnLayout .cell.aside {
    width: 29.9%;
}
.wiki-content .columnLayout .cell.sidebars {
    width: 19.9%;
}
.wiki-content .cell {
    display: table-cell;
    padding: 0 10px;
}
.wiki-content .innerCell {
    overflow-x: auto;
}
.wiki-content .placeholder {
    background: #f5f5f5;
    border: 1px dotted #ccc;
    color: #707070;
    font-style: italic;
    margin: 0;
    padding: 10px;
}
.wiki-content .placeholder .activation-content {
    display: none;
}
.wiki-content .placeholder .display-content {
    display: inherit;
}
.wiki-content li > ul,
.wiki-content li > ol,
.wiki-content ul > ul,
.wiki-content ol > ol {
    margin-top: 0;
}
.wiki-content ul,
.wiki-content ul ul ul ul,
.wiki-content ul ul ul ul ul ul ul,
.wiki-content ul ul ul ul ul ul ul ul ul ul {
    list-style-type: disc;
}
.wiki-content ul ul,
.wiki-content ul ul ul ul ul,
.wiki-content ul ul ul ul ul ul ul ul,
.wiki-content ul ul ul ul ul ul ul ul ul ul ul {
    list-style-type: circle;
}
.wiki-content ul ul ul,
.wiki-content ul ul ul ul ul ul,
.wiki-content ul ul ul ul ul ul ul ul ul,
.wiki-content ul ul ul ul ul ul ul ul ul ul ul ul {
    list-style-type: square;
}
.wiki-content ol,
.wiki-content ol ol ol ol,
.wiki-content ol ol ol ol ol ol ol,
.wiki-content ol ol ol ol ol ol ol ol ol ol {
    list-style-type: decimal;
}
.wiki-content ol ol,
.wiki-content ol ol ol ol ol,
.wiki-content ol ol ol ol ol ol ol ol,
.wiki-content ol ol ol ol ol ol ol ol ol ol ol {
    list-style-type: lower-alpha;
}
.wiki-content ol ol ol,
.wiki-content ol ol ol ol ol ol,
.wiki-content ol ol ol ol ol ol ol ol ol,
.wiki-content ol ol ol ol ol ol ol ol ol ol ol ol {
    list-style-type: lower-roman;
}
.wiki-content h1.title-header {
    margin-bottom: 10px;
}
.wiki-content h1 + h1,
.wiki-content h2 + h2,
.wiki-content h3 + h3,
.wiki-content h4 + h4,
.wiki-content h5 + h5,
.wiki-content h6 + h6 {
    margin-top: 10px;
}
.wiki-content div.error > span.error {
    color: #333;
    padding: 6px 10px;
    position: relative;
    background: #fffdf6;
    border: 1px solid #ffeaae;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
}
.wiki-content .columnLayout,
.wiki-content .cell,
.wiki-content .header,
.wiki-content .footer {
    *display: block;
    *float: left;
    *width: 100%;
}
.wiki-content .innerCell {
    *border: 2px dashed #ccc;
    *margin: 8px 4px;
    *padding: 4px 8px;
}
.wiki-content .text-placeholder {
    background: #f5f5f5;
    color: #707070;
    font-style: italic;
    min-width: 10px;
    /* So that it is visible when empty */

    display: block;
}
.wiki-content .text-placeholder.selected {
    color: #333333;
}
.contentLayout .innerCell > *:first-child .innerCell > *:first-child,
.contentLayout2 .innerCell > *:first-child {
    margin-top: 0;
}
.contentLayout2 .columnLayout {
    margin-bottom: 8px;
}
.view .wiki-content .cell:first-child,
.content-preview .wiki-content .cell:first-child {
    padding: 0;
}
/* CONFDEV-7754 - Workaround for some unwanted onDemand styling.
   Remove once JSTDEV-1730 is fixed. See CONFDEV-7799.
   Will have a side-effect of breaking any footers in themes that
   do not use the default font-family or font-size.
   #main selector is to prevent this rule applying within the RTE iframe.
   */
#main .wiki-content .footer p,
#main .wiki-content .footer a {
    font-family: arial, sans-serif;
    font-size: 14px;
}
.wiki-content .cell,
.mceContentBody.wiki-content .cell,
.twoColumns .cell,
.threeColumns .cell,
.twoColumns .large,
.mceContentBody.wiki-content .header,
.mceContentBody.wiki-content .footer,
.threeColumns .large {
    *border: 0;
    *margin: 0;
    *padding: 0;
    *overflow: hidden;
}
.twoColumns .cell {
    *width: 49.9%;
}
.threeColumns .cell {
    *width: 33.3%;
}
.twoColumns .large {
    *width: 69.9%;
}
.threeColumns .large {
    *width: 59.9%;
}
div.aside + div.large,
div.large + div.aside,
div.large + div.sidebars,
.twoColumns div.cell + div.cell,
.threeColumns div.cell + div.cell + div.cell {
    *float: right;
}
/* Page Layouts 2 */
/* Section types: single, two-equal, two-left-sidebar, two-right-sidebar, three-equal, three-with-sidebars */
.two-equal .normal {
    *width: 49.9%;
}
.two-left-sidebar .normal,
.two-right-sidebar .normal {
    *width: 69.9%;
}
.three-equal .cell {
    *width: 33.3%;
}
.three-with-sidebars .normal {
    *width: 59.9%;
}
.two-equal div.cell + div.cell {
    *float: right;
}
.three-equal div.cell + div.cell + div.cell,
.three-with-sidebars div.cell + div.cell + div.cell {
    *float: right;
}
/* CONFDEV-13804: Temporary workaround, remove once fixed in the plugin (WDAY-1641). */
#mw-container div.mw-no-notifications div.subheading p {
    line-height: 24px;
    margin-top: 8px;
    margin-bottom: 8px;
}
.hidden {
    display:none;
}

/* Taken from latest AUI web resources */

.aui-lozenge {
    background: #dfe1e6;
    border: 1px solid #dfe1e6;
    border-radius: 3px;
    color: #253858;
    display: inline-block;
    font-size: 7px;
    font-weight: bold;
    line-height: 99%;
    /* cross-browser compromise to make the line-height match the font-size */
    margin: 0;
    padding: 3px 5px 2px 5px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    word-wrap: normal;
}
.aui-lozenge.aui-lozenge-subtle {
    background-color: #ffffff;
    border-color: #c1c7d0;
    color: #42526e;
}
.aui-lozenge-success {
    background-color: #00875a;
    border-color: #00875a;
    color: #ffffff;
}
.aui-lozenge-success.aui-lozenge-subtle {
    background-color: #ffffff;
    border-color: #abf5d1;
    color: #00875a;
}
.aui-lozenge-error {
    background-color: #de350b;
    border-color: #de350b;
    color: #ffffff;
}
.aui-lozenge-error.aui-lozenge-subtle {
    background-color: #ffffff;
    border-color: #ffbdad;
    color: #de350b;
}
.aui-lozenge-current {
    background-color: #b3d4ff;
    border-color: #b3d4ff;
    color: #0052cc;
}
.aui-lozenge-current.aui-lozenge-subtle {
    background-color: #ffffff;
    border-color: #b3d4ff;
    color: #0052cc;
}
.aui-lozenge-complete,
.aui-lozenge-new {
    background-color: #5243aa;
    border-color: #5243aa;
    color: #ffffff;
}
.aui-lozenge-complete.aui-lozenge-subtle,
.aui-lozenge-new.aui-lozenge-subtle {
    background-color: #ffffff;
    border-color: #c0b6f2;
    color: #5243aa;
}
.aui-lozenge-moved {
    background-color: #ffab00;
    border-color: #ffab00;
    color: #253858;
}
.aui-lozenge-moved.aui-lozenge-subtle {
    background-color: #ffffff;
    border-color: #fff0b3;
    color: #42526e;
}

aui-message {
    display: block;
    margin: 20px 0 0 0;
}
.aui-message {
    background: #ffffff;
    border: 1px solid #0052cc;
    border-radius: 3px;
    color: #172b4d;
    line-height: 20px;
    margin: 20px 0 0 0;
    overflow-wrap: break-word;
    padding-bottom: 20px;
    padding-left: 50px;
    padding-right: 20px;
    padding-top: 20px;
    position: relative;
    word-wrap: break-word;
    word-break: normal;
}
.aui-message::after {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    -webkit-text-stroke-width: 0;
    font-family: "Adgs Icons";
    font-weight: normal;
    font-style: normal;
    speak: none;
    color: #ffffff;
    font-size: 16px;
    left: 20px;
    line-height: 20px;
    position: absolute;
    top: 20px;
}
.aui-message::before {
    display: none;
}
.aui-message .aui-icon-success,
.aui-message .aui-icon-warning,
.aui-message .aui-icon-info,
.aui-message .aui-icon-error,
.aui-message .aui-icon-hint,
.aui-message .aui-icon-generic,
.aui-message .icon-generic,
.aui-message .icon-error,
.aui-message .icon-hint,
.aui-message .icon-info,
.aui-message .icon-success,
.aui-message .icon-warning {
    display: none;
}
aui-message:first-child,
.aui-message:first-child {
    margin-top: 0;
}
.aui-message.error,
.aui-message-error {
    background: #ffffff;
    border-color: #ff5630;
    color: #172b4d;
}
.aui-message.warning,
.aui-message-warning {
    background: #ffffff;
    border-color: #ffab00;
    color: #172b4d;
}
.aui-message.hint,
.aui-message-hint,
.aui-message.info,
.aui-message-info {
    background: #ffffff;
    border-color: #0052cc;
    color: #172b4d;
}
.aui-message.success,
.aui-message-success {
    background: #ffffff;
    border-color: #36b37e;
    color: #172b4d;
}
.aui-message p.title {
    font-weight: bold;
}
table.aui {
    border-collapse: collapse;
    width: 100%;
    /* stripes - deprecated */
}
table.aui table.aui {
    margin: 0;
}
table.aui > caption {
    color: #7a869a;
    background: #f4f5f7;
    border-bottom: 1px solid #dfe1e6;
    caption-side: top;
    padding: 7px 10px;
    text-align: left;
}
table.aui > thead > tr > th,
table.aui > tbody > tr > th,
table.aui > tfoot > tr > th,
table.aui > thead > tr > td,
table.aui > tbody > tr > td,
table.aui > tfoot > tr > td {
    padding: 7px 10px;
    text-align: left;
    vertical-align: top;
}
table.aui > thead > tr > th > ul.menu,
table.aui > tbody > tr > th > ul.menu,
table.aui > tfoot > tr > th > ul.menu,
table.aui > thead > tr > td > ul.menu,
table.aui > tbody > tr > td > ul.menu,
table.aui > tfoot > tr > td > ul.menu {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
table.aui > thead > tr > th > ul.menu > li,
table.aui > tbody > tr > th > ul.menu > li,
table.aui > tfoot > tr > th > ul.menu > li,
table.aui > thead > tr > td > ul.menu > li,
table.aui > tbody > tr > td > ul.menu > li,
table.aui > tfoot > tr > td > ul.menu > li {
    float: left;
    margin: 0 10px 0 0;
    width: auto;
}
table.aui > tbody > tr,
table.aui > tfoot > tr {
    background: #ffffff;
    color: #172b4d;
}
table.aui > tbody > tr:first-child > td,
table.aui > tfoot > tr:first-child > td,
table.aui > tbody > tr:first-child > th,
table.aui > tfoot > tr:first-child > th {
    border-top: 1px solid #dfe1e6;
}
table.aui > thead {
    border-bottom: 2px solid #dfe1e6;
}
table.aui > thead > tr > th {
    color: #7a869a;
    font-weight: 600;
    line-height: 1.66666667;
    letter-spacing: 0;
    text-transform: none;
}
table.aui > tbody > tr > th {
    color: #7a869a;
    font-weight: 600;
    line-height: 1.66666667;
    letter-spacing: 0;
    text-transform: none;
    background: #ffffff;
}
table.aui.aui-zebra tr {
    border-bottom: 0;
}
table.aui.aui-zebra > thead > tr:nth-child(even),
table.aui.aui-zebra > tbody > tr:nth-child(even),
table.aui.aui-zebra > tfoot > tr:nth-child(even),
table.aui.aui-zebra > tbody > tr:nth-child(even) > th {
    background: #f4f5f7;
    color: #172b4d;
}
table.aui .aui-button-link {
    padding-top: 0;
    padding-bottom: 0;
    line-height: inherit;
    height: auto;
    border: 0;
}
table.aui > tbody > tr > th,
table.aui > tfoot > tr > th,
table.aui > tbody > tr > td,
table.aui > tfoot > tr > td {
    border-bottom: 1px solid #dfe1e6;
}

aui-tabs {
    display: block;
}
.aui-tabs {
    display: flex;
}
.aui-tabs > .tabs-pane {
    display: none;
}
.aui-tabs > .tabs-pane.active-pane {
    display: block;
}
.aui-tabs > .tabs-menu > .menu-item > a,
.aui-tabs > .tabs-menu > .menu-item > a strong {
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aui-tabs.vertical-tabs {
    flex-flow: row nowrap;
}
.aui-tabs.vertical-tabs > .tabs-menu,
.aui-tabs.horizontal-tabs > .tabs-menu
{
    display: none;
}
.aui-tabs.vertical-tabs > .tabs-pane {
    padding-left: 20px;
    padding-right: 20px;
}
.aui-tabs.horizontal-tabs {
    flex-direction: column;
}
.aui-tabs.horizontal-tabs > .tabs-pane {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 10px;
}

.confluence-information-macro {
    background: #fcfcfc;
    border: 1px solid #ccc;
    page-break-inside: avoid;
    color: #333;
}

.confluence-information-macro-note
{
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABA0lEQVR42p2QP0tCURiH7zdQRA3u4OJUiyDY4CDtTuEXuXs0JEQ4uDk5C0EuKoEu+SWcg5baLCS7tNTx98IzyMWjXoeHe95/z3vODdzi2kdTvIo30fL1+YbLIhYOfsV5GsFAOL59zsNjBRfij60lEXKbf1E5RvDExl4URYGwXJfc6JCgwqZYhBp2hs5n4odadZ9gzKYu2x1YrUPt2SeosWEtijsEBfGN5HKXYErxweKkAMk9PbOkoE5hJXI+AbUVvfVtwZzkHTECAGptel8cgisSnyJDk+8GRlZ8MdOwxITghoa9ArhlZmzB+/abDjwh+c8+LBgRnMLEBHnxKJYpBpfMFDbGjWcGPFD11gAAAABJRU5ErkJggg==);
    background-color: #fffdf6;
    border-color: #ffeaae;
    background-repeat: no-repeat;
    background-size:auto;
    background-position: 10px 10px;
}

.confluence-information-macro-information
{
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA1klEQVR42qWTUQqCQBCGfdKCuogu+qBeoot0kl7TBwU9S3QLyega9ZBh1L/wLyyDLGkLHzj/vzPM7o6eXLv9IQRH0IMnuVAL7b0y0QcVeIPPFPQasJ5KPlkbW5CDFcmpGf8MfLtATeMGEqObBCuOwJV6ZYsjxVhrsoDQEuojiLRQmLa9H5d1nEIHPYOMvrMD6hm9XgcDg2BGgYDesLTAlt596RFSep3jEp0FWnqlDtTMZ4ytZ1SuQZJLDlLtGuUGpNQ3/G7kKP/5M7nbLNnqCzxAR03J/V+HSh9XtOsatQAAAABJRU5ErkJggg==);
    background-color: #fcfcfc;
    border-color: #aab8c6;
    background-repeat: no-repeat;
    background-size:auto;
    background-position: 10px 10px;
}

.confluence-information-macro-warning
{
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA00lEQVR42qWTXQqCUBCFe+oHaiMm+qDSBlpf+qBga4n20INktI16yDDqDJwLwyAXzIEPnDM/zL13nFm77HcBOIAWvMiVWqBzbeEclOADvkMwVoPVUPFJJR5BBpYko+biZ6nRDSoG7iB2uitQ/hbcqJda7ClGotkGRoup91IrQu7GlgRvA5o6Ti5OSycd0SBlrBWno7MY0WDBWPdvgw1jD98RfDuTsKaZeomFOOHIZ4zUM4a+RbJmF6nyrXINEuprftd2lSf+TP4xC476Bk/QUAtt/g8cmyvPgMzXPwAAAABJRU5ErkJggg==);
    background-color: #fff8f7;
    border-color: #d04437;
    background-repeat: no-repeat;
    background-size:auto;
    background-position: 10px 10px;
}

.confluence-information-macro-tip
{
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAF7SURBVDiNpdOxaxRBFMfxz25CwO6K/QP0CgWzemeTOpEUsbOxj5AYRJtU+zds44HdXfwLRMFCwSKofQovZrARRPst0gmBiMW+g2XxQPDB8mbe/r4z896byfSsqMub2MM9XIvwd7zHi6ZKX7v6rAOu4RkeI+8vHPYbRzhsqvTLQhjwOzyJ2AwbuBLfRsRyHOBtMFZj5Qm28Q0Pmiqd9nY+wUlRl8/xGnfjtE+zoi7XcYoVjJoqfVly/EWqI8xxidFqFGwFs2VwUZcDfMS8qdLDoi5neIS9HDuhO1oCXw14jM2edifHMCZnAUyKupzEeIzPAc9xp6vFcFHEru1iEDtvYhDwVlOl89Cshb/ItZcEboXfwjnuL4HhevifufaGwT40VZrHIp/w5i8wbQHhOCvqsoxd/rWNt7Vtv8Q4b6qUMI3/r6LPy+B1vIzptKlSWhTxMPLaxryoy6m2VWfagt2IFA9C/yGY/39MWV8Rx9zXXrAhLvADx9rnnLr6P0ZbfXBakqq8AAAAAElFTkSuQmCC);
    background-color: #f3f9f4;
    border-color: #91c89c;
    background-repeat: no-repeat;
    background-size:auto;
    background-position: 10px 10px;
}

.confluence-information-macro-note.has-no-icon
{
    background-image: none;
}

.confluence-information-macro-information.has-no-icon
{
    background-image: none;
}

.confluence-information-macro-warning.has-no-icon
{
    background-image: none;
}

.confluence-information-macro-tip.has-no-icon
{
    background-image: none;
}

.confluence-embedded-file-wrapper {
    display: inline-block;
}

.confluence-embedded-file-wrapper .confluence-embedded-image {
    display: block;
    margin-left: 2px;
    margin-right: 2px;
    max-width: calc(100% - 4px);
    border-radius: 3px;
}

.confluence-embedded-file-wrapper .confluence-embedded-image-title {
    display: block;
    text-align: center;
    color: #505f79;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

        </style>
            </head>
    <body>
       
       
       
       
               
                                <div class="hidden rendered-page"></div>
            <div class="wiki-content">
    <div class="pagetitle" id="Testing with nested text">
        <h1 class="title-header">Testing with nested text</h1>

        <ul><li data-uuid="6e26be8e-7bc9-44c9-a8c6-b946a39d7be8">a<ul><li data-uuid="b1227af3-1d44-4141-8827-eb5124a4ebaf">b<ul><li data-uuid="c10ce451-7d4e-4940-8fc7-e73e637d94be">c<ul><li data-uuid="ad4e8d62-bc7f-46eb-baa3-abbce4cdaae8">d<ul><li data-uuid="55364017-dac7-4564-aa07-b0c028e251fc">e<ul><li data-uuid="0ce799ac-e1fe-42bb-ae83-f9056ed80072">f<ul><li data-uuid="2d88ec20-d626-4d32-8b9d-15257e64336a">g<ul><li data-uuid="83dadcd8-8198-4e1c-aa10-ec06d7878bb3">h<ul><li data-uuid="e0b39524-b6d6-4716-970a-d08d0436c937">i<ul><li data-uuid="45c28d10-50b5-4fef-b2c1-821a058db6bb">j<ul><li data-uuid="b9574bf5-05f4-4c4f-b746-be3751ae04f1">k<ul><li data-uuid="13b9e998-dad9-423b-b8a0-2db9f4e5de52">l<ul><li data-uuid="e4350a71-d4aa-4044-aee9-d391fa000291">m<ul><li data-uuid="dae80041-81e8-4be1-be21-a1669dfed369">n<ul><li data-uuid="8511f0c0-ac79-4b1f-92e3-51d0647c6797">o<ul><li data-uuid="49de9333-b60b-426c-baef-dfde4f543b90">p<ul><li data-uuid="f73a8297-a8f9-4425-822c-bcba2b66737c">q<ul><li data-uuid="275cec1d-bd6e-4bdf-8689-83287e4b5d84">R<ul><li data-uuid="a38e8411-a19f-470a-b4ac-32d1312a26d3">s<ul><li data-uuid="d14face0-13de-4579-bf1a-1d26b53b3d21">t<ul><li data-uuid="f042aaf5-4a80-4561-8033-1beb9ab55776">u<ul><li data-uuid="3c8d2178-8f95-41cd-8e72-9cb679ff208b">v<ul><li data-uuid="aad2058f-4bce-43da-b33b-24d6b1ce9816">w<ul><li data-uuid="aede1d64-5aeb-4f0b-b589-b45588a11063">x<ul><li data-uuid="84296128-e233-4362-9382-09067be5b94b">y<ul><li data-uuid="668a0869-c8b7-4d89-8b8b-090a3e5739b9">z</li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul>
    </div>
</div>

            </body>
</html>


Thanks,
Regards,
Saba

Message has been deleted

Saba Taseer

unread,
Mar 20, 2025, 5:50:32 AMMar 20
to Flying Saucer Users
Infact I was able to replicate the issue with the above styles, if I remove one nesting level the export works, but with all 26 nests it goes out of memory. Let me know how you go.

Thanks for your help

Andrei Solntsev

unread,
Mar 20, 2025, 6:43:12 PMMar 20
to flying-sa...@googlegroups.com
Thank you, now I can reproduce OOM even with option -Xmx1G.


Andrei Solntsev


Saba Taseer

unread,
Mar 20, 2025, 9:18:32 PMMar 20
to Flying Saucer Users
Thanks Andrei,

What will be the next steps for this? Do you need anything else from me?

Andrei Solntsev

unread,
Mar 21, 2025, 2:19:36 AMMar 21
to flying-sa...@googlegroups.com

I don't know, somebody optimize this code for parsing css. At a first glance, it's a non-trivial challenge.

Peter Brant

unread,
Mar 21, 2025, 8:21:19 AMMar 21
to flying-sa...@googlegroups.com
Yeah, the source of issues here is certainly the CSS matcher. My guess is that the parsing itself is fast. I agree with Andrei that the practical fix here is to optimize the CSS, not Flying Saucer.

The CSS matcher is really quite neat (and quite different from how major browsers work). It's basically a state machine that keeps track of the possible rule matches at any given point in the box tree and then also hashes the result to allow matched rules to be shared across identical tree structures. This is, in general, quite efficient because we can easily figure out the rules that match at any point in the tree with nothing more than the current state and the current node.

On the other hand, descendant selectors are a problem with this approach because they effectively always could match. Combining a deeply nested box tree and lots of or long chains of descendant selectors in particular is going to end badly. I'm a little surprised that it uses gobs of memory; I would have expected it to be slow though. (My recollections of the CSS matcher implementation are also a couple of decades old though too.)

It's very likely possible to improve the constant factors involved (in particular, I think hash keys are a text representation of all calculated property values), but the fundamental issue is, well, fundamental to how CSS matching works in FS.

Looking at the sample above, I'd be skeptical about rules with this pattern:

.wiki-content ul ul ul ul ul ul ul ul ul ul ul ul {
    list-style-type: square;
}

There might be other problems, but I'd start there.







--
You received this message because you are subscribed to the Google Groups "Flying Saucer Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flying-saucer-u...@googlegroups.com.

Andrei Solntsev

unread,
Mar 22, 2025, 6:26:05 PMMar 22
to flying-sa...@googlegroups.com
Peter,
I tried to debug the OOM problem,
and I found at least one strange thing about class org.xhtmlrenderer.css.newmatch.Matcher.Mapper: its "axes" field can be very, very long (more than 2 000 000 elements).
And there are many `Mapper` instances in memory. Definitely, they eat all the memory.

Andrei Solntsev


Saba Taseer

unread,
Mar 26, 2025, 3:42:43 AMMar 26
to Flying Saucer Users
Thanks Andrei and Peter, I was able to resolve the issue by simplifying styles for the lists.
Reply all
Reply to author
Forward
0 new messages