question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Landscape PDF with multiple cols, strange rendering

See original GitHub issue

Dear @simonbengtsson,

I’m rendering a landscape pdf with:

          pdf.autoTable({
              html: '.csv-table',
              didParseCell: function (table) {
                if (table.section === 'head') {
                  table.cell.styles.fillColor = '#999';
                  table.cell.styles.textColor = '#fff';
                  table.cell.styles.fontSize = 9;
                }

                if (table.section === 'body') {
                  table.cell.styles.fontSize = 9;
                }
              },
          });

Which ends in:

Bildschirmfoto 2019-09-30 um 13 01 07

Can you say what leads to behavior like this?

I’ve recognized that it gets better when only using short names in table header cells. Is it possible to access the content with didParseCell if (cell.content == 'Longname'){cell.content = 'LN'} and just rename long names? or is there maybe already something to truncate long titles?

Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
t-bookcommented, Sep 30, 2019

grazie will try!

0reactions
simonbengtssoncommented, Sep 30, 2019

Hmm I think you should set data.cell.text.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Trouble with landscape pdf attachment
Solved: Hi I try to make a PDF attachment in landscape. I make my template in google document in landscape but the PDF...
Read more >
Splitting a landscape spread into 2 portrait pages...
Typically, these PDFs have several pages where two facing portrait pages have been rendered as a single landscape spread; I need to split...
Read more >
How can I take text and convert to PDF with landscape ...
To put content into two (or more) columns, you can create your own document renderer, or use an existing ColumnDocumentRenderer which suits ...
Read more >
Question on rendering pdf using visual force
I have an issue rendering a pdf using visual force. It is a form with multiple rows and each row has multiple columns...
Read more >
rendered pdf not showing data table formatting
<apex:pageBlockSection columns="1" id="section2b" title="* Expiring Excess ... This is the problem with salesforce while rendering the pdf.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found