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

Ameer Hamza <[email protected]> Tue, 2 Dec 2025 15:33:29 +0500
Newsgroups gmane.linux.printing.gimp-print.devel
Message-ID <CA+5weo283om42Zb-T-pW46WV0ZijyOijp_0KmLdGyQ72vtXpbw@mail.gmail.com>
--===============1356689762504219742==
Content-Type: multipart/alternative; boundary="0000000000002569b40644f5a13e"

--0000000000002569b40644f5a13e
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Dear Gutenprint Developers,

I hope you are doing well.

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*.

On HP printers my solution works well (PJL + PDF printing through USB Host
API).
However, Canon PIXMA printers (such as *Canon PIXMA iP4000R*) require *BJ/B=
JL
raster protocols*, which are not publicly documented.

During my research, I discovered that:

   -

   Gutenprint is the only open-source project that provides *full BJ Raster
   support* for older Canon PIXMA models.
   -

   Many Android printing apps (such as PrinterShare/NokoPrint) appear to
   rely on Gutenprint-based drivers.
   -

   The Gutenprint source tree contains the logic I need, but I am unsure
   how to correctly extract or port only the necessary Canon backend
   components.

I am reaching out to kindly request your technical guidance.
------------------------------
*=F0=9F=93=8C What I am trying to accomplish*

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 endpoint=
s).

I do *not* need CUPS or spoolers =E2=80=94 only:

   -

   bitmap =E2=86=92 Gutenprint renderer =E2=86=92 Canon BJ raster byte stre=
am
   -

   which I will send to the printer over USB

------------------------------
*=F0=9F=93=8C My Questions* *1. What is the recommended way to compile Gute=
nprint for
Android?*

   -

   Can the Canon BJ backend be compiled *standalone* (without full CUPS)?
   -

   Which directories / source files are required for models like *iP4000R*?
   -

   Are there build flags to disable unnecessary drivers?

*2. Which internal Gutenprint APIs should be used to render a page?*

For example:

   -

   The function(s) that take raster input (RGB/mono bitmap) and output
   encoded BJ Raster commands
   -

   Initialization / job-start / per-line / job-end functions
   -

   Any structure or API that maps directly to the =E2=80=9CCanon Print Pipe=
line=E2=80=9D

A minimal example (pseudo-code or call sequence) would be extremely helpful=
.
*3. Does Gutenprint expose a stable internal API for:*

   -

   setting DPI
   -

   page size
   -

   color/mono mode
   -

   selecting Canon model (e.g., iP4000R)
   -

   receiving the fully encoded output buffer?

*4. Is there any documentation, diagrams, or implementation notes available
for:*

   -

   Canon BJ Raster / BJL / BJPL protocol
   -

   Model-specific quirks (iP4000R in particular)

Even partial internal notes or hints would be very valuable.
*5. Licensing clarification*

If I statically or dynamically link the Gutenprint encoder library inside
an Android APK:

   -

   What is the correct way to comply with GPL/LGPL requirements?
   -

   Are there any restrictions on distributing Gutenprint inside a
   commercial Android application?

------------------------------
*=F0=9F=93=8C Summary of What I Need*

I would appreciate your guidance on:

   -

   How to build *only* the Canon BJ backend for Android
   -

   How to call the Gutenprint API to generate raster bytes
   -

   Whether there is an example or minimal program showing =E2=80=9Cbitmap =
=E2=86=92 Canon
   print data=E2=80=9D
   -

   Any documentation or tips available for Canon BJ protocols

I am happy to contribute back documentation, Android build instructions,
and sample code after I get it working.

Thank you very much for your time, the great work you have done, and any
help you can provide.
Gutenprint is an incredible project and it would be wonderful to make it
usable on Android.

Looking forward to your response.

Best regards,
*Muhammad Usman*
(Android USB Printing Developer)

--0000000000002569b40644f5a13e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">

<p>Dear Gutenprint Developers,</p>
<p>I hope you are doing well.</p>
<p>I am currently developing a <strong>cross-platform printing application =
for Android (Flutter + Kotlin + USB OTG)</strong> that aims to support a wi=
de range of printers, including HP, Epson, Brother, and especially <strong>=
Canon PIXMA BubbleJet printers</strong>.</p>
<p>On HP printers my solution works well (PJL + PDF printing through USB Ho=
st API).<br>
However, Canon PIXMA printers (such as <strong>Canon PIXMA iP4000R</strong>=
) require <strong>BJ/BJL raster protocols</strong>, which are not publicly =
documented.</p>
<p>During my research, I discovered that:</p>
<ul><li>
<p>Gutenprint is the only open-source project that provides <strong>full BJ=
 Raster support</strong> for older Canon PIXMA models.</p>
