Replace keyboard input with scanning QR code - input

I have ticketing system that I use for students who do consultation with their teachers. The system is working right now, the teacher need to input ticket number which is generated by students.
I want to change the way, I want the ticket number is shown as QRCode, and what the teacher need to do just scan the QRCode thru the camera of their laptop. So it's like replace the way they input the ticket number, from typing the ticket number to just scan the QRCode.

The simplest way to do that is with old-fashioned barcodes.
If the ticket number is short enough (up to 14 digits), you can format it as a EAN13 barcode (13 digits + control).
The number conversion is trivial to make (just Google "generate EAN13" + your programming language)
EAN13 barcodes can be rendered as text with this TTF font: http://www.fontpalace.com/font-details/EAN-13/
Almost every QR reader understand linear barcodes
You can get a Barcode Scanner Gun for 25$. They are plugged via USB, detected as USB keyboards, they input scanned codes as if you typed them and they are fast as hell!

I think you are looking for a scanner soft keyboard. It scans the barcode / qr and set the result in input the same like you typed it.
In example this keyboard
https://play.google.com/store/apps/details?id=com.nikosoft.nikokeyboard
It has the config option to scan and automatically send an Enter keyboard event.
I successfully use it on a telegram bot to similar functionality and I think is a very simple solution.

Related

Converting Windows .PRN file (PCL) to PDF

I have been succesfully capturing PCL content sent by old machinery to a parallel port and converting it to PDF using GhostPCL for a while.
However, we have some older industrial machinery which is based on Windows 2000 and outputs to a HP Laserjet printer via the parallel port. Unfortunately, the software on the machine does not allow additional software or printers to be installed.
The problem is that whilst the captured output appears to be PCL graphic data, I have not found any tools which can convert it - GhostPCL attempts, and you can make out the text a little, but it is completely corrupted.
The captured output results in the output from GhostPCL
I can see that the captured output starts with:
ESC E (PCL command for Reset)
ESC &l0L (PCL command to disable skip perforation)
ESC &r1U (*** UNKNOWN ***)
ESC &l1H (PCL command to Feed from tray 2)
ESC *o0M (*** UNKNOWN ***)
ESC &126A (PCL command for A4 portrait paper)
ESC *g8W (PCL command to configure raster data - 8 bytes)
I can see that the captured output has some PCL codes which do not appear in the official documentation, which results in the weird characters at the start of the PDF.
Does anyone know how to convert this file to PDF ?
Your description shows an attempt to read a language different to pcl, so was the older system designed to talk to a default printer using Epson ESCAPE encoding. so its a dot printing file that the hardware will position those dots in the correct place and pressure, you could try converting to a bmp then massage the image into a pdf page.
You say an HP is connected but is that the true capture of what it is agreeing to use at runtime?
For example If I attempt to save my HP inkjet print file at time of printing I will get a PDF ! but why since the printer normally cant handle those direct?
What may I find If I look and see the default printing language is not set to a PCL or a PJL one.
There are many pcl language variations so a PRN file ideally should have some compatibility declaration such as #PJL ENTER LANGUAGE = PCLXL ) HP-PCL XL;2; Note this is NOT an HP printer just one that declares the following code will be HP style.
The printer can accept many formats and the system can produce many different formats for one printer. Thus you need to check all the system settings to understand what language is actually in run time use. Are you sure that .PRN is a full load of the conversation between the system & printer as print to file is not always the expected 2 way code.
The best way to ensure you capture true printer driver output is to change the drivers output PORT to a fixed filename and ideally use the correct format extension NOT unspecified .prn or .pcl if it is not such.

Printing a QRP via a PDF printer results in cut-off footer, can I prevent this?

