Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with box shadow #79

Open
mildfuzz opened this issue Oct 17, 2024 · 10 comments
Open

Issue with box shadow #79

mildfuzz opened this issue Oct 17, 2024 · 10 comments

Comments

@mildfuzz
Copy link

My PDF looks like this:

image

My PNG looks like this:
image

Using these deps:

        make=4.4.1-r2 \
        gcc=13.2.1_git20240309-r0 \
        g++=13.2.1_git20240309-r0 \
        python3=3.12.7-r0 \
        pixman-dev=0.43.2-r0 \
        cairo-dev=1.18.0-r0 \
        pango-dev=1.52.2-r0 \
        giflib-dev=5.2.2-r0 \
        libjpeg-turbo-dev \
        nss=3.104-r0 \
        freetype=2.13.2-r0 \
        harfbuzz=8.5.0-r0 \
        chromium
@moshensky
Copy link
Owner

👋

Could you attach a sample pdf please? I want to try to reproduce it by adding a new test.

@mildfuzz
Copy link
Author

@mildfuzz
Copy link
Author

if it helps, the docker image is based on node20-alpine

@mildfuzz
Copy link
Author

test new
This is the resulting snapshot

@moshensky
Copy link
Owner

Hi @mildfuzz,

I've looked into the issue, and I suspect the root cause lies deeper within node-canvas and/or cairo, as these libraries provide the HTML canvas element API in Node.js. Several related PDF-to-PNG libraries that rely on the same dependencies produce similar results as this one.

I expect node-canvas to release version 3 in the coming months, and I plan to test it when it’s available. Additionally, I want to explore a few other open-source tools for converting PDFs to PNGs that have permissive licenses in the future.

Unfortunately, all of this requires more time and effort than I can currently allocate. Given the situation, I won't be able to dedicate further time to investigating this issue in the near future.

@mildfuzz
Copy link
Author

Okay, thanks for investigating though

@GrayedFox
Copy link

GrayedFox commented Nov 27, 2024

Hi there @mildfuzz I recently had to overwrite the canvas version being used by this lib to be the current LTS version (not the release candidate) due to another different dependency specifying an earlier version, which I did via the override property of our root package.json file.

If that's an option maybe give that a go?

@mildfuzz
Copy link
Author

TBH I am reluctant to go adding overrides as the consensus is we can live with it as is for now. Really, so long as the test highlights changes to the copy, we're good. This is a nice to have

@moshensky
Copy link
Owner

I've just released new version 0.13.0 with all dependencies updated. Maybe it will help?

@mildfuzz
Copy link
Author

Upgrading didn't remove the shadow issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants