This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Version 2 allignment issue in PDF

rati098 wrote on 2019-01-21:
Hi,

Now we are using Version 1 (licensed) in php.
In the process of upgrading to Version 2, We have created one trial and facing some issues as described below.

1 - Custom Font does not looks like correct.
2 - Looks like few css code is not taking its effect.

Please find below HTML code and generated PDF.
HTML - https://drive.google.com/file/d/1QU6V-zOtX4XCrt8cv_J8onMOvDYjsd0K/view?usp=sharing
PDF - https://drive.google.com/file/d/1FttrQR0J3KPBXt6cP15bTQuEIY1_ENd2/view?usp=sharing

Note that its working fine in Version 1.

Thanks,
Ratikant
support wrote on 2019-01-21:
Hi Ratikant,

Thank you for your interest in API v2.

API v2 is more secure than v1 so it applies CORS policy.
You have to add "Access-Control-Allow-Origin: *" HTTP header to your font files. See details in our FAQ.

You can see the loading errors in the debug log:
-- https://pdfcrowd.com/api/method-index/#html_to_pdf_set_debug_log
Please check the debuge log. It contains a lot of errors in your HTML.

You can also check our examples project. It has the sample code with a custom font in all supported languages:
-- https://github.com/pdfcrowd/pdfcrowd-examples