While generating PDF in ColdFusion Rowspan is not working properly for RTL direction (ex: Arabic)

Explorer ,
Feb 06, 2018 Feb 06, 2018

Copy link to clipboard

Copied

I have a table structure in HTML where I have to use rowspan and RTL(Right To Left) direction. But while converting this HTML to PDF rowspan is not working as expected. Assuming this is a bug in ColdFusion where an HTML with rowsapn and RTL direction is not working correctly.

Note that this is working fine for LTR (Left To Right) direction (ex: English Characters). But I need to use RTL direction since Arabic characters need to be displayed in PDF.

Sample Code :

<cfdocument format="PDF" filename="C:\test.pdf" overwrite="true">

  <!DOCTYPE html>

<html>

<head>

<style>

  table, th, td {

      border: 1px solid black;

  }

  table#mainTable {direction:rtl;}

</style>

</head>

<body>

<cfoutput>

<table id="mainTable">

  <tr>

    <td>Tariff</td>

    <td>Description</td>

    <td>Quantity</td>

    <td>Unit Price</td>

    <td>Amount</td>

  </tr>

  <tr>

    <td rowspan="7" >Customer Level Charges</td>

    <td>9999123456</td>

    <td>18.16</td>

    <td>6</td>

    <td>108.96</td>

  </tr>

  <tr>

    <td>9999123456</td>

    <td>18.16</td>

    <td>6</td>

    <td>108.96</td>

  </tr>

  <tr>

    <td>9999123456</td>

    <td>18.16</td>

    <td>6</td>

    <td>108.96</td>

  </tr>

  <tr>

    <td>Adjustments</td>

    <td colspan="4">-20</td>

  </tr>

  <tr>

    <td>This Month Amount</td>

    <td colspan="4">1091.92</td>

  </tr>

  <tr>

    <td>Last Month outstanding Amount</td>

    <td colspan="4">0</td>

  </tr>

  <tr>

    <td>Total</td>

    <td colspan="4">1146.51</td>

  </tr>

</table>

</cfoutput>

</body>

</html>

</cfdocument>

Expected Result

It should work as how it is working in Browser, screen shot attached.

RTL_Working_Fine.png

Views

635

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 06, 2018 Feb 06, 2018

Copy link to clipboard

Copied

Hi,

You can use the cfhtmltopdf tag to convert this to PDF. I have tried this and it showed the correct result.

<cfhtmltopdf source = "doc.html" destination  = "new.pdf" />

Thanks,

Priyank

Thanks,
Priyank Shrivastava

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 07, 2018 Feb 07, 2018

Copy link to clipboard

Copied

Thanks Priyank for your response.

But , is there any way to do this using cfdocument tag only since I need to provide a source url in case of cfhtmltopdf. For that I need to modify lot many places in the existing code.

Thanks,

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 07, 2018 Feb 07, 2018

Copy link to clipboard

Copied

LATEST

Abdul, you do not have to provide a SOURCE (url or file). That's merely an option. You can pass HTML/CFML between the tags, just like CFDOCUMENT.


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines