Printing Layout Builder Columns

Created on 8 May 2021, over 3 years ago
Updated 15 March 2024, 8 months ago

Problem/Motivation

Using Drupal 9.x and the dompdf 0.8.0 engine.

Problem: Print Entity will not format the columns or content parameters like inline labels with creating the pdf.

Process: I enabled the PDF as a custom display mode under Manage Display, clicked on the PDF tab and told it to use Layout Builder. I then created a two column layout, using inline-labels in one of the blocks.

However, when creating the PDF, it ignores anything I did in Layout Builder and just creates it using the format it is in on the input page.

The PDF display mode showed up after I installed Entity Print, so I assumed that is where I would make the formatting changes using Layout Builder for the pdf creation. Trying to figure out what step I am missing or if this program will just not use the Layout Builder format.

πŸ’¬ Support request
Status

Active

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jlsegul

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡·Costa Rica lmiranda08

    I have the same issue in Drupal 10.

    I want to create the pdf with a view_mode created with Layout Builder, but only show the fields without the format.

    And the PDF created is like this:

  • πŸ‡ΊπŸ‡ΈUnited States jlsegul

    I also have the same issue in Drupal 10.

    I am trying to create the pdf with a view_mode created with Layout Builder, but only show the fields without the format. Are there any available pdf libraries that use flex?

  • πŸ‡¨πŸ‡¦Canada djdemonNet

    So, to easily solve it possible with CSS:

    .divTable {
      display: table;
      width: 100%;
    }
    
    .divTableBody {
      display: table-row-group;
    }
    
    .divTableRow {
      display: table-row;
    }
    
    .divTableCell,
    .divTableHead {
      display: table-cell;
    }
    <div class="divTable">
      <div class="divTableBody">
        <div class="divTableRow">
          <div class="divTableCell">Asistentes</div>
          <div class="divTableCell">Cosistentes</div>
        </div>
        <div class="divTableRow">
          <div class="divTableCell">1</div>
          <div class="divTableCell">2</div>
          <div class="divTableCell">3</div>
        </div>
      </div>
    </div>
    
Production build 0.71.5 2024