Skip to content

sv99/rastertokpsl-re

Repository files navigation

rastertokpl

Kyocera KPSL filter for CUPS licensed under the Apache License Version 2.0. See the file "LICENSE" for more information.

The reason for development is unexpected printing errors with original driver. The problem in th non ASCII encoding of the file names for printed files.

FS-1020MFP

  • PPD path: /Library/Printers/PPDs/Contents/Resources/Kyocera FS-1020MFPGDI.ppd
  • Installed in the /Library/Printers/Kyocera/kpsl/rastertokpsl.app
  • Full path to the filter: /Library/Printers/Kyocera/kpsl/rastertokpsl.app/Contents/MacOS/rastertokpl

convert for russian letter in the name

Problem with utf8 simbols in the job title.

cups

Maverick 10.9.5 have cups version 1.7.2. El Capitan 10.11.4 have cups version 2.1.0 High Sierra 10.13.6 hav cups version 2.2.5

Documentation CUPS 1.7

cups web admin:631

cupsctl WebInterface=on
sudo launchctl unload -w /System/Library/LaunchDaemons/org.cups.cupsd.plist
sudo launchctl list | grep cupsd
sudo launchctl load -w /System/Library/LaunchDaemons/org.cups.cupsd.plist
sudo launchctl list | grep cupsd

Debug cups filters:

cupsctl --debug-logging
cupsctl --no-debug-logging

Print to file. Use printer/foo to convert to the printer format defined by the filters in the PPD file.

/usr/sbin/cupsfilter -p Kyocera_FS-1020MFPGDI_RE.ppd -m printer/foo data/d001.pdf -e > t.kpsl

Filter Chain debugging

Debian pages:

Dissecting and Debugging the CUPS Printing System

The cupsfilter Utility.

RasterView 1.4.1

install

./install.sh

On the El Capitan original driver not installed with error - Not found software for install.

Need copy kpsl/ to the /Library/Printers/Kyocera/. Installation with warning - printer worked!!

reverse engineering

Used CLion and IdaPro

OSX version have image symbols

Used JBIG-KIT 2.0 - link in the resources.

JBIG-KIT on github

cups filter internal

Raster API

Filter read raster stream and write pages in the stdout.

Some rewrites

Based on the existing realisation filters in the cups source: rastertohp.c and rastertoepson.c.

replace asciitounicode

Use ConvertUTF.c for UTF8 -> UTF16 conversion.

miniunit.h

miniunit.h

pdftoraster.sh rastertokpsl.sh rastertokpsl-re.sh

Direct call filters without cupsfilter. Used for developments and testing.

pdftoraster.sh - make raster file from pdf.

rastertokpsl.sh - convert raster file to the kpsl, using original filter.

rastertokpsl-re.sh - convert raster file to the kpsl? using re filter.

kpslcmp.pl

Perl script - simple check two kpsl files, skip from compare user, timestamp and title field from kpsl header.

data_kpslcmp.pl

Perl script, which generates kpsl files for all pdf files in the data directory, using original rastertokpsl and rastertokpsl-re filters and compare it.

rastertokpsl-re must be properly installed.

ToDo

kpsldump.pl - kpsl dumper.

CaBrigtness and CaContrast

Change +-100.

About

Reverse engineered Kyocera rastertokpsl filter for CUPS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published