cupsString doubt

shermin sherminismail at gmail.com
Tue Feb 10 03:18:34 PST 2009


Hi ,
I tried identifying this from the past couple of days and didnt find any answer.

1)You told to include some sort of header.How it can be done?????

We are in a confused state how to get the values in cupsString if a user types his data in a text file or .doc file.How this value is not converting to raster data and getting it as a string value in page header.???

In our case image and text will come in one print job so that image to go for printing using filter and text to go for magnetic encoding.


2)Whether we need to modify in pstoraster source code for getting the cupsString value??
I am using cups-1.3.7.

Please help.I am stuck up here.

regards,
Shermin

> shermin wrote:
> > Hi,
> >
> >  1) If i write the data for magnetic encoding in a text file,can I get those values in Page header using cupsString????
>
> An ordinary text file won't work.  You'd need to include some sort
> of header so that CUPS could identify it as a special format instead.
>
> > 2)Also Why to write the application for generating postscript file
>
> To insert your magstrip data, for example the following PostScript
> code will put the string "867-5309" in the cupsString1 attribute of
> the page header:
>
>      <</cupsString1(867-5309)>>setpagedevice
>
> > 3)How it will be linked to the cups Flow???
>
> If you implement it as a filter in CUPS (using your own .types and
> ..convs files in /etc/cups), then your program will be run as a
> filter.
>
> If you implement it as a standalone application, then your program's
> output needs to be sent to CUPS; for a simple application that writes
> a PostScript file to stdout:
>
>      yourprogram options "867-5309" ... | lp -d yourprinter
>
> BUT REMEMBER - this is only needed to support printing with older
> versions of CUPS.  CUPS 1.2 and higher support custom string options
> so you could just do:
>
>      lp -d yourprinter -o MagStrip=Custom.867-5309 filename
>
> to get the printer commands embedded by the standard PostScript
> filter.  An example of this is included in the CUPS sources and
> documentation (http://www.cups.org/documentation.php/spec-ppd.html).
>
> >
> >
> > Shermin
> >
> >
> >> shermin wrote:
> >>> Hi,
> >>>
> >>> I am writing the code for Magnetic encoding for my smart card
> >>> printers.I am using a special font for this.I thought of identifying
> >>> the special font for magnetic encoding so that whenever that font is
> >>> found in a job file ,it should be gone for magnetic encoding rather
> >>> than printing blankly.So is there any method to identify the font
> >>> from the raster data.If not ,how can be this achieved.???
> >> You can't recover the text from raster data.
> >>
> >> That said, I'd use a page attribute (cupsString1 through
> >> cupsString16 are available, each supporting up to 63 characters + nul)
> >> to pass the string(s) for the mag strip.  A custom option can be used
> >> to set the value, and/or you can write a small application that
> >> creates a PostScript file containing the image for the card and the
> >> string(s) for the mag strip.
> >>
> >> --
> >> ______________________________________________________________________
> >> Michael Sweet, Easy Software Products           mike at easysw dot com
> >
> > _______________________________________________
> > cups mailing list
> > cups at easysw.com
> > http://lists.easysw.com/mailman/listinfo/cups
>
>
> --
> ______________________________________________________________________
> Michael R Sweet                        Senior Printing System Engineer
>





More information about the cups mailing list