|
From: Solomon P. <pi...@sh...> - 2025-12-05 19:34:03
|
On Tue, Dec 02, 2025 at 03:33:29PM +0500, Ameer Hamza wrote: > I am currently developing a *cross-platform printing application for > Android (Flutter + Kotlin + USB OTG)* that aims to support a wide range of > printers, including HP, Epson, Brother, and especially *Canon PIXMA > BubbleJet printers*. Can it really be called "cross-platform" if it only runs on Android? > I want to use Gutenprint on *Android (ARM 64-bit)* to generate correct > raster print data for Canon PIXMA printers, and then send that data > directly to the printer using Android’s USB Host API (bulk endpoints). Straightforward enough in principle. > bitmap → Gutenprint renderer → Canon BJ raster byte stream You also need a way to enumerate available print options and a mechanism for specifying them when doing this rendering. > *📌 My Questions* *1. What is the recommended way to compile Gutenprint for > Android?* You will need to either get your application build process to use the android NDK to build gutenprint mostly as-is, or you will need to port the gutenprint source code into the "native" build process for android applications. > Can the Canon BJ backend be compiled *standalone* (without full CUPS)? "backend" has specific meaning with CUPS -- it refers to the part of the stack that passes data to the printer. > Which directories / source files are required for models like *iP4000R*? It will probably be less work to include everything (and simply not use the extra models) than try to systematically disable the parts you don't want. > Are there build flags to disable unnecessary drivers? No, but you can disable what shows up in the printer list by removing the xml files/entries (see src/xml/printers). The names of those xml files also generally correspond to src/main/print-???.c which contain the family-specific rendering code. > *2. Which internal Gutenprint APIs should be used to render a page?* ...You probably want the *external* APIs rather than the *internal* ones. There is a "Developer's guide to gutenprint" document that is generated using the contents of docs/developer that would be quite informative. > Any structure or API that maps directly to the “Canon Print Pipeline” No idea. > A minimal example (pseudo-code or call sequence) would be extremely helpful. The gutenprint CUPS integration (see src/cups/rastertogutenprint.c ) is an example of those APIs in action. > *3. Does Gutenprint expose a stable internal API for:* In the sense that the API hasn't meaningfully changed for a couple of decades, yes. > *4. Is there any documentation, diagrams, or implementation notes available > for:* All we have is what is embodied into the source code. Beyond that I suggest you reach out to Canon. > *5. Licensing clarification* > What is the correct way to comply with GPL/LGPL requirements? https://www.fsf.org/blogs/licensing/licensing-and-compliance-lab-the-most-frequently-asked-frequently-asked-questions Please keep in mind that whatever you directly link with Gutenprint will be subject to the same source code disclosure requirements as Gutenprint itself. For this reason, folks integrating Gutenprint typically do so by invoking our CUPS driver binaries (eg rastertogutenprint) and using/parsing PPDs to handle option selection. That way you are only on the hook to supply the complete corresponding source code only for the gutenprint components you actually ship. - Solomon -- Solomon Peachy pizza at shaftnet dot org (email&xmpp) @pizza:shaftnet dot org (matrix) Dowling Park, FL speachy (libera.chat) |