<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Dec 13, 2008, at 2:36 PM, Friedrich Vosberg wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Morning.<div><br></div><div>I've changed the coding of my TeX source files to ISO Latin 9. But unfortunately now my TeXShop script using pdftk doesn't work anymore. And I have not a clue of an idea what may cause this fault. The console reports:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">request id is Kellerdrucker-3754 (1 file(s))<br>/Users/fv/Library/TeXShop/Engines/fvprint2.engine: line 4:  1306 Segmentation fault      pdftk "${basefname}.pdf" background ~/Pictures/Watermarks/bgabschrift.pdf output printfile.pdf<br>lp: Error - unable to access "printfile.pdf" - No such file or directory<br>rm: printfile.pdf: No such file or directory<br><br></blockquote><div><div>The engine is:</div><div><br></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">#!/bin/sh<br>basefname="`basename "$1" .tex`"<br>lp -o media=a4 "${basefname}.pdf" <br>pdftk  "${basefname}.pdf" background ~/Pictures/Watermarks/bgabschrift.pdf output printfile.pdf<br>lp -o sides=two-sided-long-edge -o media=a4 printfile.pdf <br>rm printfile.pdf</blockquote><div><div><br></div><div>Does somebody know, why the workarround failed.</div><div><br class="webkit-block-placeholder"></div></div></div></blockquote><div><br></div>I am a little bit confused by your script.</div><div>To understand what you are doing here I would surmise from line 2:</div><div>You are setting a variable basefname to contain the result of basename "$1".tex, which is probably going to contain the argument to the script, which in texshop is probably going to be the name of the input file.</div><div>So, this is going to give you the name of your input file, minus the ".tex" extension.</div><div><br></div><div>Now, you are using "lp" with the option to set the media to a4, which is all well and good, but here is where you lose me:</div><div>you are trying to "lp" the file $(basefname).pdf</div><div>but at this point, nothing has been done to create the file $(basefname).pdf</div><div><br></div><div>You might want to do something like "pdflatex" or "pdfluaLaTeX" before you do this, because otherwise, you are never going to generate a pdf version as you seem to want to do.</div><div><br></div><div>Without the pdf file in hand, pdftk is just going to choke.</div><div>If you have successfully generated a pdf file at some point in history with the basename of your ".tex" input, then your script will happily run, although I think that is not what you intended.</div><div><br></div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>TIA and kind regards, Friedrich</div><div><br></div><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><font class="Apple-style-span" color="#000000" face="Monaco" size="3">--</font></div><div><font class="Apple-style-span" face="Verdana" size="2"><span class="Apple-style-span" style="font-size: 10px; "><font class="Apple-style-span" color="#666666">»Der schlimmste Feind des Historikers ist der Zeitzeuge.«</font></span></font></div></div></div></span></div></span> </div><br></div></div>----------- Please Consult the Following Before Posting -----------<br>TeX FAQ: <a href="http://www.tex.ac.uk/faq">http://www.tex.ac.uk/faq</a><br>List Reminders and Etiquette: <a href="http://www.esm.psu.edu/mac-tex/list/">http://www.esm.psu.edu/mac-tex/list/</a><br>List Archive: <a href="http://tug.org/pipermail/macostex-archives/">http://tug.org/pipermail/macostex-archives/</a><br>TeX on Mac OS X Website: <a href="http://mactex-wiki.tug.org/">http://mactex-wiki.tug.org/</a><br>List Info: <a href="http://email.esm.psu.edu/mailman/listinfo/macosx-tex">http://email.esm.psu.edu/mailman/listinfo/macosx-tex</a><br><br></blockquote></div><br></body></html>