GhostScript : Missing digital signature when printing - printing

We had to replace our signature pad by another product because product was discontinued and pens was very hard to find. We buy Topaz GemView Tablet Display
When customer sign on pad, our custom application watch folder for signed PDF and custom application print paper copy for our backyard staff and one for the customer if they want it
Our custom application use GhostScript to send PDF to specific printer.
Everything work fine with the old signature pad and GhostScript 9.16 on Windows 2012
With the Topaz pad, the PDF print, but there are no signature.
I have updated GhostScript to the latest version, 9.53.3, no signature
Here is a link to a sample signed PDF :
https://wetransfer.com/downloads/997a149ab09640d523397248ae6b161020210127144440/e5adad1b76799726522899389fe9415620210127144513/21e3e8
Here is the command line that I use to send PDF to the printer
gswin64c.exe -dPrinted -dBATCH -dNOPAUSE -dNOSAFER -dNumCopies=1 -sPAPERSIZE=letter -sDEVICE=mswinpr2 -sOutputFile="\\spool\\\srv\ColorPaper" "Signed.Pdf"
If I remove all parameter, we can see signature on the screen
gswin64c.exe "Signed.Pdf"
Does GhostScript can print digital signature on paper ?
Thank you

Like chrisl say in it's comment, by changing parameter "-dPrinted" for "-dPrinted=false" solve this issue.
The signature field in the PDF are flagged as "not printable".
When using "-dPrinted=false", GhostScript print PDF like it appear on screen

Related

How to set font in Texinfo

