On Mon, 2005-12-05 at 17:25 +1300, Nick Rout wrote: > On Sun, 04 Dec 2005 20:29:05 -0700 > Joseph wrote: > > > On Mon, 2005-12-05 at 15:57 +1300, Nick Rout wrote: > > > On Sun, 04 Dec 2005 18:05:31 -0700 > > > Joseph wrote: > > > > > > > I want to print to "letter" size paper. > > > > I'm using Sql-Ledger to print invoices, program is set to print with > > > > command: > > > > lpr -P Printer Name > > > > Sql-Ledger is using latex forms to generate invoices. So to my > > > > understanding the program will be using "dvips" to convert latex to > > > > postscript and send it directly to printer, am I right? > > > > > > Probably, but not necessarily - look in the source and see what is > > > called to make the document, or do some sort of tracing as the program > > > runs. > > > > > > > Is there any other utility that conversion goes through, that I've > > > > missed? > > > > looking at the configuration file in sql-ledger it is looking for: > > latex, dvips or pdflatex, but making any changes to dvips makes no > > difference. > > it is hard to look in the source code if you don't know which file it > > is. > > > > I think I have tracked down the code for printing to the file SL/Form.pm > (I tracked it by grepping the source for outr likely commands, dvips, > pdflatex etc.) > > Unfortunately I am not a perl guru, but there are clearly differences in > processing between ps output and pdf output. For example there is a > passage that shows that if the format is ps the following is executed: > > latex --interaction=nonstopmode > dvips -o -q > > in the same point in the code, if the output is pdf it runs: > > pdflatex --interaction=nonstopmode > > Logically the difference must be in the execution of latex/dvips > compared to pdflatex OR in the way that the printer is invoked. > > Which perhaps doesn't help, there may be other differences in the code > that I didn't spot. > > Hey one more thing, when you ran those dvips setup commands and so on, > do they take global effect or only for the user that ran them?????? > Taking a punt, it's unlikely that sql-ledger runs as your user, and if > the commands you ran are per user rather than global, they won't have > taken effect. > -- > Nick Rout <[EMAIL PROTECTED]>
OK, here in order to print (sql-ledger selection) from to pdf --> (screen) and save it as file with the right setting: /usr/share/texmf/pdftex/config/pdftex.cfg (should contain): page_width 8.5 true in page_height 11 true in horigin 1 true in vorigin 0.3 true in So if I print to file.pdf and open that file in kpdf it allows me to print that file directly to printer. The printer is not asking for A4 paper size. The out put goes though: cups. However, if I try to print pdf file to printer directly (sql-ledger selection): pdf --> printer. It keep asking me for paper size A4. The same scenario goes with PS (postscript sql-ledger selection): ps --> screen; save it to a file.ps. It allows me to print that file directly to printer. The printer is not asking for A4 paper size. The out put goes though: cups. But going through (sql-ledger selection): pdf --> printer. It keep asking me for paper size A4. So it only keep asking me for A4 paper size when the file is been redirected from Sql-ledger setting to printer: lpr -P printer_name The file: /usr/share/texmf/dvipdfm/config/conf has: % Set default paper size here p letter /usr/share/texmf/dvips/config/config.ps: % This shows how to add your own map file. % Remove the comment and adjust the name: % p +myfonts.map @ letterSize 8.5in 11in @ letter 8.5in 11in @+ %%BeginPaperSize: Letter @+ letter @+ %%EndPaperSize So, I'm not sure if if the setting in ..dvips/config/config.ps take effect as the printer is asking me for A4 paper size, but it shouldn't. I need as well to figure out which file holds the setting margin setting, as I need to move it 1-in up. -- #Joseph -- [email protected] mailing list