I am generating various invoices, shipping manifests and similar documents via QRPs from an ERP program written in TD 4.1.
When my customer just prints these regularly from the program to a normal printer, they come out fine.
The customer also prints them to PDF via FreePDF XP, this happens from the printing dialogue (FreePDF XP being selected as a printer).
This results in part of the right side and the footer being cut off.
Format-wise, the reports are using Paper Style A4, page margins are top=0.8, bottom=0.85, left=0.95, right=1.0. The PDF printer is also set to A4, but has no margin settings available.
I'm grasping for straws here, but is there any way I can make this work from within the report or possibly programmatically, or is this purely on the printer driver side?
Oh, decreasing the width/height is not an option for these documents, sadly.
Pity you don't use a newer version. With TD5 and newer you can create PDFs with the integrated Report Builder, so you don't need any 3rd party tool.
Couple of ideas:
SalReportPrintToFile() and eMail the file.
SalPrtSetParmNum( PRT_nMarginTop, nMargin) ( i.e. adjust the margins via TD app for PDF's )
Have a separate .qrp for PDF's with the larger margins already preset in the qrp.
Is it possible to try the output on another pdf printer as well ? If possible try the output on another pdfprinters like PDF24Creator also.
If available in version version 4.1, have a look on SalReportSetPrinterSettings( ) function and its parameters.
bOk = SalReportSetPrinterSettings (hWndReport, strPrinterName, nOrientation, nPaperType, nWidth, nHeight)
SalReportSetPrinterSettings function sets the printer properties at runtime. The function can be called from the message action of SAM_ReportStart message.
Passing an invalid value in a parameter causes that parameter to be ignored, and the default setting will be used instead.
3.If feasible can try third party paid tools like BullZipPDFPrinter.apt that you can be intagrate with TD.

Is there any way to have an Adobe PDF Fragment accept parameters to change its behavior?

I'm looking to create an adobe pdf fragment (footer) with a name, address, and phone number. However, some documents require a different phone number for international usage. Instead of creating 2 fragments and using a Choice subform, I was hoping there was a way to create a single fragment that had the phone number dynamically generate based on some property.
Is there any way to do what I'm thinking, or do I have to stick with 2 separate fragments + a choice subform?
Further clarification:
My thought is this... if I can have the fragment use script to dynamically set the text of the phone number field, that would be great. The forms themselves would set some sort of variable or custom property or something that the fragment could use in its script.
You could use a hidden checkbox in the main form with an appropriate value and access it from the "form fragment" using adobe javascript.

Reading barcode using vb.net code

I need to add barcode reading feature to my application. I donot know how to enable my application to read barcodes.
I mean a scanner should read the barcode and having matched the article no. in database, info should be displayed on the screen.
Any code examples please?
Thanks
Most barcode scanners act like a keyboard.
There isn't anything special required.
Some scanners can send special key sequences so that you can focus the appropriate text field.

odd recording qtp

when i was creating text chepoing in qtp the recording results getting odd recording results
the scanned input is
alt text http://img22.imageshack.us/img22/8255/capture1pa.png
and i get output like this insted of secs it display sees
alt text http://img22.imageshack.us/img22/5273/capture2c.png
and i made change in text like this sees to secs
alt text http://img801.imageshack.us/img801/7492/capture4f.png
but when i run the test the test result will be
alt text http://img94.imageshack.us/img94/2575/capture3z.png
I captured many times but it display same as above. I don't understand how display like this, please help me.
The problem is that QTP recognizes the word secs in your application as sees, which causes the checkpoint to fail. Most probably, this happens because the text recognition is performed using OCR, which can't guarantee 100% accuracy. You can try changing the text recognition mechanism to Windows API and see if that helps. To do this, go to Tools > Options > General > Text Recognition and set the Use text recognition mechanisms in this order option to either Use Only Windows API or First Windows API then OCR.
If this doesn't help, you can replace the word secs in the checkpoint's Checked Text with a regular expression that matches both secs and sees:
[0-9]+ days, [0-9]+ hours, [0-9]+ mins, [0-9]+ se[ce]s
Also, make sure that the Regular Expression option is turned on for the Checked Text.