Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bold or Italic incorrect adds new line in pdf #10

Closed
dannynicolas opened this issue Aug 30, 2019 · 6 comments
Closed

Bold or Italic incorrect adds new line in pdf #10

dannynicolas opened this issue Aug 30, 2019 · 6 comments

Comments

@dannynicolas
Copy link

Version: v.1.0.6

It seems that using mutiple tags translates poorly to pdfmake.

eg. if this data sent to html-to-pdfmake:

<ul><li> Excepturi quos <strong>accusantium</strong> autem impedit. </li></ul>

It gets printed in the pdf as three lines:

  • Excepturi quos
    accusantium
    autem impedit.

It should be:

  • Excepturi quos accusantium autem impedit.
@Aymkdn
Copy link
Owner

Aymkdn commented Aug 30, 2019

I've just left on vacation for two weeks. I'll have a look at it on my return.

@Aymkdn
Copy link
Owner

Aymkdn commented Sep 14, 2019

Mmhhh... Actually, how do you do it with pure PDFMake code? Because whatever I tried on http://pdfmake.org/playground.html it always has the same behavior...

So, could you share the PDFMake code you use?

@Aymkdn
Copy link
Owner

Aymkdn commented Sep 14, 2019

Nevermind, I finally found it :

ul: [
      {text: [
         text: ' Excepturi quos ', marginLeft: 5 },
          { text: 'accusantium', bold: true },
          { text: ' autem impedit. ' }
     ]}
]

I'm working on it now.

Aymkdn added a commit that referenced this issue Sep 14, 2019
- Fixed issue #7
- Fixed issue #8
- Fixed issue #10
- Fixed issue #11
@Aymkdn
Copy link
Owner

Aymkdn commented Sep 14, 2019

That should be resolved with v1.0.7

@Aymkdn Aymkdn closed this as completed Sep 14, 2019
@ivesdebruycker
Copy link

ivesdebruycker commented Oct 18, 2021

Actually, this is still an issue with nested lists:

<ul>
  <li> Excepturi quos <strong>accusantium</strong> autem impedit. 
    <ul>
      <li> Excepturi quos <strong>accusantium</strong> autem impedit. </li>
    </ul>
  </li>
</ul>

The first item is split in 3 lines (subitem is 1 line, as it should).

A quick temporary "solution" (and depending on your style):

<ul>
  <li> Excepturi quos <strong>accusantium</strong> autem impedit.</li>
</ul>
<ul><li><ul><li> Excepturi quos <strong>accusantium</strong> autem impedit.</li></ul></li></ul>

Aymkdn added a commit that referenced this issue Oct 19, 2021
Fix issue #10
@Aymkdn
Copy link
Owner

Aymkdn commented Oct 19, 2021

It should be resolved with v2.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants