You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
even though issue #1 is closed, it still does not work for me. The column width seems to be calculated based on header text length, not the actual header length (including spaces).
This is the table in question:
| Nummer | Beschreibung des Tests | Ergebnis |
| ------- | ------------------------------------------------- | --------- |
|1|Status der postgres instanzen auf dem Cluster|Ok|
This is how it looks in the PDF.
I also tried this:
| Nummer | Beschreibung des Tests | Ergebnis |
| ------- | --------------------------------------------- | --------- |
| 1 | Status der postgres instanzen auf dem Cluster | Ok |
with the same result.
This is how I generate the PDF:
markdown:=goldmark.New(
goldmark.WithRenderer(
pdf.New(
pdf.WithTraceWriter(os.Stdout),
pdf.WithContext(context.Background()),
pdf.WithHeadingFont(pdf.GetTextFont("IBM Plex Serif", pdf.FontLora)),
pdf.WithBodyFont(pdf.GetTextFont("Open Sans", pdf.FontRoboto)),
pdf.WithCodeFont(pdf.GetCodeFont("Inconsolata", pdf.FontRobotoMono)),
),
),
goldmark.WithExtensions(extension.GFM, extension.Table), // required for tables
)
// now the actual rendering to PDFvarbuf bytes.Bufferiferr:=markdown.Convert(mdsource, &buf); err!=nil {
returnfmt.Errorf("failed to render markdown to pdf: %w", err)
}
This is the relevant debug output:
[Table (entering)]
-[TableHead (entering)]
--[TableCell (entering)]
---[Text] Nummer
---[... table header cell] Width=74.256, height=14
--[TableCell (leaving)]
--[TableCell (entering)]
---[Text] Beschreibung des Tests
---[... table header cell] Width=156.56400000000002, height=14
--[TableCell (leaving)]
--[TableCell (entering)]
---[Text] Ergebnis
---[... table header cell] Width=73.32, height=14
--[TableCell (leaving)]
-[TableHead (leaving)]
-[TableRow (entering)]
--[TableCell (entering)]
---[Text] 1
---[... table body cell] Width=74.256, height=14
--[TableCell (leaving)]
--[TableCell (entering)]
---[Text] Status der postgres instanzen auf dem Cluster
---[... table body cell] Width=156.56400000000002, height=14
--[TableCell (leaving)]
--[TableCell (entering)]
---[Text] Ok
---[... table body cell] Width=73.32, height=14
--[TableCell (leaving)]
-[TableRow (leaving)]
[Table (leaving)]
So it seems like the cell width of the second column matches the one of the header. But the rendered result tells another story.
The text was updated successfully, but these errors were encountered:
Hi,
even though issue #1 is closed, it still does not work for me. The column width seems to be calculated based on header text length, not the actual header length (including spaces).
This is the table in question:
This is how it looks in the PDF.

I also tried this:
with the same result.
This is how I generate the PDF:
This is the relevant debug output:
So it seems like the cell width of the second column matches the one of the header. But the rendered result tells another story.
The text was updated successfully, but these errors were encountered: