Giving margin while converting HTML to PDF
Copy link to clipboard
Copied
How can we set margins in the PDF during conversion from HTML file>
Copy link to clipboard
Copied
Thanks for reaching out. As of now we do not support setting custom margins in the PDF document through our SDKs. At the moment you can only provide custom height and width while converting your HTML to PDF document ( refer this sample for the same :- https://github.com/adobe/pdftools-java-sdk-samples/blob/master/src/main/java/com/adobe/platform/oper...)
Copy link to clipboard
Copied
We are using html to pdf to create business cards which are 3.5in x 2in. The hard corded margins are something like .5 inches and so we have very little room for the content on the business card. Can we please have an update that allows us to specify a custom margin size? Or, if that is too much to ask, can we please have an automatic margin size that adjusts down to something like .25 inch if the page size is smaller than 3in x 5in?
Copy link to clipboard
Copied
Okay kids, we solved this problem by creating our PDF with width and height that is 4 times the true size, which winds up giving us the equivalent of 1/8 inch margins. This is because our PDFs are business cards and when you load them into a print job they get shrunk to 1/4 the size to fit onto a standard business card. So there you go - just hack it!

