Hi Team,
We are using Aspose PDF for converting HTML to PDF. We want PDF to have certain margins and Page size.
We are setting page size as Letter and margin as 0.5 inch. Its not applying margins for page.- There’s a lot of margin on the page than specified.
Please find the attached output PDF and code we are using. sampleCode.7z (197.5 KB)
@pthube
Do I understand correctly that you expected margin to be 0.5 inch size?
It seems that in case you set margin to 0 you’ll get expected result - it seems that it’s a minimal possible one (here’s for LeftMargin = 0) image.png (38.7 KB)
and this is result when you set all margins to 0 image.png (27.5 KB)
@pthube
I tried suggested code and recieved the following result sample_html_out.pdf (175.0 KB)
It appears to be normal, but font is indeed isn’t applied, it’s Times New Roman used instead
However in your case OpenSans is applied image.png (66.4 KB)
Some problems can be resolved with version update, if you not using the latest version you can try to resolve issue this way
Just to clarify, you are using the suggested code snippet after you converted the original html?