Code Monkey home page Code Monkey logo

Comments (3)

RKukharchuk avatar RKukharchuk commented on May 24, 2024 5

After future inverstigations it looks like it's related to fonts resolution of text.
Downgrading @react-pdf/layout to 3.11.5 helps to resolve the issue

from react-pdf.

Fry98 avatar Fry98 commented on May 24, 2024

@RKukharchuk Are you on Intel or Apple Silicon Mac? I'm on Macbook Air M3 and have still encountered this issue.

from react-pdf.

focux avatar focux commented on May 24, 2024

I'm on Apple Silicon and I'm also having this issue, downgrading @react-pdf/layout made it work for me.

If anyone is wondering about how to do it, this how you do it with PNPM, update your package.json to resolve the layout version that we want:

"pnpm": {
    "overrides": {
      "@react-pdf/layout": "3.11.5"
    }
  },

from react-pdf.

vincentanu04 avatar vincentanu04 commented on May 24, 2024

Can someone help me with this? I am a beginner, thanks in advance!

This is my code:


const styles = StyleSheet.create({
  boldText: {
    fontWeight: 700,
  },
  normalText: {
    fontWeight: 400,
  },
});

<Text style={{ display: 'flex', width: '100%' }}>
      <Text style={styles.boldText}>{title}</Text>
      <Text>:{'  '}</Text>
      <Text style={styles.normalText}>{data}</Text>
</Text>

I have downgrade react-pdf/renderer to a version (3.4.2) which uses react-pdf/layout version 3.11.5. However, this issue still persists.
Below is my package.json:

{
"name": "cv-builder",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@react-pdf/renderer": "^3.4.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@vitejs/plugin-react": "^4.2.0",
"eslint": "^8.53.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.4",
"npm-force-resolutions": "^0.0.10",
"vite": "^5.0.0"
},
"resolutions": {
"@react-pdf/layout": "3.11.5"
}
}

from react-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.