wojtekmaj / react-pdf

Display PDFs in your React app as easily as if they were images.
https://projects.wojtekmaj.pl/react-pdf
MIT License
9.11k stars 867 forks source link

Incorrect alignment in html list bullets #1646

Closed NatashaOsipenko closed 9 months ago

NatashaOsipenko commented 9 months ago

Before you start - checklist

Description

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

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

Could you please assist with it?

Steps to reproduce

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>

Expected behavior

Bullets should be aligned correctly

Actual behavior

Bullets are aligned incorrectly

Additional information

No response

Environment

wojtekmaj commented 9 months ago

It looks like you confused React-PDF with @react-pdf/renderer. Please file an issue in their repo instead.