Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Cells in generated PDF align incorrectly

SA-76324

Summary



On generating a PDF using the Export to PDF option from the report's Action menu, the reports cells align incorrectly in the PDF. This occurs post Pega 7.4 update.




Error Messages



Not Applicable


Steps to Reproduce

  1. Launch any report.
  2. Click the Actions button.
  3. Click Export to PDF.


Root Cause



A defect in Pegasystems’ code or rules.

For report definition tables, the border styles are collapsed. Hence, some borders align incorrectly.



Resolution



Perform the following local-change: Replace the pyReport_ExportToPdfStyles CSS file content with the below styles and save the file.

/* This CSS is to customize the styles while doing reports export to PDF this style rule will be picked up when you check the RD rule dataaccess "Ignore application Skin when exporting to PDF" check box to improve performance of Export to PDF functionality  */ 

/** GRID Styles  **/
TABLE {
    font-size: 14px;
    padding: 0;
    margin: 0;
    font-family: OpenSans,sans-serif;
}

table.gridTable {
    border-collapse: collapse;
    overflow: scroll;
    width: 100% !important;
}

div.gridDefault div.default #gridLayoutTable
div.gridDefault div.default #gridHeaderTable {
    border: none !important;
}

/** Grid Cell Styles **/
TD {
    font-family: OpenSans,sans-serif;
}

TR {
   border-collapse: collapse;
}

/*.hiddenCell,
.hiddenCell * {
    display: none !important;
}*/

div#gridHead_right>table, 
div#gridHead_right>table * {
    display: none !important;
}

th.hiddenCell div.cellIn {
    text-align: left;
}

div.gridDefault div.transparent th.cellCont,
div.gridDefault div.default th.cellCont,
div.gridDefault div.spreadsheet th.cellCont,
div.gridDefault div.List_report th.cellCont,
div.gridDefault tr.cellCont th.hiddenCell,
div.gridDefault div.List_report div#report_body th
div.gridDefault div.Summarized_report div#report_body th {
   text-align: left;
   vertical-align: bottom;
   padding-top: 3px;
   padding-left: 4px;
   white-space: nowrap;
   background-image: none;
   background-color: transparent;
   border-bottom: 1px solid #000;
}

div.gridDefault div.transparent tr.cellCont td.gridCell,
div.gridDefault div.default tr.cellCont td.gridCell,
div.gridDefault div.spreadsheet tr.cellCont td.gridCell,
div.gridDefault div.List_report tr.cellCont td.gridCell,
div.gridDefault div.List_report tr td.rowHandleHead
div.gridDefault div.List_report,
div.gridDefault div.Summarized_report tr.cellCont td.gridCell
div.gridDefault div.Summarized_report tr td.rowHandleHead
div.gridDefault div.Summarized_report,
div.gridDefault div.List_report div#report_body tr td, 
div.gridDefault div.Summarized_report div#report_body tr td {
  text-align: left;
  vertical-align: middle;
  padding-left: 4px;
  padding-right: 2px;
  white-space: normal;
  border-bottom: 1px solid #000;
  border-right: 1px none #000;
}

div.gridDefault div.transparent th.cellCont,
div.gridDefault div.transparent tr.cellCont td.gridCell {
    border-bottom: 0px none #000 !important;
}

div.gridDefault div.List_report div#report_body tr td, 
div.gridDefault div.Summarized_report div#report_body tr td,
div.gridDefault div.List_report div#report_body th
div.gridDefault div.Summarized_report div#report_body th {
  height:32px;
}

div.gridDefault div.Summarized_report div#report_body tr td,
div.gridDefault div.Summarized_report div#report_body th,
div.gridDefault div.spreadsheet tr.cellCont td.gridCell,
div.gridDefault div.spreadsheet th.cellCont,
div.gridDefault tr.cellCont th.hiddenCell {
  border: 1px solid #000;
}

/* Grid Header actions */
.gridActionTop,
table#grid-desktop-paginator {
  width: 100% !important;
  white-space: nowrap;
  empty-cells: hide !important;
}

td .content-item.content-layout.flex.flex-row {
   display: inline-block;
   margin-right:5px;
}

td .content-item.content-layout.flex.flex-row * {
   display: inline-block;
}

.grid-mobile-paginator,
.gridSortTitleDesc,
table.gridTable tr th .wspan,
table.gridTable tr th #sort {
  display: none !important;
}

.gridActionTop .gridActionAlignLeft
.gridActionTop .gridActionAlignCenter,
.gridActionTop .gridActionAlignRight {
  width: 33%;
}

table#grid-desktop-paginator tr td {
  width: 8% !important;
}

table#grid-desktop-paginator tr td input[type="text"] {
   width: 27px !important;
}

.previousPage, .previousPage_on {
    background-image: url(../images/covernavprevious_standard_12884637628.gif!!.gif);
    background-repeat: no-repeat;
    border: 0;
    cursor: pointer;
    height: 10px;
    width: 5px;
    background-position: center center;
    vertical-align: middle;
}

.firstPage, .firstPage_on {
    background-image: url(../images/covernavfirst_standard_13146062276.gif!!.gif);
    background-repeat: no-repeat;
    border: 0;
    cursor: pointer;
    height: 10px;
    width: 14px;
    background-position: center center;
    vertical-align: middle;
}

.nextPage, .nextPage_on {
    background-image: url(../images/covernavnext_standard_11248465930.gif!!.gif);
    background-repeat: no-repeat;
    border: 0;
    cursor: pointer;
    height: 10px;
    width: 5px;
    background-position: center center;
    vertical-align: middle;
}

.lastPage, .lastPage_on {
    background-image: url(../images/covernavlast_standard_13045923548.gif!!.gif);
    background-repeat: no-repeat;
    border: 0;
    cursor: pointer;
    height: 10px;
    width: 14px;
    background-position: center center;
    vertical-align: middle;
}

div#EXPAND-OUTERFRAME {
    margin-bottom: 15px;
}
table{
  border-collapse:collapse;
}

 

/*end of file */

Published April 11, 2019 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice