Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » PDF Generation with external CSS for html inside a text element(PDF Generation with external CSS for html inside a text element)
PDF Generation with external CSS for html inside a text element [message #1791849] Fri, 06 July 2018 08:28
pushpa mariappan is currently offline pushpa mariappanFriend
Messages: 1
Registered: July 2018
Junior Member
We have a requirement to generate pdf with dynamic html with custom CSS styling inside an text element. That is text element will have dynamic html as content in text-property.

I have tried the "Use CSS File" option.

The external styles are available. However I can only select one style for the outer text-element and all other external styles are not applied to text-content html except the one selected.

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.23" id="1">
    <property name="createdBy">Eclipse BIRT Designer Version 4.6.0.v201606072122</property>
    <property name="units">in</property>
    <property name="iconFile">/templates/blank_report.gif</property>
    <property name="bidiLayoutOrientation">ltr</property>
    <property name="imageDPI">96</property>
    <list-property name="cssStyleSheets">
        <structure>
            <property name="fileName">customstyle.css</property>
            <property name="useExternalCss">false</property>
        </structure>
    </list-property>
    <page-setup>
        <simple-master-page name="Simple MasterPage" id="2">
            <property name="type">custom</property>
            <property name="topMargin">0.25in</property>
            <property name="leftMargin">0.5in</property>
            <property name="rightMargin">0.25in</property>
            <property name="backgroundImageType">embed</property>
            <property name="fontFamily">"Lucida Sans Unicode"</property>
            <property name="height">29.7cm</property>
            <property name="width">21cm</property>
            <property name="showHeaderOnFirst">false</property>
            <property name="showFooterOnLast">true</property>
            <property name="footerHeight">1.8in</property>
        </simple-master-page>
    </page-setup>
    <body>
        <text id="377">
            <property name="style">bgyellow</property>
            <property name="contentType">html</property>
            <text-property name="content"><![CDATA[<p class="textgreen">fsdaf</p>

]]></text-property>
        </text>
    </body>
</report>


customstyle.css
.textgreen {
	color: green;
}
.bgyellow {
	background-color: yellow;
}


index.php/fa/33323/0/

I would like to know if there is a possibility to include entire css stylesheet to text-element instead of only one style. Or any other way in which the external stylesheet can be made available for text-content html.

Thanks and Regards,
Pushpa

  • Attachment: testpdf.jpg
    (Size: 23.22KB, Downloaded 724 times)
Previous Topic:Connect MS SQL Analysis services Cubes via BIRT tool
Next Topic:Generic PDF Report
Goto Forum:
  


Current Time: Tue Apr 23 12:57:14 GMT 2024

Powered by FUDForum. Page generated in 0.02784 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top