sillsdev / ptx2pdf

XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
23 stars 8 forks source link

Feature: Multiple background images #876

Open PJTraut opened 1 year ago

PJTraut commented 1 year ago

Is it possible to specify a specific background image (watermark?) per page or range of pages?

davidg-sil commented 1 year ago

Yes, it is possible using page hooks, assuming you are not using page-image borders. Something like this code, put into into your ptxprint-mods.tex file (Advanced tag), should work:

% Examples of use (use / as path separator)
\sethook{page}{20}{\NewPageBorder{path/to/images/Background1.jpg}}
\sethook{page}{23}{\NewPageBorder{path/to/images/Background2.jpg}}
\sethook{page}{26}{\NewPageBorder{}}

EDIT: Removed definition of \NewPageBorder, as it has now been defined as standard. The code is, of course, in old versions of the comment - click on edited to read those.

PJTraut commented 1 year ago

👍