stackedit icon indicating copy to clipboard operation
stackedit copied to clipboard

Tables in PDF Export Broken

Open philip-ulrich opened this issue 7 years ago • 15 comments

See title. Here is an example of the issue:

example

This happens on a page break in the middle of a table.

philip-ulrich avatar Dec 10 '16 23:12 philip-ulrich

Same here. Need Help.

nypgand1 avatar Jan 06 '17 03:01 nypgand1

Having the same problem.

mesutk avatar Feb 13 '17 15:02 mesutk

Confirmed that this issue still exists

nullku7 avatar May 09 '17 00:05 nullku7

Do you still have that in the v5?

benweet avatar Nov 05 '17 12:11 benweet

Yes, I'm still having it in v5.3.0 of your https://stackedit.io/app . If it wasn't for this, and for the lack of TOC in v5, it would have been perfect.

jurchiks avatar Nov 30 '17 15:11 jurchiks

A workaround is to use page breaks: <div class="page-break-after"></div>

@jurchiks in the v5 you can insert a Table of Contents in your template. Have a look at the "Styled HTML with TOC" template for a concrete example.

benweet avatar Nov 30 '17 17:11 benweet

That TOC is not the same, I want my TOC to be below the main header and a couple other things, but that template does not allow putting TOC inside content.

Page breaks are useless if you can't see each page in the preview. If you have to generate the PDF and fix every page after that, it's too much work that you have to do every time you change something. I'd rather use wkhtmltopdf to generate the PDF from your HTML, but this is also broken - the PDF is huge and its contents can't be selected (this seems to be caused by woff fonts, which your stylesheet uses and wkhtmltopdf obviously prefers them; I will probably try to rip your stylesheet and remove the woff fonts from it to check if that fixes the generated PDF). As such, at the moment I have no good solution and I will probably be looking into other ways of generating HTML from markdown and afterwards wkhtmltopdf'ing the result.

jurchiks avatar Nov 30 '17 17:11 jurchiks

Update: removing woff fonts did fix both the huge file and the unselectable content problems, as well as the repeating table headers (wkhtmltopdf v0.12.2.4), but TOC requires more work.

jurchiks avatar Dec 04 '17 08:12 jurchiks

I am using StackEdit for company documentation. Which need to exported to PDF. In PDF, 'StackEdit' in header and 'https://stackedit.io/app#' in footer show up. How could I get rid of them?

amberP1 avatar Mar 16 '18 17:03 amberP1

@jurchiks Would you mind sharing how you worked around this problem / removed WOFF fonts? Did you just copy/paste the style.css file and delete all the @font-face entries?

jacobq avatar Apr 05 '18 15:04 jacobq

I deleted the parts of the @font-faces that referred to .woff files.

jurchiks avatar Apr 05 '18 18:04 jurchiks

Is the bug actually still prevalent? It's been 5 months already!

jurchiks avatar Apr 05 '18 18:04 jurchiks

Confirmed this is still an issue.

Jelkster avatar Aug 03 '19 12:08 Jelkster

For anyone still suffering from this issue I added the following to a copy of the Styled HTML template to resolve the issue:

<style type="text/css">
    table { page-break-inside:auto }
    tr    { page-break-inside:avoid; page-break-after:auto }
    thead { display:table-header-group }
    tfoot { display:table-footer-group }
</style>

svo avatar Sep 22 '19 20:09 svo

For anyone still suffering from this issue I added the following to a copy of the Styled HTML template to resolve the issue:

<style type="text/css">
    table { page-break-inside:auto }
    tr    { page-break-inside:avoid; page-break-after:auto }
    thead { display:table-header-group }
    tfoot { display:table-footer-group }
</style>

This worked perfectly. Thank you!

Nicicalu avatar Jun 15 '22 06:06 Nicicalu