BCcampus / pressbooks-mpdf

[UNMAINTAINED] open source HTML to PDF conversion
GNU General Public License v2.0
7 stars 7 forks source link

Missing table in export #71

Open youthelectronix opened 5 years ago

youthelectronix commented 5 years ago

Description

Table is not appearing in an mPDF export.

Pressbooks version

screen shot 2018-11-15 at 12 57 06 pm

text editor

screen shot 2018-11-15 at 3 34 38 pm

mPDF version

screen shot 2018-11-15 at 12 56 44 pm

System Information

bdolor commented 5 years ago

thank you @youthelectronix - will take a look!

josieg commented 5 years ago

TLDR: I think the problem is in the attributes/values within the <Table> element that @youthelectronix is using. Tables created with the current default Pressbooks markup export no problem in mPDF. And when I removed style="width: auto;" from the table element, I was able to export the table in mPDF.

So I don't know if this is a bug or if the table just needs to be recreated using the updated Pressbooks markup. Here are the specifics of what I found:

When I used the following table markup, which is the deafult table markup I get when I create a new table in Pressbooks, I have no problems exporting a table in mPDF:

HTML view: mpdftablenormalmarkup mPDF view: mpdftablenormalmarkup1

However, when I imitate the html provided in the above example, I get the following:

HTML view: mpdftableabnormalmarkup Visual Editor view: mpdftableabnormalmarkupve MPDF view: mpdftableabnormalmarkup1 **Note that I also tried creating the table using the same width="XXpx" values used in the previous example, but that did not affect the mPDF output.

When I removed style="width: auto;" from the table element, I get the following:

HTML view: mpdftablesimplemarkup mPDF view: mpdftablesimplemarkup1

josieg commented 5 years ago

And I forgot to compare behaviour to Prince.

The style="width: auto;" is not a problem in Prince PDF exports. Table elements with that attribute/value appear fine, so this is definately a mPDF problem.