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

Setting background image to the doc #771

Open
henrique-voni opened this issue Jan 8, 2018 · 7 comments
Open

Setting background image to the doc #771

henrique-voni opened this issue Jan 8, 2018 · 7 comments

Comments

@henrique-voni
Copy link

Is it possible to set a background image to the doc? I couldn't do it.

Thanks.

@audiolion
Copy link

Also curious about this

@nrkn
Copy link

nrkn commented Apr 23, 2018

Draw an image that's the same size as the page before you add anything else

@MichaelQ1an
Copy link

@nrkn when I tried what you said, the added text always appears below the image that I draw first. Is there a way the text floats on top of the image?

@MichaelQ1an
Copy link

I've solved the problem after setting x/y/width/height properties of the image. No worries.

@ajit-soman
Copy link

You can try this. It works for me

doc.image(img, 0,0, {width: doc.page.width, height: doc.page.height});

@mtarique
Copy link

but how to display text over it

@daliusd
Copy link

daliusd commented Sep 28, 2024

@ajit-soman answer is correct. doc.text accepts position so you can position text anywhere in the page. I am not sure why this issue is opened still.

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

7 participants