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

Adding PNG to document redirects to #blocked #2687

Closed
dano1066 opened this issue Mar 2, 2020 · 3 comments
Closed

Adding PNG to document redirects to #blocked #2687

dano1066 opened this issue Mar 2, 2020 · 3 comments

Comments

@dano1066
Copy link

dano1066 commented Mar 2, 2020

I am trying to add an image to a pdf document. This code works fine with a jpg and i can also do it using the sample PNG file in this projects examples folder. Any other png i have doesnt work. It will redirect the page and #blocked will appear in the URL.

pdfdoc.addImage(base64img, "PNG", padding, yPadding, width - (padding*2), height);

In the console i see

Navigated to about:blank

@HackbrettXXX
Copy link
Collaborator

Please provide the image so we can test it.

@dano1066
Copy link
Author

dano1066 commented Mar 2, 2020

Here is a sample image that i see causing this issue

https://www.pngitem.com/pimgs/m/505-5058955_sample-png-images-sample-png-transparent-png.png

what would cause the redirect with #blocked in the url? this seems like some baked in behavior rather than something that a specific image would cause

Edit: I opened this png in ms paint and resaved it as a png and it works now. I dont know what ms paint does to the image file. The image size went from 100kb to 141kb so paint made the file bigger. size definitely isnt the issue.

@github-actions
Copy link

github-actions bot commented Jul 3, 2020

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

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

No branches or pull requests

2 participants