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

paddingHorizontal and paddingVertical silently throwing errors

Open AstralBaby opened this issue 5 months ago • 1 comments

Describe the bug When paddingHorizontal or paddingVertical are present, usePDF gets stuck in loading state without throwing any error.

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

Expected behavior As these properties are included in the types of StyleSheet.create it is expected for them to work without any problem, lastly if there are errors creating the stylesheet, we should get a feedback in the console.

Examples

  header: {
    width: "100%",
    // paddingHorizontal: 16,
    // paddingVertical: 10,
    fontSize: 12,
    fontFamily: "Nunito",
    fontWeight: 700,
    color: "#647D8E",
    flexDirection: "row",
    alignItems: "center",
    justifyContent: "space-between",
  }

Desktop (please complete the following information):

  • OS: Tested on MacOS
  • Browser: Tested on Safari, Brave, Edge and Chrome (yup :()
  • React-pdf: 3.1.4

AstralBaby avatar Jul 28 '25 14:07 AstralBaby

You need specify the units: https://github.com/diegomura/react-pdf/issues/3171#issuecomment-3115313922

Andres6936 avatar Jul 28 '25 20:07 Andres6936