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

PDF generated from an activity using pxcreatepdf is distorted

SA-90166

Summary



PDF is generated using a customized pxCreatePDF activity. On executing the activity manually on a single case context, the PDF is generated correctly. However, when the same activity is invoked from another activity, the generated PDF is distorted.


Error Messages



Not Applicable


Steps to Reproduce

  1. Create a dynamic layout with inline-grid-triple format.
  2. Add a button.
  3. Configure to execute the custom activity on click.
  4. Invoke the pxCreatePDF activity in the custom activity. Controls in dynamic layout is in the stacked format in the generated PDF.


Root Cause



A defect in Pegasystems’ code or rules.


Resolution



Perform the following local-change:
  1. Save the section which is referred in the pxCreate activity as a different section and as an embedded section (non-auto generated) in a newly created section.
  2. Add a Style tag in the embedded section.
  3. Add the below styles:

    html,body {
       font-family: OpenSans,sans-serif;
    }

    /* Header styles */
     
    .header-content{
      margin-bottom: 10px;
    }
     
    .header-title-table{
         float: right;
    }
     
    .header-title {
        padding-left: 0px;
        padding: 0;
        margin: 0;
        clear:both;
        margin-bottom: 20px;
        border: 0;
    }

    fieldset {
       border: 1px solid #c0c0c0;
       margin: 0 2px;
       padding-top: 20px;
    }
     
    .fieldset-legend{
      color: #000;
    }
     
    .header-element,
    .header-content h1,
    .header-content h2,
    .header-content h3,
    .header-content h4,
    .header-content h5,
    .header-content h6 {
        vertical-align: middle;
    }
     
    h1 {
        font-size: 18px;
        font-weight: normal;
        line-height: 1
    }
     
    h2 {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.4
    }
     
    h3 {
        font-size: 14px;
        font-weight: 700;
        line-height: 1.5
    }
     
    h4 {
        font-size: 14px;
        font-weight: 700;
        line-height: 1.5
    }
     
    h5 {
        font-size: 14px;
        font-weight: 700;
    }
     
    h6 {
        font-size: 14px;
        font-weight: 700;
    }

    /* Label styles */
    .dataLabelForRead,
    .dataLabelForWrite,
    .dataLabelForStyle,
    .dataLabelForStyleTop {
        padding: 0 2px 0 0;
        color: #767676;
    }

    /* input styles */
    INPUT[type="text"],
    INPUT[type="email"],
    INPUT[type="url"],
    INPUT[type="number"],
    INPUT[type="tel"],
    INPUT[type="password"] {
        font-family: OpenSans, sans-serif;
        font-size: 14px;
        color: #000;
        font-weight: normal;
        text-transform: none;
        padding: 1px 3px;
        background-image: none;
        background-color: #FFF;
        min-height: 28px;
        line-height: 28px;
        padding-left: .3em;
        border: 1px solid #CCCCCC;
        width: 250px;
     }

    .pzhc.pzbutton {
        border-left: 3px solid #0062E6;
        border-top: 3px solid #0062E6;
        border-right: 1px solid #0062E6;
        border-bottom: 1px solid #0062E6;
        background-image: none;
        background-color: #FFFFFF;
        margin: 0;
        font-size: 14px;
        height: 30px;
        text-align: center;
        vertical-align: middle;
        width: 20%;
    }

    /* Rich Text Editor Styles */
    #rte-default {
        border: 0px;
    }

    #rte-default textarea {
        visibility: visible !important;
        font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
        font-size: 12px;
        color: #333;
        background-color: #fff;
        overflow: hidden;
        border: 0px;
    }

    /* Avoid page-breaks within elements */
    div.field-item.dataValueWrite{
      page-break-inside: avoid;
    }

    /* Common Layout format styles(DL,RDL) */
    .layout-content-default > .content-item.content-field,
    .layout-content-default > .content-item.content-label,
    .layout-content-default > .content-item.content-layout,
    .layout-content-default > .content-item.content-sub_section {
        display: block;
        width: 100%;
        margin: 0.0px 0 14.0px 0px;
        padding: 0px;
    }
     
    .layout-content-stacked > .content-item.content-field,
    .layout-content-stacked > .content-item.content-label,
    .layout-content-stacked > .content-item.content-layout,
    .layout-content-stacked > .content-item.content-sub_section {
        display: block;
        width: 100%;
        margin: 0.0px 0 7.0px 0px;
        padding: 0 0.0px 0 0.0px;
    }
     
    .layout-content-inline > .content-item.content-field,
    .layout-content-inline > .content-item.content-label,
    .layout-content-inline > .content-item.content-layout,
    .layout-content-inline_grid_double > .content-item.content-sub_section {
        display: inline-block;
        width: 1%;
        margin: 0px 7.0px 7.0px 0px;
        padding: 0px;
        white-space: nowrap;
        vertical-align: top;
    }

    /* RDL inline should render with 100% */
    .layout-content-inline > .content-item.content-sub_section {
      width: 100%;
    }
     
    .layout-content-inline_grid_double > .content-item.content-field,
    .layout-content-inline_grid_double > .content-item.content-label,
    .layout-content-inline_grid_double > .content-item.content-layout,
    .layout-content-inline_grid_double > .content-item.content-sub_section {
        display: inline-block;
        width: 49.9%;
        margin: 0.0px 0 7.0px 0px;
        padding: 0 7.0px 0 0.0px;
        white-space: normal;
        vertical-align: top;
    }
     
    .layout-content-inline_grid_triple > .content-item.content-field,
    .layout-content-inline_grid_triple > .content-item.content-label,
    .layout-content-inline_grid_triple > .content-item.content-layout,
    .layout-content-inline_grid_triple > .content-item.content-sub_section {
        display: inline-block;
        width: 33.28%;
        margin: 0.0px 0 7.0px 0px;
        padding: 0 7.0px 0 0.0px;
        white-space: normal;
        vertical-align: top;
    }
     
    .layout-content-inline_grid_quadruple > .content-item.content-field,
    .layout-content-inline_grid_quadruple > .content-item.content-label,
    .layout-content-inline_grid_quadruple > .content-item.content-layout,
    .layout-content-inline_grid_quadruple > .content-item.content-sub_section {
        display: inline-block;
        width: 24.9%;
        margin: 0.0px 0 3.0px 0px;
        padding: 0 6.0px 0 0.0px;
        white-space: normal;
        vertical-align: top;
    }

    /* 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 #CCCCCC;
    }

    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 #CCCCCC;
      border-right: 1px none #CCCCCC;
    }

    div.gridDefault div.transparent th.cellCont,
    div.gridDefault div.transparent tr.cellCont td.gridCell {
        border-bottom: 0px none #CCCCCC !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 #CCCCCC;
    }

    /* 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;
    }

    /* Styles for alternative rows */
    tr.oddRow {
      background-color: white;
    }

    tr.evenRow {
      background-color: white;
    }

Alternatively, update to Pega Platform 7.4.

Published October 26, 2019 - Updated October 8, 2020

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