Hello,
I am having trouble with the generation of a PDF using PrintToPDF_Advanced. I am sending a URL that displays correctly and generating pdf with UltimatePDF O11 works correct. I attach an image:
The results using ODC are these:
I have reviewed the gitlab files and ODC and O11 components are using different chromium to render. I don't know where the issue is coming from but I tried to fix it with CSS and modifying HTML and didn't succeed.
Can you lend me a hand?
Thanks!
@David Linares
The symptoms look font/rendering related, although it's hard to confirm without seeing the HTML/CSS.
A few things I would try:
Test with a standard font (Arial/Roboto) to see if the issue disappears.
Verify that all font files (woff2, woff, ttf) are publicly accessible from the PDF generation context.
Check if any CSS such as letter-spacing, font-stretch, or custom font weights are being applied differently.
Try forcing UTF-8 encoding in the HTML () if not already present.
Compare the Chromium version used in O11 vs ODC, as rendering differences between versions can sometimes affect fonts.
If you can share the font family and a sample of the generated HTML/CSS, it may be easier to identify the root cause.
Thanks and Regards,Akshay Deshpande
We have tried this and got good results.
So it is certainly related to the fonts and css.
The PDF we are generating is from our O11 environment, the fonts are allocated there, they should be accesible. We have activated the logs from the UltimatePDF action and seemed correct:
{
"method":"Network.responseReceived",
"params":{
"requestId":"24.155",
"loaderId":"BE9554D13B8B1F438C76B493EBBD5172",
"timestamp":29.041363,
"type":"Font",
"response":{
"url":"https://***.****.***/PlaDocent/UOC_Fonts/UOCSans-Regular.woff2?biYMy0aR1Yc2AiF+yGXe4w",
"status":200,
"statusText":"OK",
"mimeType":"application/font-woff2"
}
We are using in some fonts:
font-weight: 400;
font-style: italic;
Yes, we are using UTF-8
We checked the difference between their NuGets and this is what we gotO11 --> Puppeterharp 20.2.0 and PDFSharp 6.2.0ODC -->HeadlessChromium.Puppeteer.Lambda.Dotnet 1.1.0.97 and PDFSharp 6.2.0
The fonts we are using are https://tipografies.com/custom-type/uoc