cakebake / markdown-themeable-pdf

ARCHIVED. NOT MAINTAINED. Themeable Markdown Converter (Print to PDF, HTML, JPEG or PNG)
https://atom.io/packages/markdown-themeable-pdf
133 stars 37 forks source link

Table text-align PDF Export #109

Closed markus-kraemer closed 5 years ago

markus-kraemer commented 6 years ago

|:----|----|----:| etc. doesn't work in the PDF-export.

cakebake commented 6 years ago

Not enough information

partnerwerk commented 5 years ago

I am trying to get this table rendered with right aligned columns. But they do not get aligned right. Do they get a css class so I can style them?

|   Datum    | Kontostand |
|:---------- | ----------:|
| 17.10.2018 | € 1.986,49 |
| 15.1.2019  | € 1.421,26 |
bildschirmfoto 2019-01-18 um 18 38 55
cakebake commented 5 years ago

Hello @partnerwerk,

the best way to do this, is to export with markdown-themeable-pdf to HTML and then inspect the HTML.

I've added this issue as ~question for ~v2 and will check the markdown specs for the text-align option. It must also be checked if the used modules support this feature.

partnerwerk commented 5 years ago

The HTML output is ok. It looks like this:

<tr>
<td style="text-align:left">text</td>
<td style="text-align:left">text</td>
<td style="text-align:right">text</td>
<td style="text-align:right">text</td>
</tr>

However the created pdf has no right text align as one might expect from this source.

cakebake commented 5 years ago

That's right ... weird behavior ...

Generated HTML

image

Generated binary

test

..., but I found the reason:

If you need the change immediately, I would recommend you to edit the following file and remove the highlighted code area. Then you have to restart Atom. The package files are locatet in your atom/packages folder.

The code above should prevent ugly table breaks when they span multiple pages. But it did not help, because it's a common Chromium / Phantomjs problem.

The version you are using is no longer being developed. In version 2, everything fits already. This will be published soon.