</li><li>
<p>Many Android printing apps (such as PrinterShare/NokoPrint) appear to re=
ly on Gutenprint-based drivers.</p>
</li><li>
<p>The Gutenprint source tree contains the logic I need, but I am unsure ho=
w to correctly extract or port only the necessary Canon backend components.=
</p>
</li></ul>
<p>I am reaching out to kindly request your technical guidance.</p>
<hr>
<h2><strong>=F0=9F=93=8C What I am trying to accomplish</strong></h2>
<p>I want to use Gutenprint on <strong>Android (ARM 64-bit)</strong> to gen=
erate correct raster print data for Canon PIXMA printers, and then send tha=
t data directly to the printer using Android=E2=80=99s USB Host API (bulk e=
ndpoints).</p>
<p>I do <strong>not</strong> need CUPS or spoolers =E2=80=94 only:</p>
<ul><li>
<p>bitmap =E2=86=92 Gutenprint renderer =E2=86=92 Canon BJ raster byte stre=
am</p>
</li><li>
<p>which I will send to the printer over USB</p>
</li></ul>
<hr>
<h2><strong>=F0=9F=93=8C My Questions</strong></h2>
<h3><strong>1. What is the recommended way to compile Gutenprint for Androi=
d?</strong></h3>
<ul><li>
<p>Can the Canon BJ backend be compiled <em>standalone</em> (without full C=
UPS)?</p>
</li><li>
<p>Which directories / source files are required for models like <strong>iP=
4000R</strong>?</p>
</li><li>
<p>Are there build flags to disable unnecessary drivers?</p>
</li></ul>
<h3><strong>2. Which internal Gutenprint APIs should be used to render a pa=
ge?</strong></h3>
<p>For example:</p>
<ul><li>
<p>The function(s) that take raster input (RGB/mono bitmap) and output enco=
ded BJ Raster commands</p>
</li><li>
<p>Initialization / job-start / per-line / job-end functions</p>
</li><li>
<p>Any structure or API that maps directly to the =E2=80=9CCanon Print Pipe=
line=E2=80=9D</p>
</li></ul>
<p>A minimal example (pseudo-code or call sequence) would be extremely help=
ful.</p>
<h3><strong>3. Does Gutenprint expose a stable internal API for:</strong></=
h3>
<ul><li>
<p>setting DPI</p>
</li><li>
<p>page size</p>
</li><li>
<p>color/mono mode</p>
</li><li>
<p>selecting Canon model (e.g., iP4000R)</p>
</li><li>
<p>receiving the fully encoded output buffer?</p>
</li></ul>
<h3><strong>4. Is there any documentation, diagrams, or implementation note=
s available for:</strong></h3>
<ul><li>
<p>Canon BJ Raster / BJL / BJPL protocol</p>
</li><li>
<p>Model-specific quirks (iP4000R in particular)</p>
</li></ul>
<p>Even partial internal notes or hints would be very valuable.</p>
<h3><strong>5. Licensing clarification</strong></h3>
<p>If I statically or dynamically link the Gutenprint encoder library insid=
e an Android APK:</p>
<ul><li>
<p>What is the correct way to comply with GPL/LGPL requirements?</p>
</li><li>
<p>Are there any restrictions on distributing Gutenprint inside a commercia=
l Android application?</p>
</li></ul>
<hr>
<h2><strong>=F0=9F=93=8C Summary of What I Need</strong></h2>
<p>I would appreciate your guidance on:</p>
<ul><li>
<p>How to build <strong>only</strong> the Canon BJ backend for Android</p>
</li><li>
<p>How to call the Gutenprint API to generate raster bytes</p>
</li><li>
<p>Whether there is an example or minimal program showing =E2=80=9Cbitmap =
=E2=86=92 Canon print data=E2=80=9D</p>
</li><li>
<p>Any documentation or tips available for Canon BJ protocols</p>
</li></ul>
<p>I am happy to contribute back documentation, Android build instructions,=
 and sample code after I get it working.</p>
<p>Thank you very much for your time, the great work you have done, and any=
 help you can provide.<br>
Gutenprint is an incredible project and it would be wonderful to make it us=
able on Android.</p>
<p>Looking forward to your response.</p>
<p>Best regards,<br><strong>Muhammad Usman</strong><br>
(Android USB Printing Developer)</p>

<br></div>

--0000000000002569b40644f5a13e--


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


--===============1356689762504219742==
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

--===============1356689762504219742==--