[Foomatic] Please add my driver for the Lexmark X125 to the database

Till Kamppeter till.kamppeter at gmx.net
Tue Feb 17 09:11:33 PST 2004


Sorry for the late answe. Somehow I havn´t seen your posting that time 
(probably due to the Linux Solutions here in Paris).

The problem are the restrictions to UI strings in PPD files imposed by 
Adobe. If they are not fulfilled in the Foomatic PPD files some software 
will not work correctly. Especially CUPS 1.1.19 and newer does not 
accept non-Adobe-conforming PPD files.

The restrictions are (both for options and choices/enum vals):

short name (used for specifying the option/choice on the command line):

- No "/" is allowed as "/" is used to separate short name and long name 
in the PPD file.

- No ":" is allowed as ":" separates choice names from the PostScript 
code to be inserted in the PPD file

long name (used to specify the option/choice in menues of GUIs)

- "/" is allowed but ":" not

In general, for short names only printable 7-bit ASCII characters are 
allowed (no internationalization), and for the long names 8-bit ASCII 
(internationalization possible).

Driver values have no restrictions by Foomatic or PPD files, they will 
be appropriately quoted in the PPD.

So for example for your case use

short name    long name      driver value
-------------------------------------------
lp0           /dev/lp0       /dev/lp0
lp1           /dev/lp1       /dev/lp1
...
usb_lp0       /dev/usb/lp0   /dev/usb/lp0
...
usblp0        /dev/usblp0    /dev/usblp0
...

The

-----------------------------------------------------------
/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 348.
Use of uninitialized value in split at
/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 350.
Use of uninitialized value in split at
...
-----------------------------------------------------------

are only warnings and do not cause any problems. You can ignore them.

They appear due to the new "use strict;" in the script. Remove the "use 
strict;" if the messages annoy you. We will sooner or later try to 
remove these messages. Patches are naturally welcome. That is simply 
Perl, has nothing to do with libxml.

    Till


Mark Roth wrote:
> Can anyone help answer this question?  I'd really like to get this working but
> am stuck without an answer.
> 
> Thanks,
> Mark
> 
> In article <bvv7kv$g4r$1 at poblano.linuxprinting.org>, markroth8 at yahoo.com (Mark
> Roth) writes:
> 
>>Hi Till,
>>
>>I'm in the process of trying my driver with Foomatic 3.0.1rc2 as you
> 
> suggested.
> 
>> I've run into a couple of issues.
>>
>>I'm running Red Hat 9.	I rpm -e foomatic and then built and installed the
>>packages you suggested.  I was having a bit of trouble with
> 
> foomatic-db-engine.
> 
>> In particular I had to ln -s /usr/include/gnome-xml /usr/include/libxml and
>>manually add -lxml to the XML_LIBS in Makefile.  After I did this, I got
>>everything to build and install with no noticeable errors.  I'm using
>>libxml-1.8.17-8 so this might have something to do with it.
>>
>>In any event, my main problem is that I installed my driver .xml files and
> 
> I'm
> 
>>having trouble with my opt/drv_x125-Device.xml option file.  The file looks
>>like this:
>>
>>-----
>><option type="enum" id="opt/drv_x125-Device">
>>  <!-- A multilingual <comments> block can appear here, too;
>>       it should be treated as documentation for the user. -->
>>  <arg_longname>
>>   <en>Device</en>
>>  </arg_longname>
>>  <arg_shortname>
>>   <en>Device</en><!-- backends only know <en> shortnames! -->
>>  </arg_shortname>
>>  <arg_execution>
>>   <arg_order>100</arg_order>
>>   <arg_spot>A</arg_spot>
>>   <arg_substitution />
>>   <arg_proto>%s</arg_proto>
>>  </arg_execution>
>>  <constraints>
>>     <constraint sense='true'>
>>      <driver>drv_x125</driver>
>>      <printer>printer/Lexmark-X125</printer><!-- Lexmark X125 -->
>>      <arg_defval>ev/drv_x125-dev_usb_lp0</arg_defval>
>>     </constraint>
>>  </constraints>
>>  <enum_vals>
>>   <enum_val id="ev/drv_x125-dev_usb_lp0">
>>    <ev_longname><en>/dev/usb/lp0</en></ev_longname>
>>    <ev_shortname><en>/dev/usb/lp0</en></ev_shortname>
>>    <ev_driverval>/dev/usb/lp0</ev_driverval>
>>   </enum_val>
>>   <!-- ... more options ... -->
>>  </enum_vals>
>></option>
>>-----
>>
>>This used to work in foomatic-2.0.2-15.1 but when I do this today, my driver
>>gets passed the string /dev/usb/lp0//dev/usb/lp0
>>
>>I modified the default option as follows, just so I could see what is going
> 
> on:
> 
>>-----
>>   <enum_val id="ev/drv_x125-dev_usb_lp0">
>>    <ev_longname><en>/dev/usb/lp0a</en></ev_longname>
>>    <ev_shortname><en>/dev/usb/lp0b</en></ev_shortname>
>>    <ev_driverval>/dev/usb/lp0c</ev_driverval>
>>   </enum_val>
>>-----
>>
>>I then get /dev/usb/lp0b//dev/usb/lp0a
>>
>>Of course I'm expecting to just get /dev/usb/lp0c.
>>
>>Now when I change the longname to something without slashes, like:
>>
>>-----
>>   <enum_val id="ev/drv_x125-dev_usb_lp0">
>>    <ev_longname><en>foo</en></ev_longname>
>>    <ev_shortname><en>bar</en></ev_shortname>
>>    <ev_driverval>/dev/usb/lp0</ev_driverval>
>>   </enum_val>
>>-----
>>
>>... then everything works.  I can even print!
>>
>>Is this behavior correct?  Are there restrictions on the ev_longname and
>>ev_shortname options in terms of being able to have a slash there?  I'd
> 
> really
> 
>>like to have the long/short name match the value in ev_driverval.  I'm also
>>getting strange error messages from foomatic-config when configuring the
> 
> queue,
> 
>>like:
>>
>>-----
>>Use of uninitialized value in split at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 348.
>>Use of uninitialized value in split at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 350.
>>Use of uninitialized value in split at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 348.
>>Use of uninitialized value in split at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 350.
>>Use of uninitialized value in split at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 348.
>>Use of uninitialized value in split at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 350.
>>Use of uninitialized value in split at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 348.
>>Use of uninitialized value in split at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 350.
>>Use of uninitialized value in split at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 2230.
>>Use of uninitialized value in split at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 2230.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3361.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3362.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3363.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3364.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3361.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3362.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3363.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3364.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3361.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3362.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3363.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3364.
>>Use of uninitialized value in concatenation (.) or string at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3366.
>>Use of uninitialized value in concatenation (.) or string at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3366.
>>Use of uninitialized value in concatenation (.) or string at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3366.
>>Use of uninitialized value in substitution (s///) at
>>/usr/lib/perl5/site_perl/5.8.0/Foomatic/DB.pm line 3381.
>>-----
>>
>>Is this something to do with my version of libxml?  I'd like my choice to
> 
> read
> 
>>/dev/usb/lp0 and not 'foo' or 'bar'.  How can I fix this issue?
>>
>>Thanks,
>>Mark
> 
> _______________________________________________
> Foomatic-devel mailing list
> Foomatic-devel at linuxprinting.org
> http://www.linuxprinting.org/cgi-bin/mailman/listinfo/foomatic-devel
> 
> 






More information about the Printing-foomatic mailing list