I have here two images:

First is the view coded sample.php under TCPDF (that's understandable)

enter image description here

Second is the view which will display after Ctrl+P is typed (in Chrome):

enter image description here

How do I make the print view the same on the first image? Does this have something to do on my code in sample.php? Any advice is really appreciated and may add new learning to me. Thanks.

有帮助吗?

解决方案

Printers generally have a default offset so Chrome is applying that additional offset to your PDF before printing it.

You might have to change some settings in your print driver but to start try unchecking Fit to page

enter image description here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top