I'm using the GNU texinfo package to generate both PDF and .info files from a .texi file.
I'm trying to update an old .texi file (not changed since 2001) and generate the same PDF output. I've resolved a number of issues, but there are a couple outstanding. In the old PDF, the title was in Helvetica and body text is Liberation Serif. In the new PDF, both are Computer Modern.
I've read everything that I can find about fonts, but I'm not able to change the fonts. Nothing that I do seems to work. Everything I have tried generates errors.
In my .texi file, before any \setfont directives, I have \def\fontprefix{uh} which, if I read the pdftex.map file correctly, should select the NimbusSanL font set (e.g. uhvr8a.pfb). I get the following errors:
mktexnam: Could not map source abbreviation for uhss10.
kpathsea: Running mktexmf uhss10
! I can't find file uhss10'.
<*> ...ljfour; mag:=1; ; nonstopmode; input uhss10`
Does anyone have a example .texi file which sets the font family to use? Or an explanation of what I'm doing wrong?

Zebra ZQ520 printer, download and use new .CPF font with ZPL language

problems to print with different fonts on my Zebra ZQ520:
as described in documentation, I've downloaded some new font through the official Zebra Font Downloader program, comic and verdana. After this, I found the new fonts in E: storage area. So the script:
^XA^HWE:^XZ
give me:
LIST OF FONT LINKS
- DIR E:.
* E:COMIC_02.CPF 7359
* E:VERDAN02.CPF 163 ....
- 66589184 bytes free E: ONBOARD FLASH
and trying to print example string from font downloader program, it print with the installed font with success.
The problem appens if I try to print a label. The printer seems not consider the .CPF files in ZPL commands.
My tests, without success, are:
1) following the procedure indicated in https://km.zebra.com/kb/index?page=content&id=SO7891 , assigning a designator to new font, with the script:
^XA^CWQ,E:COMIC_02.CPF^XZ
and trying to print something as:
^XA^FO50,50^AQN,50,50^FDSAMPLE CoMiC^FS ^XZ
seems not working (is it not possible to assign a designator on .CPF files??)
2) (not working too) test, I tryed to print something with the ^A# command, also without success. Example:
^XA^FO50,50^A#N,50,50,E:COMIC_02.CPF^FDSAMPLE CoMiC^FS ^XZ
Where is the problem? with printer (updated with the last firmware, V76.19.15Z)?
or ZPL can't print font stored in .CPF files?
or ..??
thanks!
The ZQ500 supports multiple printing languages. It ships with the PnP string stating that it is a CPCL printer. This tells the Zebra Setup Utility to generate a CPCL compatible font (.CPF). Since you are looking to print using ZPL you need to generate a font compatible with ZPL.
https://km.zebra.com/resources/sites/ZEBRA/content/live/SOLUTIONS/8000/SO8535/en_US/ZebraNet_Bridge_Font_Converting.pdf
This will use a different program to package a .ttf font for the printer. ZPL has support for truetype fonts so you will have better scaling of the font.
The ^CW and ^A# commands will both work with the ttf font.

Why does the search results change after PDF optimization in Ghostscript?

When searching for the word find in the PDF file in this Link before Ghostscript optimization the results will give pages number 4,7 and 13 but after the optimization it gives only pages 4 and 13 ignoring page number 7, the script im using for the optimization :
D:/gswin64c -sDEVICE=pdfwrite -dMaxSubsetPct=100 -dAutoRotatePages=/None -dMaxInlineImageSize=0 -dPDFSETTINGS=/ebook -dColorImageResolution=96 -dDetectDuplicateImages=true -dColorImageDownsampleThreshold=1.1 -dDOPDFMARKS -dUseTrimBox -sOutputFile="D:/temp/search_text.pdf" -dNOPAUSE -dNOGC -dBATCH -dNumRenderingThreads=8 -c 50000000 setvmthreshold -f "D:/temp/iphone_user_guide.pdf"
I've tried to add several fonts related parameters to the script such as -dEmbedAllFonts=true and pointing to fonts path also I've tried to play with the parameters by eliminating some but with no result
what could be the cause of this problem?
Ghostscript doesn't do 'optimization'. See my answer here:
GhostScript issues with a CropBox
for some details on what it does do.
Wihtout seeing your file I cannot tell you for certain what the difference is, but most likely the missing text has been drawn as images instead of text for some reason.
By the way, a lot of the options you are sending have absolutely no effect (eg NumRenderingThreads, for a device which doesn't do rendering). You should NOT select -dNOGC, that's a really bad idea, -dDOPDFMARKS is already set for the pdfwrite device.

What do I need to put in .emacs to print to default Windows printer?

I used to have postcript printing working perfectly in Emacs 21 in Windows+Cygwin, but after upgrading to Emacs 23, I am receiving the following error in the minibuffer:
Opening output file: invalid argument, C:/PDFCreator:
My current .emacs contain the current relevant statements:
(require 'ps-print)
(setq ps-spool-duplex t)
(setq ps-auto-font-detect nil)
(setq ps-print-color-p nil)
It used to have the following line as well:
(setq ps-lpr-command "qprt")
But it generates a similar error:
Searching for program: no such file or directory, qprt
Any idea what changed in Emacs 23 and how I can bring printing back to life?
(at this point I am only interested in printing to the default Windows printer, which is PDFCreator).
From the Emacs Wiki PrintingFromEmacs, the following configuration is recommended.
Where lpr is the Cygwin lpr version.
(setenv "PRINTER" "PDFCreator")
(cond ((eq system-type 'windows-nt)
(setq ps-printer-name "PDFCreator")
(setq ps-printer-name-option "-d")
(setq ps-lpr-command "/bin/lpr")))
You could also use the Ghostscript configuration there and select the PDFCreator printer from the popup. Adjusting your GS_LIB and your ghostscript binary location accordingly.
(setenv "GS_LIB" "e:/tools/GSTools/gs8.14/gs8.14/lib;e:/tools/GSTools/gs8.14/fonts")
(setq ps-lpr-command "e:/tools/GSTools/gs8.14/gs8.14/bin/gswin32c.exe")
(setq ps-lpr-switches '("-q" "-dNOPAUSE" "-dBATCH" "-sDEVICE=mswinpr2"))
(setq ps-printer-name t)
Note to users of PDFCreator - they now install a bunch of toolbars and take over your web browsers when you install it.
http://en.wikipedia.org/wiki/Pdfcreator#Adware_toolbar_controversy
I had PDFCreator working fine with Emacs, then I made the mistake of letting PDFCreator update itself. It redirected all my search queries to Bing, took over a bunch of browser settings, added toolbars, default landing pages etc. It took me about an hour to clean out all the junk it added.
I had the same symtom as the poster, but it wasn't because of any change in Emacs 23.
My printer is a postscript capable network printer.
First, my hostname had changed sligtly when my work computer was upgraded from Windows to Vista. I had to change one character accordingly:
From
(setq ps-printer-name "//evf4ce46ac4ad3/seki81050470cm")
to
(setq ps-printer-name "//e7f4ce46ac4ad3/seki81050470cm")
This changed the error message from
direct-print-region-helper: Opening output file: invalid argument, //evf4ce46ac4ad3/seki81050470cm
to
direct-print-region-helper: Opening output file: no such file or directory, //e7f4ce46ac4ad3/seki81050470cm
Then I had to enable sharing of the printer. This is found in
\\e7f4ce46ac4ad3\Printers
which probably can be found in a more generic way. \\%computername%\Printers didn't work for me; I don't know why.
Right-click on the printer icon, select Sharing and enable Share this printer, with a suitable printer name, preferably with no spaces in it.
This was enough to enable printing for me.

Offending Command error while Printing EPS

I am printing an EPS File generated with following credentials.
%-12345X#PJL JOB
#PJL ENTER LANGUAGE = POSTSCRIPT
%!PS-Adobe-3.0
%%Title: InvoiceDetail_combine
%%Creator: PScript5.dll Version 5.2.2
%%CreationDate: 10/7/2011 4:46:59
%%For: Administrator
%%BoundingBox: (atend)
%%Pages: (atend)
%%Orientation: Portrait
%%PageOrder: Special
%%DocumentNeededResources: (atend)
%%DocumentSuppliedResources: (atend)
%%DocumentData: Clean7Bit
%%TargetDevice: (HP Color LaserJet 4500) (2014.200) 0
%%LanguageLevel: 2
%%EndComments
While doing Selection Printing on Ricoh Afficio 2090 or any other drivers/printers get the following error printed on the sheets
ERROR: undefined
OFFENDING COMMAND: F4S47
Stack:
.
Kindly Review and suggest a turn around for the same as i am already stuck in this hell. I have tried to convert/extract in PS but all in vain. I am using gsview to Print and view these files.
This is the problem:
%%PageOrder: Special
A ps document with "Special" page order can NOT be re-ordered. You cannot do a selection or range with this file because it is broken for this use. You must reprocess the file using Distiller or ghostscript (ps2ps or ps2pdf) in order to print selected or re-ordered pages from the document.
You can avoid this by generating your postscript files with a real Postscriptâ„¢ driver (one not created by Microsoft).
The GSView Documentation has more about this.
Previously:
This line ...
%%TargetDevice: (HP Color LaserJet 4500) (2014.200) 0
... tells us that the file was generated with HP printers as a target. So this really is not an EPS file. Because it's not Encapsulatable. To generate output on a printer the file has to execute the showpage operator, which is a no-no for EPS files.
So uncheck the EPS box (it's a big fat lie, anyway), and select (install) a Generic Postscript driver. If you need to send it to multiple makes of printer, the file needs to make as few assumptions about the printer as possible.
The first thing is that this is not a valid EPS file, as it has PJL attached at the front. Many PostScript printers will strip this off, but by no means all.
This probably is not the source of the problem.
There is no way to 'review' the problem as you have not supplied the complete PostScript program. Without that there is no way to tell what is actually wrong, the error message tells you that the interpreter encountered 'F4547' while trying to parse a token, and that this has not been defined as a routine.
Most likely the file is corrupt, either damaged in some way, or possibly it is a biinary file and has been transmitted by some process which does has done some kind of conversion (CR/LF is common). The offending command looks like its ASCIIHex encoded, so that may be a red herring.
If you want additional help, you are going to have to make the whole program available somewhere.

Resources