-
Notifications
You must be signed in to change notification settings - Fork 500
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
Allow a watermark image to be specified #727
Comments
The tricky part is that Prawn does not provide a hook when leaving a page. But we can simply iterate all the pages at the end and apply the watermark as a stamp. The proposed name for the property is The image will be applied on every page except for imported pages, which includes the title page. The reason we don't touch imported pages is that it can cause the PDF to become corrupt. |
…page-foreground-image attribute
Before we merge, which attribute do we like better?
I'm leaning towards the first since it's a) parallel with "background" and b) might not always be a watermark. |
…page-foreground-image attribute
…page-foreground-image attribute
Watermark is pretty poorly defined (and its meaning been distorted). So I think we should stick with |
…e using the page-foreground-image attribute or theme key
page-foreground-image and :page-foreground-image: seem to work for me, but I cannot get [opacity=50%] to work with either form (using .png or .svg image). The final .pdf always renders the watermark with 100% opacity blocking all text behind it. Any hint how to get this to work? |
Asciidoctor PDF doesn't apply opacity to the image. The opacity has to be in the image itself. |
A watermark image goes above the text, whereas a background image goes below the text. We could either introduce a dedicated setting for specifying a watermark, or we could add an option to the background image. However, since there's a chance the design will call for both, the separate option is probably the right approach.
The text was updated successfully, but these errors were encountered: