Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{lipsum}
- usepackage{tikz}
- usetikzlibrary{fadings,shadings}
- usepackage{eso-pic}
- usepackage{lastpage,refcount}
- deffinaltrans{0.5} % adjust this value to make the end more or less transparent
- begin{document}
- newcounter{lastpagenumber}%
- setcounter{lastpagenumber}{getrefbykeydefault{LastPage}{page}{1}}%
- AddToShipoutPictureFG{% Add picture to background of every page
- AtPageLowerLeft{%
- makebox[paperwidth]{
- begin{tikzpicture}
- pgfmathsetmacro{opaone}{100*(1-finaltrans*(thepage)/(thelastpagenumber+1))}
- pgfmathsetmacro{opatwo}{100*(1-finaltrans*(thepage+1)/(thelastpagenumber+1))}
- tikzfading[name=fade down thepage,
- top color=transparent!opaone,
- bottom color=transparent!opatwo]
- fill[white,path fading=fade down thepage] (0,0) rectangle (paperwidth,paperheight);
- end{tikzpicture}}%
- }%
- }
- lipsum[1-20]
- end{document}
Add Comment
Please, Sign In to add comment