Pdf printout from Sunmi V1 device - ionic2

I need to take pdf printout from sunmi V1 device. Tried to take printout from acrobat reader but it is not displaying any printers.
Created an App in Ionic and converted the data into pdf.
From the generated pdf, trying to take printout. Printers are not visible.
Also installed cordova printer plugins, but they are also converting to pdf but not taking printouts.
When I tried to take printout through testing app provided by Sunmi, it is working fine.

Related

Claim device is not working while using the EPSON TM-T88VI printer once we upgrade it to Advanced driver printer from ADK 270

My POS Terminal has installed the Epson driver ADK 2.70E for model EPSON TM-T88VI.
That time the printer was working fine from my POS Terminal application which is in C++.
The registry contains the key in \HKEY_CLASSES_ROOT\OPOS.POSPrinter
enter image description here
In Device MAnager,
the device is displaying in the USB prot.
enter image description here
In Devices, it is displaying in the Unspecified category,
enter image description here
And from my application it is working fine without any problem.
Then I Installed the advanced driver version APD 512E on top of it.
And then try to print the receipt from my application which uses C++
code the print is not happening.
The OPOS error returning as 106 during the claimDevice funciton.
Device MAnager,
enter image description here
Devices,
enter image description here
If I uninstall the Advanced driver it is working fine from my application, like to know y it not working once we upgrade it to Advanced driver ?
Is there any Language compatibility is there, that c++ is not compatible for this Advanced driver ?
You should be concerned with hardware and software mode settings and related APIs, whether C++ or not.
Advanced Printer Driver and OPOS ADK are exclusive and can be used with only one of the settings.
If you want to use OPOS, delete the TM-T88VI related information from the Windows printer list and printer queue, and uninstall Advanced Printer Driver.
If you want to update OPOS, please get it from the above link and update it.
In response to comments:
As per the question in your comment. However, it depends on the hardware settings. It cannot be handled simply by changing the API used.
If you want to use Advanced Printer Driver, you need to use this utility to change the interface hardware settings from vendor class to printer class.
TM-T88VI Utility
Then print using the standard Windows desktop printer API.
Printing (Documents and Printing)
In that case, you will create image data for each page of the print content and print it as bit image data.
If you want to print using printer fonts, cut paper or open a cash drawer, you will need to create and embed RawPrinterHelper.
Send raw data to a printer by using the Win32 API
Print Direct To Windows Printer (EPOS Receipt)
How to send page cut command to Epson printer
Furthermore:
You probably can't use it like a question in a comment.
is that the behaviour of the driver or any other way to add the device to qindows printer without installing Advance printer drivers ?
To be able to use it as a Windows desktop printer, you need to install some printer driver, even if it is not an Advanced printer driver.
For example, it seems that it is no longer provided in windows 10, but before that there was a generic text only printer driver.
You will need to have some such driver installed.
And perhaps if you install the windows printer driver and create a print queue, it's likely that the connection port will be occupied at system startup and will not be available to others.
This corresponds to the phenomenon of "3. The OPOS error returning as 106 during the claimDevice funciton." In the question.
About: what u mentioning as hardware settings ?
This is the interface mode setting by the TM-T88VI Utility described above.
Printer class or Vendor class of USB.
However, if it is currently available in OPOS, you do not need to consider it.
Rather, it should not be changed.

Can I use WMI to read a printer spool file

My client has an old DOS-based application which sends formatted output to a printer. I have disabled printing so spooled files remain in the print queue. I would like to pick up these spool files and convert them to PDF format (then ideally delete them). Is this possible using WMI?
BTW I cannot change anything within the application which produces the printed output.
I would like to do this as part of an existing Visual Foxpro utility which I support.
The formatted output of the application will be ASCII text with embedded Epson or PCL printer codes. A Windows virtual PDF printer (or other printer drivers) doesn’t support such data stream. You would have to use the Generic Text Only printer driver and save the output to file. Or a DOS-to-Windows print processor like DOSprn, or a DOS emulator like vDos, that converts the ASCII text for a Windows printer driver.
There are many complications, but most of them are covered here. In particular see:
Force JobID in Spoolfile names
When is RAW used?
Depending on the application, driver, and other factors, the format of the spool files will be EMF, XPS or a "raw" PDL like PostScript, PCL, PCL6 etc. EMF is a bit old in the tooth now, but you can find modern components to render most PDLs. If you can get the driver you're using to spool to PDF then you're done.
Since the DOS application successfully prints to an HP 4200 (which supports these languages: HP GL/2, HP PJL, PCL 5E, PCL 6, PostScript 3), the spool file is likely to be ASCII with control codes or PCL escape codes. You should open the spool file in a hex editor and have a look. They are usually stored in "C:\Windows\System32\spool\PRINTERS" as SPL files.
You might be able to use GhostScript depending on which licences you're ok with. E.g. for PCL to PDF see this (old) question and its answers - search for more recent ones.
Other commercial options include Aspose for EMF to PDF. These are the kinds of tools you need to seek out and evaluate for your particular use cases.
WMI can delete print jobs. E.g. on the command line:
wmic printjob where jobid=<jobnumber> delete
If it's a HP the files are (as everyone else above has said) in PCL. There is a command line utility here that converts PCL to PDF. To quote:
This page offers two almost identical utilities that create PDF output from PCL "print files." Both use GhostPCL by Artifex (released under the GNU General Public License) as the engine that performs the conversion.
So you could do it from Visual FoxPro by building a command line to run the EXE with the relevant parameters and executing it with (for example) Windows Scripting Host:
lcExe = "full\path\to\winpcltopdf.exe"
lcCommandLine = "myinputfile.pcl myoutputfile.pdf"
loWshShell = CreateObject("WScript.Shell")
lnProcessReturnCode = loWshShell.Run(lcExe + " " + lcCommandLine, 1, .t.)

