Re: Request for Technical Guidance on Using Gutenprint for Android USB Printing (Canon PIXMA iP4000R)

Solomon Peachy via Gimp-print-devel <[email protected]> Fri, 5 Dec 2025 13:26:16 -0500
Newsgroups gmane.linux.printing.gimp-print.devel
Message-ID <[email protected]>
--===============2466739562539807923==
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="Ul/PVIaaofmnMaYA"
Content-Disposition: inline


--Ul/PVIaaofmnMaYA
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=E2=80=99s USB Host API (bulk endpoi=
nts).

Straightforward enough in principle.

>    bitmap =E2=86=92 Gutenprint renderer =E2=86=92 Canon BJ raster byte st=
ream

You also need a way to enumerate available print options and a mechanism=20
for specifying them when doing this rendering.

> *=F0=9F=93=8C My Questions* *1. What is the recommended way to compile Gu=
tenprint for
> Android?*

You will need to either get your application build process to use the=20
android NDK to build gutenprint mostly as-is, or you will need to port=20
the gutenprint source code into the "native" build process for android=20
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=20
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=
=20
extra models) than try to systematically disable the parts you don't=20
want.

>    Are there build flags to disable unnecessary drivers?

No, but you can disable what shows up in the printer list by removing=20
the xml files/entries (see src/xml/printers).  The names of those xml=20
files also generally correspond to src/main/print-???.c which contain=20
the family-specific rendering code.=20
=20
> *2. Which internal Gutenprint APIs should be used to render a page?*

=2E..You probably want the *external* APIs rather than the *internal*=20
ones. There is a "Developer's guide to gutenprint" document that is=20
generated using the contents of docs/developer that would be quite=20
informative.

>    Any structure or API that maps directly to the =E2=80=9CCanon Print Pi=
peline=E2=80=9D

No idea.

> A minimal example (pseudo-code or call sequence) would be extremely helpf=
ul.

The gutenprint CUPS integration (see src/cups/rastertogutenprint.c ) is=20
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=20
decades, yes.

> *4. Is there any documentation, diagrams, or implementation notes availab=
le
> for:*

All we have is what is embodied into the source code.  Beyond that I=20
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-f=
requently-asked-frequently-asked-questions

Please keep in mind that whatever you directly link with Gutenprint will=20
be subject to the same source code disclosure requirements as Gutenprint=20
itself. =20

For this reason, folks integrating Gutenprint typically do so by=20
invoking our CUPS driver binaries (eg rastertogutenprint) and=20
using/parsing PPDs to handle option selection. =20

That way you are only on the hook to supply the complete corresponding=20
source code only for the gutenprint components you actually ship.

 - Solomon
--=20
Solomon Peachy			      pizza at shaftnet dot org (email&xmpp)
                                      @pizza:shaftnet dot org   (matrix)
Dowling Park, FL                      speachy (libera.chat)

--Ul/PVIaaofmnMaYA
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE3H5Sx9DyiyB5hnENrGLLO/XVulEFAmkzI8UACgkQrGLLO/XV
ulHj7g/8D3Qvo25MA/uA87yVxsRtG3/vQ1MnI39GFGm7/JOnVk7VXfOpdQJiHl8k
BjeawWnFab2ygn8AzNxwH1hZmzrOe0arquRvBBB6VHsTVwTokQewlddBsqQjjXWf
AazSUbDhf7KYY4yb+HFbKprlVn/+mrGygNR7DcSkwehGte+pz3FSwos+yMaF1IcO
MFvIRgFPIvPc91TwA02Mo8NVDNXEiRjRQn018Zp/fc+rWRRQZCoqlH/bWFtXkWCm
UN8tDkBTR0K/nE67dMWB0DvNLn/l7yK/z928U08zlpd3Qs17FZvHjcGAu5zj3Ekm
j9dn3gQ9mBzL85+9csGofjgHS3Ldt5iuEqr2FNeNJxociJrcTbZXm27Qv7Gv7wRf
k0jgZCsVTt0a/BRi5bOOnCWc0jmM7mqspkW+lvAX2djzl4wspovMPLOl9PIvPN5Z
klaGh8B95USJ1GI9uV0252Er84o218UJm+7e+Yke9GpQpGV+N1+GSP6bJpWK6glm
Oea28i049TWsP2mOIcikRfYNN087AGecpnhDbF2ZBNgWJ5OFG/wvSCXP0tCz1795
kcb7ABq/Q3t3EVKCrqjdZzrwhI8bDHNub26ftv1qrfM8PB38nCokZR4kF3OqsdYN
a1TWjSrgrEGBB5iXF+pJEsOVaSZmDnSHZ7YVmSUHVv6Ph1XCYq0=
=snt3
-----END PGP SIGNATURE-----

--Ul/PVIaaofmnMaYA--


--===============2466739562539807923==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============2466739562539807923==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Gimp-print-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimp-print-devel

--===============2466739562539807923==--