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

opacity option not working for drawPage? #553

Closed
hdwong opened this issue Aug 6, 2020 · 6 comments
Closed

opacity option not working for drawPage? #553

hdwong opened this issue Aug 6, 2020 · 6 comments
Labels

Comments

@hdwong
Copy link

hdwong commented Aug 6, 2020

I try to embed a pdf file into the page, when I use the page.drawPage function and set the option object property opacity, it does not reflect any of the value I set.

page.drawPage(embedContent, {
  x,
  y,
  width,
  height,
  opacity,

});

But I found PDFPageDrawPageOptions in https://pdf-lib.js.org/docs/api/interfaces/pdfpagedrawpageoptions, it has the opacity property defined.

Did I miss something?

Thank you.

@Hopding
Copy link
Owner

Hopding commented Aug 6, 2020

@hdwong Can you please share a document and some code that I can use to reproduce the issue?

@hdwong
Copy link
Author

hdwong commented Aug 7, 2020

I forked your example code in the following link: https://jsfiddle.net/ouz0cjqw/2/

The American flag covers the text area and the opacity property has no effect.

@hdwong
Copy link
Author

hdwong commented Aug 12, 2020

@Hopding Is this problem a bug? Can you please help me? Thank you very much!

@jonnyfluckey
Copy link

Curious to see if there was been any additional work on this issue? I am also having an issue with the Opacity. I also attempted to update the example JFiddle, and the opacity would not change when updated

@nimmc
Copy link

nimmc commented Aug 5, 2021

Is this one fixed? I also have this problem. No matter what value I set in opacity it seems there's no change at all.

@Hopding
Copy link
Owner

Hopding commented Sep 24, 2021

Added this to the roadmap for tracking: #998.

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

No branches or pull requests

4 participants