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

paragraph from MUI multiline component

Open sgavathe opened this issue 3 years ago • 0 comments

With the Material UI Multiline Component with the paragraph mentioned below, it breaks the PDF

Steps to reproduce the behavior including code snippet (if applies):

  1. Under Material UI Text component, add the below sample text
ijklhglkgfnslkgnsdlkgnsdk gnsdlkgnsdfklfgnsdkgskglkgdsgnslgnsdklgslkgsdlgnsdlgnsdlgnsdljgnsdljgnsljgsdjgnsjlgnsdflgnsdflgnlgjnjn hiuosuhsofnsof

hiuosuhsofnsof

fluafbklasbfujoaf

KLUuoafbaskfbauofbauof

LUBDKLABDKASBDKLADBSASDBADBAJSD
  1. With the SPACE + NEW LINE , the pdf breaks with the below error in the screenshot.
  2. Apologies if I am not giving enough content to be able reproduce the error.
  3. Material UI Text component is very simple
<TextField
          label={DISPLAY_STRINGS.acquiree_description}
          name="description"
          multiline
          maxRows={5}
          className={caseClasses.multilineLarge}
        />

You can make use of react-pdf REPL to share the snippet

Expected behavior Export a PDF with the text above

Screenshots image

Desktop (please complete the following information):

  • OS: Windows
  • Browser [edge, chrome]
  • React-pdf version ^2.1.2

sgavathe avatar Sep 01 '22 18:09 sgavathe