Hi I am working on SL pdf printout form and I am c...
# suitescript
e
Hi I am working on SL pdf printout form and I am curious does the SL support this type of CSS? It is not doing anything so not sure if it supports flex and box model stuff.
Copy code
//CSS structure
            xml += '.footer { width: 100%; border-width: medium; border-style: solid;padding-bottom: 45px;margin-top: 0px }';
            xml += 'body {size:A4-landscape;}';
            xml += '.jumbo {display: flex; justify-content: space-between;align-items: center;width: 100%; margin-top: 5px; border-width: medium; border-style: solid;}'
            xml += '.leftSection { width: 50%; border-width: medium; border-style: solid; padding: 10px; text-align: left;}';
            xml += '.rightSection { width: 50%; border-width: medium; border-style: solid; padding: 10px; text-align: right; margin-right: 100px;}';
            xml += '.navbar { width: 100%; font-family: sans-serif; border-style: solid; border-width: medium; padding: 25px 50px 50px 50px; }';
            //HTML Skeleton
            xml += '</style>';
            xml += '</head>';
            //HTML Body Starts
            xml += '<body>';
            xml += '<header>'
            //NAV  < Logo - Model || ->
            xml += '<div class="navbar">'
            xml += '<img src="<https://www.w3schools.com/images/lamp.jpg>" alt="Lamp" width="32" height="32"/>'
            xml += '</div>'
            xml += '</header>'
            //Mid Section
            xml += '<section>'
            xml += '<div class="jumbo">'
            xml += '<table class="leftSection">'
            xml += '<tr>'
            xml += '<td>'
            xml += '<p>Hello1</p>'
            xml += '<p>Hello1</p>'
            xml += '<p>Hello1</p>'
            xml += '<p>Hello1</p>'
            xml += '<p>Hello1</p>'
            xml += '<p>Hello1</p>'
            xml += '<p>Hello1</p>'
            xml += '<p>Hello1</p>'
            xml += '<p>Hello1</p>'
            xml += '<p>Hello1</p>'
            xml += '<p>Hello1</p>'
            xml += '<p>Hello1</p>'
            xml += '</td>'
            xml += '</tr>'
            xml += '</table>'
            xml += '<table class="rightSection">'
            xml += '<tr>'
            xml += '<td>'
            xml += '<p>Hello1</p>'
            xml += '</td>'
            xml += '</tr>'
            xml += '</table>'
            xml += '</div>'
a
You are going to have a very hard time debugging/updating that if you keep all your template code inside your script code. My recommendation, create an Advanced PDF Template, build your template and test your CSS etc. Then use SuiteScript to add data and render that using the template.
☝️ 1
💯 1