Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace QPDF by PDFio as PDF manipulation library in libcupsfilters #71

Open
wants to merge 69 commits into
base: master
Choose a base branch
from

Conversation

uddhavphatak
Copy link

@uddhavphatak uddhavphatak commented Nov 15, 2024

As the libcupsfilters library is principally written in regular C and not C++ due to the issues which would occur due to use of C++. But libcupsfilters still depend on one library which is written in C++, QPDF, a library for manipulation of PDF files. We need to replace this dependency on C++, with another library PDFio. This is a PDF handling and manipulation library, as QPDF is, but it is fully written in standard, regular C, not in C++.

uddhavphatak and others added 30 commits June 1, 2024 13:33
removing comments of _cfPDFToPDFMakePage
Removing commented code for _cfPDFToPDFMakePage
…emoved the (_cfPDFToPDFMakePage) declaration as function not called anywhere
…anges in function names, the other function files which were dependent on these file, were hindering the run process
@tillkamppeter
Copy link
Member

There is still one single C++ source file: cupsfilters/pdftoraster.cxx It is not from a QPDF dependency, it is for the use of Poppler (from the C++ library libpoppler). It can be skipped via the ./configure call with appropriate command line parameters and so we should be able to get a pure C libcupsfilters now. We will still need pdftoraster as there are some printers with buggy PostScript interpreters which do not work with Ghostscript's PostScript output (ps2write output device). A way to eliminate C++ here would be to call a command line tool of Poppler which does the PostScript rendering.

Another point is the naming of the files you have created. Could you all rename them removing the C-
in the beginning? We do not need it, as they have the .c extension and not .cxx any more.

@tillkamppeter
Copy link
Member

By the way, your work has passed the included build and CI tests.

Could you add further test cases to the file cupsfilters/test-filter-cases.txt to exercise your changes? Note that if you need extra input files for that you need to add them to the cupsfilters source repository, and that they need to be under a free software license.

@uddhavphatak
Copy link
Author

Sure, letme go through the poppler Library as I haven't studied anything about it. Then I would port pdftorastor.cxx into C as well. I will remove the c- suffix as well.

I will also start with test cases as well

@tillkamppeter
Copy link
Member

Your last commit just adds the new files but named without C-. You also need to remove the C- files (actually you should git mv ... from the old name to the new name to preserve history) and you also need to update Makefile.am to use the new file names without C-.

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