Coder Social home page Coder Social logo

sahilarora535 / cups-filters-gsoc-2017 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.65 MB

GSoC 2017 - Add PCLm support to CUPS FILTERS

License: Other

Makefile 0.91% Shell 2.79% C 70.35% M4 2.36% C++ 21.36% PostScript 0.15% Roff 1.69% Perl 0.13% XS 0.17% PHP 0.06% Perl 6 0.02%

cups-filters-gsoc-2017's People

Contributors

sahilarora535 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

cups-filters-gsoc-2017's Issues

rastertopdf.cpp: PCLm Magic Number is on the third line in the resultant PCLm file

The PCLm file Magic Number format should be:

%PDF-1.4
%PCLm-VERSION_NUMBER

However, this cannot be done using QPDF. For adding additional headers, QPDFWriter object has a function setExtraHeaderText(std::string const&). When used, the PCLm Magic Number gets added to the third line of the PCLm file, rather than the second line. The resulting file looks like:

%PDF-1.4
%BINARY_ENCODING
%PCLm-1.0

rastertopdf: DCT_DECODE unable to compress image stream for large stream in PCLm.

For streams with large size, i.e. large width and height, the DCT_DECODE compression for compressing the image fails. For instance, for this 600dpi raster file and strip height = 32, the PCLm file is empty, whereas for strip height = 6 and below, we get the PCLm file successfully.

https://github.com/sahilarora535/cups-filters/blob/ccb47b24178fc454713fd7b1051d80c1389db81b/filter/rastertopdf.cpp#L690-L697

The reason can be that there is a limit on the dimensions of the image using libjpeg. width and height are of type JDIMENSION in libjpeg. See the following blob in libjpeg which defines the type JDIMENSION:

https://github.com/LuaDist/libjpeg/blob/6c0fcb8ddee365e7abc4d332662b06900612e923/jmorecfg.h#L221-L232

CUPS-FILTERS is not shipped with CUPS (but is a third-party add-on to CUPS)

The following Wiki article:

https://github.com/sahilarora535/cups-filters/wiki/Google-Summer-of-Code-2017-%7C-The-Linux-Foundation---Adding-PCLm-support-to-cups-filters

states: "CUPS-FILTERS is a software which is shipped with CUPS [....]"

This is not correct. CUPS-FILTERS is NOT shipped with CUPS!

CUPS-FILTERS nowadays is maintained by the Linux Foundation (even though that parts of its code are based on sources which were inherited from CUPS resp. donated and transferred to the Linux Foundation by Apple for future maintenance).

Most Linux distributions integrate and patch the original CUPS and bundle it with CUPS-FILTERS so that, in essence, CUPS-FILTERS constitutes as a third-party add-on module to the original CUPS maintained by Apple so that CUPS can be used on Linux.

The above statement is may mislead users to direct complaints and bug reports regarding CUPS-FILTERS (wrongly) towards Apple and the original CUPS maintainers.

Hence it would be nice if you changed the above Wiki sentence to reflect this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.