question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML Content not scale to the A4 size. Content smaller than browser view.

See original GitHub issue

When button onclick run the export_form() function, what I miss up? The content is not as like in the browser view. It’s smaller from my browser.

untitled

function export_form(){
	console.log('export');

	var pdf = new jsPDF("p", "pt", "a4");
	pdf.addHTML($('#container_section'), 15, 15, function() {
		console.log('export');
	  pdf.save('web.pdf');
	});
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

36reactions
kgrosvenorcommented, Sep 3, 2019

use particular size of a4 shit var pdf = new jsPDF(‘l’,‘mm’,[297, 210]);

It will work

Sheet * not shit 😉

10reactions
Uzlopakcommented, Oct 23, 2017

The browserview is depending on your css etc… So if your html-code or css is faulty, what do you expect you get in the pdf?

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML Content not scale to the A4 size. Content smaller than ...
The content is not as like in the browser view. It's smaller from my browser. untitled. function export_form(){ console.log('export'); var pdf = ...
Read more >
How to make a HTML Page in A4 paper size page(s)?
Basically I create a page of body "width: 200mm;" and container of height: 290mm (smaller than A4). Then I used page-break-after: always; so ......
Read more >
Fit print preview to viewer size (html) - Telerik Forums
The problem is that this is an A4 landscape report and my site has to have a fixed width that is less than...
Read more >
Scaled/Proportional Content with CSS and JavaScript
What we don't get (easily, anyway) is a way to scale whole element (and it's children) proportionally—retaining its exact layout as it changes ......
Read more >
CSS to set A4 paper size | Edureka Community
page element results in scaling of the page content. ... To resolve this issue, just set the A4 paper width and height to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found