Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF DPI Setting Option #731

Open
carterdewberry opened this issue Jan 22, 2025 · 1 comment
Open

PDF DPI Setting Option #731

carterdewberry opened this issue Jan 22, 2025 · 1 comment

Comments

@carterdewberry
Copy link

Hello, my exported pdf is blurry, both text and hi-res images. Is there a solution for this? It looks crisp in the html rendering. I appreciate your assistance.

Code:
const opt = {
margins:[30,30,30,30],
jsPDF: { unit: 'pt', format: a4, orientation: 'landscape' },
pagebreak: { before: pageBreakBefore, after: pageBreakAfter }
};
html2pdf().from(element).set(opt).save();

@ismayil-musayev
Copy link

Try adding html2canvas: { scale: 3 }

const opt = {
  margins:[30,30,30,30],
  jsPDF: { unit: 'pt', format: a4, orientation: 'landscape' },
  pagebreak: { before: pageBreakBefore, after: pageBreakAfter },
  html2canvas: { scale: 3 }
};
html2pdf().from(element).set(opt).save();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants