Skip to content

Import Dave Coffin's HBPL1v1 code (and a few extras)#21

Open
JoesCat wants to merge 7 commits into
OpenPrinting:main-fixesfrom
JoesCat:hbpl1
Open

Import Dave Coffin's HBPL1v1 code (and a few extras)#21
JoesCat wants to merge 7 commits into
OpenPrinting:main-fixesfrom
JoesCat:hbpl1

Conversation

@JoesCat

@JoesCat JoesCat commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

At this point, there is still more to fix and add, but it is a start with issue #2 .

I'm looking at MediaCodes, and comparing the David's 2014 code

char *mname[13] = { //Known media types
	"",
	"NORMAL",		// 1=plain paper
	"THICK",		// 2=thick paper
	"HIGHQUALITY",		// 3=high quality paper
	"COAT2",		// 4=coated paper
	"LABEL",		// 5=label
	"ENVELOPE",		// 6=envelope
	"RECYCLED",		// 7=recycled
	"NORMALREV",		// 8=plain paper (reverse-side)
	"THICKSIDE2",		// 9=thick paper (reverse-side)
	"HIGHQUALITYREV",	// 10=high quality paper (reverse-side)
	"COATEDPAPER2REV",	// 11=coated paper (reverse-side)
	"RECYCLEREV"		// 12=recycled (reverse-side)
};

it appears we are looking at 2 classes of printers, where the 2nd class printer has...

{
	"",
	"NORMAL",		// 1=plain paper
	"NORMALREV",		// 8=plain paper (reverse-side)
	"HIGHQUALITY",		// 3=high quality paper
	"HIGHQUALITYREV",	// 10=high quality paper (reverse-side)
	"RECYCLE",		// 7=recycled
	"RECYCLEREV",		// 12=recycled (reverse-side)
	"LABEL",		// 5=label
	"THICK",		// 2=thick paper
	"THICKSIDE2",		// 9=thick paper (reverse-side)
	"COATEDPAPER2",		// 4=coated paper
	"COATEDPAPER2REV",	// 11=coated paper (reverse-side)
	"LETTERHEAD",
	"LETTERHEADREV",
	"PREPRINTED",
	"PREPRINTEDREV",
	"PREPUNCHED",
	"PREPUNCHEDREV",
	"COLOR",
	"COLORREV",
	"USER1",
	"USER1REV",
	"SPECIAL",
	"SPECIALREV",
	"ENVELOPE"		// 6=envelope
};

It may mean needing to create something similar to -z0 -z1 used with foo2zjs

@ValdikSS - Question to ask:

  • Should I continue adding to this pull request? (there is still more to add)
  • Should I separate these patches into individual Pull Requests?
  • Stop here? (as you may have other direction to follow)

JoesCat and others added 7 commits July 6, 2026 14:11
Merge hbpl1 parts of Dave Coffin's hbpl1.patch (located here):
https://web.archive.org/web/20160515134331/http://cybercom.net/~dcoffin/hbpl/hbpl1.patch
to current 2026jul5 foo2zjs

NOTE: Edits required on several files to sync-up to current code base.
Doing comparisons between 2014 files versus 2026 files similar to
hbpl1/hbpl2 added similar edits to hbpl1 files to get them closer
for general use.

NOTE: More edits are still required on several files.
Seeing my printer not supported for the last decade, and then seeing this:
"Works with Xerox Phaser 6010N OpenPrinting#6"
mikerr/foo2zjs#6
Got me interested in looking at adding HBPLv1.

Cloned Dell C1760, and then fetched data points from old PPD files.
e.g. -p1 which are then being picked up as an invalid paper size
In cups error_log manifesting as:
foo2hbpl1-wrapper: Unimplemented paper code 1

Have amended foo2hbpl1-wrapper.in to intepret paper sizes
paper parameters are also now being interpreted.
This has fixed for a Dell 1660w printer, running on Ubuntu 18.04

Import Shinbar's fix for paper_size cups error_log as seen here:
https://github.com/Shinbar/foo2zjs/commits/shinbar/dev2020/papersize/
Initially found here: OpenPrinting#2
Import Shinbar's fix for paper_size cups error_log as seen here:
https://github.com/Shinbar/foo2zjs/commits/shinbar/dev2020/papersize/
Initially found here: OpenPrinting#2
Import Shinbar's fix for paper_size cups error_log as seen here:
https://github.com/Shinbar/foo2zjs/commits/shinbar/dev2020/papersize/
Initially found here: OpenPrinting#2
Helps a little with debugging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants