react-pdf-site icon indicating copy to clipboard operation
react-pdf-site copied to clipboard

Bulletpoints alignment problem in pdf

Open NatashaOsipenko opened this issue 2 years ago • 1 comments

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

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

... {htmlTextWithBullets}

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

Could you please assist with it?

NatashaOsipenko avatar Oct 19 '23 16:10 NatashaOsipenko

@NatashaOsipenko, Could you please provide some more code, I mean the exact code you have used to create the design in the screenshot (snippet)?

Image Here's the code for the above list:

<View style={{ marginTop: 10 }}>
    <Text style={{ fontSize: 10, fontWeight: "bold" }}>
      Key Points:
    </Text>
    <View style={{ fontSize: 10, marginLeft: 10 }}>
        <Text>• Point 1: Description of the first point.</Text>
        <Text>• Point 2: Description of the second point.</Text>
        <Text>• Point 3: Description of the third point.</Text>
    </View>
</View>

I am not able to re-create this issue.

playstore777 avatar Feb 26 '25 09:02 playstore777