danomatic / react-pdf-html

Render HTML in react-pdf
MIT License
154 stars 37 forks source link

Incorrect alignment in html list bullets #69

Open NatashaOsipenko opened 5 months ago

NatashaOsipenko commented 5 months ago

Hi, I am using react-pdf and react-pdf-html to create a pdf. My pdf contains html text with list, wrapped in tag

import { Document } from '@react-pdf/renderer' import Html from 'react-pdf-html'

const htmlTextWithList = <div>Datenimport gem&auml;ss vorheriger Definition</div><ul><li>Definition Importformat</li><li>Import der angelieferten Kontaktdaten f&uuml;r weiteren Einsatz in colada</li><li>Anlieferung der Daten in Excel oder CSV</li><li>Qualit&auml;t der Daten muss durch Auftraggeber sichergestellt werden</li></ul>

<Document> ... <Html>{htmlTextWithList}</Html> ... </Document>

As as result I have following problem. Bullets have incorrect alignment

Screenshot 2023-10-19 at 18 52 44

Browser (if applicable): Chrome Version 116.0.5845.187 React-PDF version: 3.1.12 React version: 18.2.0 Webpack version (if applicable):5.75.0 react-pdf-html version:1.1.18

Could you please assist?

sohamsshah commented 5 months ago

I can second this. Facing the same issue

image
maximohneilian commented 2 months ago

I can second this. Facing the same issue image

same for me.

Is this going to be fixed?

BrosnanRiley commented 1 month ago

Hi, I am using react-pdf and react-pdf-html to create a pdf. My pdf contains html text with list, wrapped in tag

import { Document } from '@react-pdf/renderer' import Html from 'react-pdf-html'

const htmlTextWithList = <div>Datenimport gem&auml;ss vorheriger Definition</div><ul><li>Definition Importformat</li><li>Import der angelieferten Kontaktdaten f&uuml;r weiteren Einsatz in colada</li><li>Anlieferung der Daten in Excel oder CSV</li><li>Qualit&auml;t der Daten muss durch Auftraggeber sichergestellt werden</li></ul>

<Document> ... <Html>{htmlTextWithList}</Html> ... </Document>

As as result I have following problem. Bullets have incorrect alignment Screenshot 2023-10-19 at 18 52 44

Browser (if applicable): Chrome Version 116.0.5845.187 React-PDF version: 3.1.12 React version: 18.2.0 Webpack version (if applicable):5.75.0 react-pdf-html version:1.1.18

Could you please assist?

Hopefully you already found a fix, but when I updated the module to 1.3.7 this had been resolved