Skip to content

Commit

Permalink
fix specs in ppd file for each models and make compilation more easy
Browse files Browse the repository at this point in the history
  • Loading branch information
missla committed Apr 8, 2022
1 parent ae80832 commit cc92333
Show file tree
Hide file tree
Showing 2 changed files with 258 additions and 110 deletions.
11 changes: 10 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
SUBDIRS = src tests

SUBDIRS = src
dist_doc_DATA = SPECS INSTALL.git
EXTRA_DIST = src/canon-lbp.drv ppd
nodist_data_DATA = Makefile.in

ppd: src/canon-lbp.drv
LC_ALL=C ppdc src/canon-lbp.drv -d ./ppd

clean-ppd:
-rm -rf ppd
357 changes: 248 additions & 109 deletions src/canon-lbp.drv
Original file line number Diff line number Diff line change
Expand Up @@ -13,124 +13,263 @@
#media "SAC32K/SAC 32K" 130mm 184mm

Copyright "(C)2020 Moses Chong"
ColorModel "Gray/Grayscale" k chunky 2
Filter application/vnd.cups-raster 1 rastertocapt
ColorModel "Gray/Grayscale" k chunky 2
Filter application/vnd.cups-raster 1 rastertocapt
*Manufacturer "Canon Inc"
Version 0.1.3
Version 0.1.3
{
Font *

// Common Sizes
*MediaSize A4
MediaSize A5
MediaSize A6
MediaSize B6
MediaSize C6
MediaSize EnvC5
MediaSize EnvC6
MediaSize EnvChou3
MediaSize EnvDL
MediaSize Env10
MediaSize EnvItalian
MediaSize Executive // US 7.25x10.5 inch
MediaSize Folio // SE Asian F4
MediaSize Legal
MediaSize Letter
MediaSize SISG5
MediaSize SISE5
MediaSize SAC16K
MediaSize SAC32K

// Less Common Sizes
/*
* Sizes A6 and larger, and no wider than US Legal have
* been included here.
*
* PROTIP: Delete this section and recompile PPD, for a
* less cluttered Paper Size menu in most applications,
* if you don't use these sizes. If you use any of them,
* move the sizes you need from below to the section above,
* then delete the rest.
*
* NOTE: Some of the sizes appear to be identical to
* another at least in terms of width and length. There
* could be other differences, and may be useful in managing
* multiple trays on printers that support them.
*
*/
MediaSize 7x9
MediaSize 8x10
MediaSize A4Small // Same dimensions as A4
MediaSize A4Plus // Longer than Folio (F4) by just one point
MediaSize A5Extra
MediaSize B5
MediaSize B7
MediaSize DoublePostcard
MediaSize Env9
MediaSize Env11
MediaSize Env12
MediaSize Env14
MediaSize EnvC65
MediaSize EnvChou4
MediaSize EnvISOB5
MediaSize EnvISOB6
MediaSize EnvKaku3
MediaSize EnvMonarch
MediaSize EnvPersonal
MediaSize EnvPRC1
MediaSize EnvPRC2
MediaSize EnvPRC3
MediaSize EnvPRC4
MediaSize EnvPRC5
MediaSize EnvPRC6
MediaSize EnvPRC7
MediaSize EnvPRC8
MediaSize EnvYou4
MediaSize FanFoldGerman
MediaSize FanFoldGermanLegal
MediaSize ISOB5
MediaSize ISOB5Extra
MediaSize ISOB6
MediaSize ISOB7
MediaSize LetterPlus
MediaSize Note // Same dimensions as Letter (US)
MediaSize Postcard
MediaSize PRC16K
MediaSize PRC32K
MediaSize PRC32KBig
MediaSize Quarto
MediaSize Statement
// End Less Common Sizes

// Toner Save Option
Option "captTonerSave/Toner Save" Boolean AnySetup 10
*Choice False/Disabled "<</cupsCompression 0>>setpagedevice"
Choice True/Enabled "<</cupsCompression 1>>setpagedevice"

*Resolution k 1 70 592 0 "600dpi/600 DPI"
MaxSize 215.9mm 355.6mm // US Legal
MediaType 0 "Plain/Plain Paper"
MediaType 1 "Heavy/Heavy Paper"
MediaType 2 "PlainL/Plain Paper L"
MediaType 3 "HeavyH/Heavy Paper H"
MediaType 4 "Transparency"
MediaType 5 "Envelope"
VariablePaperSize yes
Option "captTonerSave/Toner Save" Boolean AnySetup 10
*Choice False/Disabled "<</cupsInteger0 0>>setpagedevice"
Choice True/Enabled "<</cupsInteger0 1>>setpagedevice"

{
// nearly matched to Alexey Galakhov's original 2011 specs
*ModelName "LBP2900/LBP3010 r2c"
FileName "Canon-LBP2900.ppd"
MinSize 75mm 105mm
HWmargins 4.7095835mm 4.7095835mm 4.709583mm 4.709583mm
*Resolution k 1 70 592 0 "600dpi/600 DPI"

/* LBP 2900/3000, with multi-page size and type support */
MediaType 0 "Plain/Plain Paper"
MediaType 1 "Heavy/Heavy Paper"
MediaType 2 "PlainL/Plain Paper L"
MediaType 3 "HeavyH/Heavy Paper H"
MediaType 4 "Transparency"
MediaType 5 "Envelope"

MinSize 76.2mm 127.0mm
MaxSize 215.9mm 355.6mm // US Legal
HWmargins 5mm 5mm 5mm 5mm

/*
* NOTE: Some of the sizes appear to be identical to
* another at least in terms of width and length. There
* could be other differences, and may be useful in managing
* multiple trays on printers that support them.
*
*/

/* Common Document Sizes */
VariablePaperSize yes
*MediaSize A4
MediaSize A5
MediaSize B5
MediaSize Executive // US 7.25x10.5 inch
MediaSize Folio // SE Asian F4
MediaSize Legal
MediaSize Letter
MediaSize SISG5
MediaSize SISE5
MediaSize SAC16K
MediaSize SAC32K

/* Less Common Document Sizes
*
* PROTIP: Delete this section and recompile PPD, if page size
* menus in your most used apps clutter up and cannot be managed.
* Any size below may be moved to the list above, before deleting
* this section.
*/
MediaSize 8x10
MediaSize A4Small // Same dimensions as A4
MediaSize A4Plus // Longer than Folio (F4) by just one point
MediaSize A5Extra
MediaSize A6
MediaSize B6
MediaSize B7
MediaSize DoublePostcard
MediaSize FanFoldGerman
MediaSize FanFoldGermanLegal
MediaSize ISOB5
MediaSize ISOB5Extra
MediaSize ISOB6
MediaSize ISOB7
MediaSize LetterPlus
MediaSize Note // Same dimensions as Letter (US)
MediaSize Postcard
MediaSize PRC16K
MediaSize PRC32K
MediaSize PRC32KBig
MediaSize Quarto
MediaSize Statement

/* Common Envelope Sizes */
HWmargins 10mm 10mm 10mm 10mm
MediaSize Env10
MediaSize EnvC5
MediaSize EnvChou4
MediaSize EnvDL
MediaSize EnvItalian

/* Less Common Envelope Sizes */
/*
* PROTIP: Delete this section as necessary. If any size below
* is needed, move it to the list above before deleting this section.
*
*/
MediaSize 7x9
MediaSize C6
MediaSize Env9
MediaSize Env11
MediaSize Env12
MediaSize Env14
MediaSize EnvC6
MediaSize EnvC65
MediaSize EnvChou3
MediaSize EnvISOB5
MediaSize EnvISOB6
MediaSize EnvKaku3
MediaSize EnvMonarch
MediaSize EnvPersonal
MediaSize EnvPRC1
MediaSize EnvPRC2
MediaSize EnvPRC3
MediaSize EnvPRC4
MediaSize EnvPRC5
MediaSize EnvPRC6
MediaSize EnvPRC7
MediaSize EnvPRC8
MediaSize EnvYou4

*ModelName "LBP2900/LBP3000 r2c"
FileName "CanonLBP-2900-3000.ppd"
PCFileName "CNLB2K9.ppd"
}

{
*ModelName "LBP3000 r2c"
FileName "Canon-LBP3000.ppd"
HWmargins 5mm 5mm 5mm 5mm
MinSize 75mm 105mm
PCFileName "CNLB3K.ppd"
// LBP3010, LBP3018, LBP3050

// Darkness
Group "PrinterSettings/Printer Settings"
Option "captDarkness/Darkness" PickOne AnySetup 10
Choice 0 "<</cupsInteger1 0>>setpagedevice"
Choice 1 "<</cupsInteger1 1>>setpagedevice"
Choice 2 "<</cupsInteger1 2>>setpagedevice"
Choice 3 "<</cupsInteger1 3>>setpagedevice"
Choice 4 "<</cupsInteger1 4>>setpagedevice"
Choice 5 "<</cupsInteger1 5>>setpagedevice"
Choice 6 "<</cupsInteger1 6>>setpagedevice"
*Choice 7 "<</cupsInteger1 7>>setpagedevice"
Choice 8 "<</cupsInteger1 8>>setpagedevice"
Choice 9 "<</cupsInteger1 9>>setpagedevice"
Choice 10 "<</cupsInteger1 10>>setpagedevice"
Choice 11 "<</cupsInteger1 11>>setpagedevice"
Choice 12 "<</cupsInteger1 12>>setpagedevice"
Choice 13 "<</cupsInteger1 13>>setpagedevice"
Choice 14 "<</cupsInteger1 14>>setpagedevice"
Choice 15 "<</cupsInteger1 15>>setpagedevice"

// Resolution
*Resolution k 1 160 595 0 "600x600dpi/600 DPI"
Resolution k 1 160 595 0 "600x400dpi/400 DPI"

/* LBP 3010/3018/3005, with multi-page size and type support */
MediaType 1 "Plain/Plain Paper"
MediaType 4 "Heavy/Heavy Paper"
MediaType 8 "PlainL/Plain Paper L"
MediaType 5 "HeavyH/Heavy Paper H"
MediaType 24 "Transparency"
MediaType 4 "Label"
MediaType 20 "Envelope"

MinSize 75mm 105mm
MaxSize 215.9mm 355.6mm // US Legal
HWmargins 4.7095835mm 4.7095835mm 4.709583mm 4.709583mm

/*
* NOTE: Some of the sizes appear to be identical to
* another at least in terms of width and length. There
* could be other differences, and may be useful in managing
* multiple trays on printers that support them.
*
*/

/* Common Document Sizes */
VariablePaperSize yes
*MediaSize A4
MediaSize A5
MediaSize B5
MediaSize Executive // US 7.25x10.5 inch
MediaSize Folio // SE Asian F4
MediaSize Legal
MediaSize Letter
MediaSize SISG5
MediaSize SISE5
MediaSize SAC16K
MediaSize SAC32K

/* Less Common Document Sizes
*
* PROTIP: Delete this section and recompile PPD, if page size
* menus in your most used apps clutter up and cannot be managed.
* Any size below may be moved to the list above, before deleting
* this section.
*/
MediaSize 8x10
MediaSize A4Small // Same dimensions as A4
MediaSize A4Plus // Longer than Folio (F4) by just one point
MediaSize A5Extra
MediaSize A6
MediaSize B6
MediaSize B7
MediaSize DoublePostcard
MediaSize FanFoldGerman
MediaSize FanFoldGermanLegal
MediaSize ISOB5
MediaSize ISOB5Extra
MediaSize ISOB6
MediaSize ISOB7
MediaSize LetterPlus
MediaSize Note // Same dimensions as Letter (US)
MediaSize Postcard
MediaSize PRC16K
MediaSize PRC32K
MediaSize PRC32KBig
MediaSize Quarto
MediaSize Statement

/* Common Envelope Sizes */
HWmargins 10mm 10mm 10mm 10mm
MediaSize Env10
MediaSize EnvC5
MediaSize EnvChou4
MediaSize EnvDL
MediaSize EnvItalian

/* Less Common Envelope Sizes */
/*
* PROTIP: Delete this section as necessary. If any size below
* is needed, move it to the list above before deleting this section.
*
*/
MediaSize 3x5
MediaSize 7x9
MediaSize C6
MediaSize Env9
MediaSize Env11
MediaSize Env12
MediaSize Env14
MediaSize EnvC6
MediaSize EnvC65
MediaSize EnvChou3
MediaSize EnvISOB5
MediaSize EnvISOB6
MediaSize EnvKaku3
MediaSize EnvMonarch
MediaSize EnvPersonal
MediaSize EnvPRC1
MediaSize EnvPRC2
MediaSize EnvPRC3
MediaSize EnvPRC4
MediaSize EnvPRC5
MediaSize EnvPRC6
MediaSize EnvPRC7
MediaSize EnvPRC8
MediaSize EnvYou4

// PPD file name
*ModelName "LBP3010/LBP3018/LBP3050 r2c"
FileName "CanonLBP-3010-3018-3050.ppd"
PCFileName "CNLB3K10.ppd"
}
}

}

0 comments on commit cc92333

Please sign in to comment.