X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/85b5bd4d4b6fdaff30df0dce136db850fe610830..3f64488684dbf14b7e0005209d2dca878e1852d9:/librarian/formats/pdf/res/coverimage.sty?ds=sidebyside

diff --git a/librarian/formats/pdf/res/coverimage.sty b/librarian/formats/pdf/res/coverimage.sty
new file mode 100755
index 0000000..4f3f117
--- /dev/null
+++ b/librarian/formats/pdf/res/coverimage.sty
@@ -0,0 +1,23 @@
+\newcommand{\makecover}[1]{
+% parametry: wysokosc po obcieciu, ile obciac z dolu
+        \newlength{\PictHOffset}
+        \newlength{\PictVOffset}
+        \setlength{\PictHOffset}{1in}
+        \addtolength{\PictHOffset}{\hoffset}
+        \addtolength{\PictHOffset}{\oddsidemargin}
+
+        \setlength{\PictVOffset}{1.166in}
+        %\setlength{\PictVOffset}{0pt}
+        \addtolength{\PictVOffset}{\voffset}
+        \addtolength{\PictVOffset}{\topmargin}
+        \addtolength{\PictVOffset}{\headheight}
+        \addtolength{\PictVOffset}{\headsep}
+        \addtolength{\PictVOffset}{\topskip}
+        \addtolength{\PictVOffset}{-#1}
+
+        \noindent\hspace*{-\PictHOffset}%
+        \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{%
+            \includegraphics[width=210mm,height=#1]{cover.png}}}
+
+        \vspace{-\PictVOffset}
+}
