openprinting / foomatic-db-engine Goto Github PK
View Code? Open in Web Editor NEWOpenPrinting printer support database - database engine
License: GNU General Public License v2.0
OpenPrinting printer support database - database engine
License: GNU General Public License v2.0
Windows 10 and 11 require 1284DeviceID to contain MFG
and MDL
elements, otherwise the shared printer would silently fail upon adding (or install endlessly, without any error).
foomatic-ppdfile, from which foo2zjs generates .ppd files, doesn't seem to use general <manufacturer>
and <model>
XML elements for 1284DeviceID
generation, requiring them to be in <autodetect>
section, at least supplied as <generic>
autodetect method.
In case of missing <autodetect>
section, general <manufacturer>
and <model>
should be used for 1284DeviceID
generation.
I'm having issues with the default PDF to PS renderer pdftops
in ptouch-driver. As explained in the cups-filters README, the pdftops-renderer
print option can be set either per job with lpr -o pdftops-renderer=gs
or per queue with lpadmin -o pdftops-renderer-default=gs
, which makes those issues go away.
The following posting suggests that there's a way to set pdftops-renderer
from PPD files as well. However, the following PPD code has no effect:
*OpenUI *pdftops-renderer: PickOne
*Defaultpdftops-renderer: gs
*pdftops-renderer gs/GhostScript: ""
*CloseUI: *pdftops-renderer
Is there a way to define pdftops-renderer
or pdftops-renderer-default
in a Foomatic xml file? Note that the print option doesn't add any Foomatic command-line arguments like <arg_substitution>
or PostScript code like <arg_postscript>
. I couldn't figure out a way to pass printer options from the CUPS PPD Extensions specfication, either. Thanks for any help!
When a printer has a Resolution
option, foomatic will usually generate code for a user interface element in the PPD file, including a *DefaultResolution
statement. When there is only a single choice for the Resolution, something like this will end up in the PPD file instead, however:
*FoomaticRIPOption Resolution: enum CmdLine A 100
*FoomaticRIPOptionSetting Resolution=300dpi: " -r300"
In this case, the *DefaultResolution
statement is missing entirely. The problem with that is that the *DefaultResolution
statement is meaningful even when there is no choice of resolutions. Without it, users of the PPD file will have no idea what the resolution of the printer should be.
A workaround for this is to add a <ppdentry>
to the printer definition, but since foomatic does know the resolution, it should really be smart enough to add the *DefaultResolution
entry automatically.
I'm looking for a reasonable way to hard-wire the value of an option for a specific printer. For example, with the following shortened definition, I can define the default value of the option:
<option type="enum" id="opt/Resolution">
<arg_longname><en>Resolution</en></arg_longname>
<arg_shortname><en>Resolution</en></arg_shortname>
<arg_execution> ... </arg_execution>
<constraints>
<constraint sense="true">
<driver>driver</driver>
<printer>printer</printer>
<arg_defval>ev/300dpi</arg_defval>
</constraint>
</constraints>
<enum_vals>
<enum_val id="ev/300dpi">
<ev_driverval>300</ev_driverval>
...
</enum_val>
<enum_val id="ev/600dpi">
<ev_driverval>600</ev_driverval>
...
</enum_val>
</enum_vals>
</option>
If I add constraints on the enum_vals so that only a single option remains available for a printer, the option will disappear fro user interfaces and it will effectively be hard-wired.
However, for options that always have exactly one value for each supported printers, this still requires adding an enum for each possible choice, and some boilerplate code. It obviously doesn't work at all for options that have free values.
What I'd ideally like to do is to directly define the driverval, so something like <arg_val>300</arg_val>
instead of <arg_defval>ev/300dpi</arg_defval>
. Is there a way to do that already?
README says that it is Foomatic 4.1.0 but there is no any git tags i tis repo.
(In https://github.com/OpenPrinting/foomatic-db-engine-4 as well)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.