Open rohit121308 opened 9 months ago
Please note that when the page is printed to a PDF file, it is rendered with a different width. And obviously, the web page renders differently in different page widths.
@ZekeLu can you please let me know what should i do as i want to create pdf, i tried adjusting page margin's also...
This is more about how to design the page so that the layout is what you want when it's printed to a PDF file. I can not tell what to do without seeing your real page.
Generally, you can preview your design in the print preview dialog. For example, this is what it looks of this page in the print preview dialog:
You can start with this.
@page {
size: A4;
margin: 1.1em 0;
}
@media print {
html,
body {
width: 210mm;
font-size: 14px;
}
}
What versions are you running?
What did you do? Include clear steps.
I want to capture html from a url, in which i have dynamic content which is being rendered from api, html which is being captured is correct but the pdf which is being created is not in proper format, please have a look on the code which is being used for it
What did you expect to see?
This is the original image which should be displayed -> https://nimb.ws/seJrxv
What did you see instead?
This is the result which i am getting in the pdf -> https://nimb.ws/q24yRQ, https://nimb.ws/EufcAJ