Comments (8)
Draftwatermark by current standards has many limitations. One of them is that you cannot fine control the "depth" where the watermark is placed.
Fixing this issue would require a thorough rewrite of the code, that unfortuntately cannot be on my radar due to lack of time.
My suggestion is to use Koma script scrlayer to achieve the desired goals in all cases where draftwatermark is currently insufficient.
from latex-draftwatermark.
Can you please provide a little testcase? I am currently updating the draftwatermark package and if possible I would like to take the occasion to look into this matter.
from latex-draftwatermark.
A new version of draftwatermark is out (release 3.0). On new LaTeX formats (Autumn 2020) it uses a different mechanism to put the watermark on the page. This should assure that the watermark is actually always on the background. If you have a new enough LaTeX system, can you give it a try and report back?
from latex-draftwatermark.
Hi Sergio, Thank you very much for your contributions and the draftwatermark package.
I believe I have a reasonable MWE test case that shows the issue when pdfpages
is used with draftwatermark
. Here the watermark is placed on top of the included PDF but behind other files.
MWE tex file
\documentclass[]{article}
%Packages
\usepackage{pdfpages}
\usepackage[stamp,color=red!10]{draftwatermark}
\usepackage{lipsum}
\usepackage[T1]{fontenc} % use T1 encoded fonts in output -- 256 glyphs vs. 128, also <> symbols work
\usepackage[utf8]{inputenc} % allow for utf8 encoding in the .tex files
\usepackage{lmodern} % use latin modern font (updated replacement vs. cm), have to load AFTER fontenc
\begin{document}
\textbf{Watermark is under the text}
\lipsum[1-3]
\textbf{In the following page, the watermark is over the inserted PDF:}
\clearpage
\includepdf[pages={1-}, %Select pages from 3 onward to end
scale=0.86, %Tweak scale to fit within margin of output. 0.86 is max to fit
trim=1in 1in 1in 1in, clip, %[left bot right top]: Clip off margins of source doc, 1" margins
landscape=false, angle=0, %don't use landscape or rotate
frame=true, %add frame (may be turned off)
pagecommand={}] %Needed to prevent empty page format (which deletes template headers/footers)
{test_include.pdf} %Included file
\end{document}
Test PDF to include
test_include.pdf
Resulting PDF
watermark_example.pdf
Build info:
pdfTeX, Version 3.141592653-2.6-1.40.23 (MiKTeX 21.10) (preloaded format=pdflatex 2021.10.12)
pdfpages.sty 2021/03/06 v0.5t Insert pages of external PDF documents (AM)
draftwatermark.sty 2020/12/08 3.0 Put a gray textual watermark on document pages```
from latex-draftwatermark.
Hi, thanks for this very cool package.
It would very cool to have an option to make sure that the watermark would be on top of everything. For example, i'm having imported graphs as pdf images through includegraphics and the watermark is below the image but above the text :(
from latex-draftwatermark.
With a long delay, a fix/workaround is in the works.
In case you are interested in som inner details, I hoped that pdfpages
would have moved to use the new LaTeX hooks framework directly rather than depending on eso-pic
which could have enabled a more robust solution to the problem. As is, it is unclear to me if placing a workaround in draftwatermark
could break something else depending on eso-pic
.
As a temporary workaround for your case, please try adding
\DeclareHookRule {shipout/background}{draftwatermark}{<}{eso-pic}
before \begin{document}
from latex-draftwatermark.
Workaround is in R3.3
from latex-draftwatermark.
@callegar I really would like to thank you. The new package and work around work great for my application.
I also noticed that I can flip the less-than to greater-than operator to force the watermark on top and thought that was pretty neat.
from latex-draftwatermark.
Related Issues (20)
- How to use \SetWatermarkHorCenter{⟨length⟩} HOT 1
- automaticly react on "draft" option of the documentclass HOT 1
- ignoring pages HOT 4
- text appears tiny HOT 1
- [feature request] Provide a command to turn off watermarking HOT 2
- Error in documentation HOT 2
- New line (\\) not possible in text HOT 3
- Draftwatermark should get rid of everypage dependency HOT 1
- new line not working in the text option in [] HOT 3
- Example 6.1 in documentation does not work HOT 6
- In TeX Live 2020 version of package, commas in \SetWatermarkText{} create an error HOT 4
- A floating object distorts background watermark HOT 14
- Watermark text turns black when luacolor package is used (in TeX Live 2021) HOT 4
- some formatting lost (not sure it is draftwatermark fault) HOT 3
- Watermark on selected pages HOT 1
- Assure that the font used for the watermark is appropriate
- color key errors HOT 3
- Version 3.1 changelog entries missing HOT 1
- Watermark Overlay Issue with `draftwatermark` Package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from latex-draftwatermark.