Render a JAR web applet from a byte array in Firefox

I have an assignment which involves developing an NPAPI (C++) plugin for an older version of Firefox. The plugin receives a decrypted byte array from an external library and renders the content on a webpage. The plugin so far works with images and various text files by utilizing NPAPI's drawing/window capabilities, however there is also an interest in allowing it to render JAR/WAR applets.
Unless I am mistaken, there is no way to "draw" a Java program with NPAPI, so it must be handled by Firefox. And since the plugin is dealing with encryption and decryption of secure content, it seems it would defeat the purpose to write the bytes back to a JAR file in the users browser.
Basically my question is this: would it be possible to stream the raw bytes of a JAR file from plugin to browser and have it execute on the browser without storing a temp file?

Spooling Thermal Shipping Label Data From Web Site

I need help trying to get thermal shipping label data from a Web site to a local Zebra printer. The data itself is just plain text but spooling it from a Web site seems to be very difficult for some reason. Does anyone have any experience with this? I am using ColdFusion 8 and Windows Server 2008.
Your print data could be sent with a MIME type (there probably is one for it, but you could make one up too)
On the client's PC, they could have that MIME type mapped to a program that simply prints whatever it receives.
Setting the MIME type on a PC can be done with code or a .REG file. If you control the user's environment, that's pretty simple. Making a program that dumps whatever it receives is also easy. That would be a nice task for Visual C or good, old VB6. Very little code. As long as the user has the .EXE and the .REG file, they'll print reliably, every time, without the browser's crap getting in the way. (think of this as what happens when you click a link to a PDF - Acrobat opens. Well, have the little printing EXE open for your file type - easy).
This is familiar to me... I think I did this with a proprietary font set... AH! Yes, I had to do this to generate mortgage documents that used proprietary fonts for drawing the pretty lines. I was able to take a proprietary, stand-alone mortgage origination server, share the folder where the mortgage .PRN files had been created. A Web server with access to that share enumerate the files in the share to a Web page, then, when users clicked on a file, the .PRN would stream to their PCs where a corresponding .EXE would see it as one of its own and send it to the correct output device (a designated printer at their location). That dumb little piece of code eliminated 126 document servers (and their maintenance and licensing costs) instantly and mortgage documents were never lost or sent to the wrong branch by mistake again. I think it took 3 hours to get it all working from inception to testing at the branches.
Yeah, same thing here. It'll work. Trust me. It'll work.
I was unclear by your question as if the Zebra printer is connected to the web server and what software the server is running. If you are trying to send the data to a printer connected to the web server, I used the following information to send label data to a Zebra thermal printer in an Intranet solution and it worked great:
How to send raw data to a printer by using Visual C# .NET
Perhaps you can adapt this solution to your environment.
I fiddled about with this problem for ages. In the end I had to create downloadable printfiles. The user downloads them and then copy (MSDOS) them to the printer.
There were two main issues:
generally speaking, you can't print
from a website unless you open the
file (ie the file becomes local)
the print drivers on the user's (Windows)
machine add non-printing characters
to the barcode file as it is sent to
the printer
We installed a batch file (which runs copy instead of print) on all client machines that need to print barcodes and we added a right-click menu item to run the batch on files named *.barcode.
I'll be watching this thread to see if anyone has found a more direct solution. But this was the only thing we could do given the parameters of our situation.
I don't know if I have fully understood your problem or the exact environment but I have answered a similar question here with an example for ASP.NET (C#). That solution is mainly for a known printer (specific IP and port). If you have several clients with their own label printers the solution could be used for that as well. But then you have to make a solution where the clients are able to set their own IP and port of their label printer. They also might need to make a port forward for the traffic in their firewall. The webpage then just prints to the specified IP and port. You can also use a domain name instead of IP.
Perhaps you could try this:
http://code.google.com/p/jzebra/
This project allows the ZPL commands to be sent to the printer via a web browser.

Change Windows Mobile 6.1 Theme Programmatically

I am trying to figure out the proper procedure for applying a new tsk based theme file in windows mobile 6.1.
I have tried working off of the page http://www.pocketpcdn.com/articles/changetodaytheme.html But this only changes the background, not the system colors for things such as the top and bottom bars on the screen.
wceload.exe seems to work perfectly for some tsk's and partially for others.
Does anyone know more about tsk files and applying them programmatically in Windows Mobile 6.1?
My application is an open source application, the code is avail;able via read only svn, feel free to check it out # google code
I ended up finding a solution, I don't think it is a universal solution though.
Calling "\Windows\cusTSK.exe \Windows\ThemeName.tsk" changes the top and bottom bars, but does not change all apsects of the theme... so calling wceload.exe and then calling cuTSK.exe in that order seems to be able to change the theme using all tsk files that I have tested.
The cusTSK.exe binary does not exist on the Windows Mobile 6.1 Professional emulator image that you can download from msdn, so I think that this file that exists on custom roms and HTC made devices, that is why I do not think this is a universal solution, but it works for my purposes