Ghostscript - virtual printer output is only A4 - printing

I'm using ghostscript for Virtual Printer and I installed it according to this manual: http://www.stat.tamu.edu/~henrik/GSPSprinter/GSPSprinter.html
The problem is, that it prints everything in A4 no matter how big document is. (or what I set in dialog box). I need to print documents from MS Word sometimes in A3 and sometimes in A4, so I didn't set the default paper size.
My setting right now is like this:
-Ic:\gs\gs8.14\lib;c:\gs\fonts
-sDEVICE=mswinpr2
-dNoCancel
-dNOPAUSE
-dSAFER
I tried it with
-sPAPERSIZE=A4
and
-sPAPERSIZE=A4
-sPAPERSIZE=A3
but didn't get any positive result.
Do you have any idea how to set it?
Thanks, Laura

Use this:
-sPAPERSIZE=a4
-sPAPERSIZE=a3
(a instead of A)

Related

Ghostscript not printing correctly A5 landscape pdf

We have a little app detecting changes on some sftp server folders and printing automatically any new document. We set up this app, working for some years now in a warehouse in Europe, on a new warehouse in U.S but it fails to print correctly A5 documents.
The program uses ghostscript to do the printing and passes a set of arguments for A4 printers :
-dColorImageResolution=150 -dDownsampleColorImages=true -sDEVICE=pdfwrite -dQUIET -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dPrinted -dBATCH -dNOPAUSE -sDEVICE=mswinpr2 -dNoCancel -sOutputFile="%printer%{0}" "{1}"
And for A5 printers :
-sPAPERSIZE=a5 -dFIXEDMEDIA -dPDFFitPage -dColorImageResolution=150 -dDownsampleColorImages=true -sDEVICE=pdfwrite -dQUIET -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dPrinted -dBATCH -dNOPAUSE -sDEVICE=mswinpr2 -dNoCancel -sOutputFile="%printer%{0}" "{1}"
The issue is that when we put the same configuration into our U.S printers, the pdfs in A5 landscape print on portrait orientation. We changed the configuration using options like dAutoRotatePages=(/PageByPage, /None, /All), tried remove dPDFSETTINGS=/screen and many other thing (I lost count sorry) and at best we can print the page in landscape but very offsetted on the right (like it doesn't understand anymore that the format is A5).
The printer is a Lanier PC600 I believe and here is the pdf I try to print:
https://drive.google.com/file/d/1VFnsBBnGf6MbJHdwmfD0Lc_QKGWznsFA/view?usp=sharing
Does someone has an idea on why this problem happens?
Thank you

Geany doesn't print a few combination of characters

I just got Geany 1.36 and everything was working fine until I tried to type a "-". It turns out Geany doesn't print characters like "." , "-" , "<", ",". I have to type an extra character to get it to show. It seems like it stores it in a buffer and when I type an extra character it prints both characters at once.
Also, character combinations like (. + s), (. + r), (. + t) doesn't print at all.
I changed the font settings, (can this be the reason?) but then I reinstalled Geany again and I still have this issue.
(I cleaned the preference files from APPDATA too)
I searched the entire net, even looked through Geany manual but couldn't find anything.
If you know anything about this do let me know.
I am running Windows 10 and Geany 1.36.
GNU programs don't work properly if the keyboard layout is not set up correctly.
Make you sure you set up the keyboard layout correctly, for the majority of the people it should be EN-US
Search for Edit keyboard and layout options and make sure it is set up to EN-US (or whatever the correct one is)

How to print different labels in zebra printer in one batch

I need to print a batch of product labels in a zebra printer. I have a file that is built like this:
^XA
^LH30,30
^FO20,10^AF^FDAle Beer^FS
^FO20,100^BY3^BCN,100,Y,N,N
^FD574759766878^FS
^FO20,280^AF^SNSK: US/0001,1,Y^FS
^FO20,320^AF^SNC: Alcoholic,1,Y^FS
^XZ^XA
^LH30,30
^FO20,10^AF^FDCherry Cola^FS
^FO20,100^BY3^BCN,100,Y,N,N
^FD825812897457^FS
^FO20,280^AF^SNSK: US/0018,1,Y^FS
^FO20,320^AF^SNC: Soft Drinks,1,Y^FS
^XZ^XA
^LH30,30
^FO20,10^AF^FDCola^FS
^FO20,100^BY3^BCN,100,Y,N,N
^FD881108188209^FS
^FO20,280^AF^SNSK: US/0019,1,Y^FS
^FO20,320^AF^SNC: Soft Drinks,1,Y^FS
^XZ
So, I'm trying to send multiple labels to the printer. I don't have the machine, I am using the Zpl Printer Chrome emulator. The thing is that I only see the first label.
Is this correct? How can I print all my labels correctly?
Thanks

Zebra Label Feeds Blank after printing

I have a specific label that feeds a second, blank label after printing a good one. I'd imagine it's something about the ZPL code, but I cannot seem to isolate it. I've tried removing each formatting statement at the top, one at a time and trying different values for each one. I've also re-calibrated even though other labels print just fine. Any ideas?
~JO
^XA
^PMN
^MNY
^MMR
^MTT
^MD0
^LH0,0
^LL1219
^PR4
^JMA
^FO0,398^FR^GB811,2,2^FS
^FO406,0^FR^GB2,236,2^FS
^FO0,606^FR^GB811,2,2^FS
^FO455,234^FR^GB2,165,2^FS
^FO0,843^FR^GB811,2,2^FS
^FO2,232^FR^GB811,2,2^FS
^FO412,604^FR^GB2,240,2^FS
^FO41,41^CI0^ADN,18,20^FR^FDFrom:^FS
^FO427,41^CI0^ADN,18,20^FR^FDTo:^FS
^FO41,264^BY2,2.0,102^B3N,N,102,N,N^FR^FD^FS
^FO22,248^CI0^A0N,17,17^FR^FDOrder Number:^FS
^FO463,238^CI0^ADN,18,20^FR^FDCarrier:^FS
^FO488,264^CI0^A0N,23,23^FR^FD^FS
^FO22,412^CI0^ABN,22,14^FR^FDORDER#^FS
^FO49,443^CI0^A0N,28,56^FR^FD^FS
^FO41,61^CI0^A0N,23,23^FR^FDRandom Address^FS
^FO41,102^CI0^A0N,23,23^FR^FDOne Industrial Rd^FS
^FO41,122^CI0^A0N,23,23^FR^FDSuite 199^FS
^FO41,142^CI0^A0N,23,23^FR^FDThistown, PA 12345^FS
^FO20,508^CI0^ABN,11,14^FR^FDP.O.#^FS
^FO366,508^CI0^ABN,11,14^FR^FDSHIP DATE^FS
^FO20,526^CI0^ABN,11,14^FR^FD^FS
^FO370,524^CI0^ABN,11,14^FR^FD05/15/14^FS
^FO421,614^CI0^ADN,18,20^FR^FDFOR:^FS
^FO427,691^CI0^A0N,23,23^FR^FD^FS
^FO427,711^CI0^A0N,23,23^FR^FD^FS
^FO427,650^CI0^A0N,23,23^FR^FD^FS
^FO163,914^BY2,3.0,203^B3N,N,203,N,N^FR^FDRC051514E^FS
^FO45,862^CI0^ADN,18,20^FR^FDRC051514E^FS
^FO427,61^CI0^A0N,23,23^FR^FD^FS
^FO427,102^CI0^A0N,23,23^FR^FD^FS
^FO427,122^CI0^A0N,23,23^FR^FD^FS
^FO427,142^CI0^A0N,23,23^FR^FD^FS
^FO549,610^CI0^A0N,17,17^FR^FDCUST NO:^FS
^FO650,610^CI0^A0N,17,17^FR^FD^FS
^FO345,406^CI0^A0N,39,78^FR^FDPQ^FS
^FO447,406^CI0^A0N,39,78^FR^FD1^FS
^FO650,142^CI0^A0N,23,23^FR^FD,^FS
^FO671,142^CI0^A0N,23,23^FR^FD^FS
^FO711,142^CI0^A0N,23,23^FR^FD^FS
^FO427,732^CI0^A0N,23,23^FR^FD^FS
^FO650,732^CI0^A0N,23,23^FR^FD,^FS
^FO671,732^CI0^A0N,23,23^FR^FD^FS
^FO711,732^CI0^A0N,23,23^FR^FD^FS
^PQ1
^XZ
I ended up spending an hour and a half on the phone with Zebra and they determined that since my printer model was emulating ZPL support I had to be much more careful about the order of the statements by coordinates. In other words, Zebra models with ZPL emulation cannot deal with it when a statement has a x and y coordinates that would make it precede a line already done. It will print but cause weird things like page feeds to happen. So make sure to put all of your lines in order, even if you generate your code using software like LabelViewer.
What size media are you using? Is it gap or continuous? What settings are saved on the printer before this label is sent? You might be in a different print mode, and then when this label is sent it changes it to non-continuous gap mode (^MNY) and then it tries to find the gap by feeding a label.
Does it work if you only send this?
^XA
^FO0,398^FR^GB811,2,2^FS
^FO406,0^FR^GB2,236,2^FS
^FO0,606^FR^GB811,2,2^FS
^FO455,234^FR^GB2,165,2^FS
^FO0,843^FR^GB811,2,2^FS
^FO2,232^FR^GB811,2,2^FS
^FO412,604^FR^GB2,240,2^FS
^FO41,41^CI0^ADN,18,20^FR^FDFrom:^FS
^FO427,41^CI0^ADN,18,20^FR^FDTo:^FS
^FO41,264^BY2,2.0,102^B3N,N,102,N,N^FR^FD^FS
^FO22,248^CI0^A0N,17,17^FR^FDOrder Number:^FS
^FO463,238^CI0^ADN,18,20^FR^FDCarrier:^FS
^FO488,264^CI0^A0N,23,23^FR^FD^FS
^FO22,412^CI0^ABN,22,14^FR^FDORDER#^FS
^FO49,443^CI0^A0N,28,56^FR^FD^FS
^FO41,61^CI0^A0N,23,23^FR^FDRandom Address^FS
^FO41,102^CI0^A0N,23,23^FR^FDOne Industrial Rd^FS
^FO41,122^CI0^A0N,23,23^FR^FDSuite 199^FS
^FO41,142^CI0^A0N,23,23^FR^FDThistown, PA 12345^FS
^FO20,508^CI0^ABN,11,14^FR^FDP.O.#^FS
^FO366,508^CI0^ABN,11,14^FR^FDSHIP DATE^FS
^FO20,526^CI0^ABN,11,14^FR^FD^FS
^FO370,524^CI0^ABN,11,14^FR^FD05/15/14^FS
^FO421,614^CI0^ADN,18,20^FR^FDFOR:^FS
^FO427,691^CI0^A0N,23,23^FR^FD^FS
^FO427,711^CI0^A0N,23,23^FR^FD^FS
^FO427,650^CI0^A0N,23,23^FR^FD^FS
^FO163,914^BY2,3.0,203^B3N,N,203,N,N^FR^FDRC051514E^FS
^FO45,862^CI0^ADN,18,20^FR^FDRC051514E^FS
^FO427,61^CI0^A0N,23,23^FR^FD^FS
^FO427,102^CI0^A0N,23,23^FR^FD^FS
^FO427,122^CI0^A0N,23,23^FR^FD^FS
^FO427,142^CI0^A0N,23,23^FR^FD^FS
^FO549,610^CI0^A0N,17,17^FR^FDCUST NO:^FS
^FO650,610^CI0^A0N,17,17^FR^FD^FS
^FO345,406^CI0^A0N,39,78^FR^FDPQ^FS
^FO447,406^CI0^A0N,39,78^FR^FD1^FS
^FO650,142^CI0^A0N,23,23^FR^FD,^FS
^FO671,142^CI0^A0N,23,23^FR^FD^FS
^FO711,142^CI0^A0N,23,23^FR^FD^FS
^FO427,732^CI0^A0N,23,23^FR^FD^FS
^FO650,732^CI0^A0N,23,23^FR^FD,^FS
^FO671,732^CI0^A0N,23,23^FR^FD^FS
^FO711,732^CI0^A0N,23,23^FR^FD^FS
^PQ1
^XZ
Since you haven't told us the height of the label you are using, and we can only imply you're using a 203dpi printer from
^FO163,914^BY2,3.0,203^B3N,N,203,N,N^FR^FDRC051514E^FS
I suspect that this particular line is your trigger. The resultant label height is 914+203=1117 dots; at 203.2 dpi=5.497", if calculated at 203dpi is a little over 5.5". Now assuming you are using 5.5" labels with a 1/16" gap, this is probably a smidgin too big. Try reducing the 203s to 190 or the 914 a little. In fact, if you temporarily remove this line and the resultant label prints OK, then that's a quick-and-dirty test that should prove the point.

How to print Java code on A3 page avoiding line-wrapping

I have to print Java code that some times reaches 300 columns (characters per line) in A3 paper and whatever editor I use (e.g. textmate) wraps the lines in order to fit in A4 paper.
Any suggestions?
cheers,
Asterios
Your editor undoubtably has either a Page Setup dialog or a Preferences dialogue as part of the Print Dialogue which will allow you to set the Paper Size to use for printing.
Even Notepad supports this
I finally made it to print using enscript. Here is the command I used to print Java code into PDF (and the used the pdf to print).
enscript -r -Ejava -M A3 -C -f "Courier8" input.java -o - | ps2pdf - output.pdf
where:
-r prints in landscape mode
-C prints the line numbers
-f changes the font and size
-M sets the output media to A3 (default is A4)
-Ejava adds syntax highlighting (you can also use --color if you need
colors in syntax highlighting but
they are not nicely printed in
greyscale)
It seems unlikely that every editor tries to format for A4. Which other editors have you tried? Does textmate not have a page size option? (Hmm... seems not)
Try a different editor that does let you set page size. Word, even.

Resources