barryvdh / laravel-snappy

Laravel Snappy PDF
MIT License
2.63k stars 290 forks source link

Colours fine on initial load of PDF, then on zoom they appear to change to CMYK and go dull #482

Closed louislawrence77 closed 1 year ago

louislawrence77 commented 2 years ago

Hi there,

New to Github, so please excuse any etiquette misdemeanours!

Our dev team have coded up a nice shiny certificate with some dynamic values for the users on our website.

When sending the HTML for the certificate into Snappy, it's throwing out a font issue where on zoom they appear to change from RGB to CMYK and go dull.

I've attached the PDF for reference.

Thank you in advance for your time helping on this one as we're stumped!

Kind regards,

Louis

HTML Code certificate_v1.zip

PDF Produced certificate-v2.pdf

Good Colour: image

Bad Colour: image

Code to invoke Snappy

Route::get('/report', function(){

    $pdf = PDF::loadView('report.page1')
    ->setPaper('A4')
    ->setOption('margin-bottom', 0)
    ->setOption('margin-top', 0)
    ->setOption('margin-left', 0)
    ->setOption('margin-right', 0)
    ->setOption('zoom', 0.3999);

    return $pdf->stream('page1.pdf'); 
});
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any issues with PDF rendering itself that are not directly related to this package, should be reported on https://github.com/KnpLabs/snappy instead. When having doubts, please try to reproduce the issue with just snappy. If you believe this is an actual issue with the latest version of laravel-snappy, please reply to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.