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 70 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
6de6b88
pdfio-tools Header file(excluding the _cfPDFToPDFMakePage function)
uddhavphatak Jun 1, 2024
c81ed13
pdfio-tools function defination file(excluding the _cfPDFToPDFMakePag…
uddhavphatak Jun 1, 2024
7878b55
testing of the functions using any pdf File
uddhavphatak Jun 1, 2024
6dfc0c2
Update pdfio-tools.c
uddhavphatak Jun 1, 2024
2dfafc3
Update pdfio-tools-private.h
uddhavphatak Jun 1, 2024
a6cabc5
Pdfio Tools test file: test file for printing the boxes dimensions. R…
uddhavphatak Jun 1, 2024
2811388
no change
uddhavphatak Jun 4, 2024
a8fd7dc
wrong pointers
uddhavphatak Jun 4, 2024
09bdf16
added check of pdfio as well
uddhavphatak Jun 4, 2024
77473ea
removed qpdf-tools.cxx from list and added pdfio-tools.c into the list
uddhavphatak Jun 4, 2024
e5505f3
pptypes header file converted to C, because it was a dependancy in qp…
uddhavphatak Jun 24, 2024
9d41154
pptypes extension converted to C
uddhavphatak Jun 24, 2024
702b113
changed qpdf-pdftopdf.cxx from Cpp to C, and removed the dependancy f…
uddhavphatak Jun 24, 2024
4a162e8
the qpdf-pdftopdf-private.h changed to pdfio-pdftopdf-private.h
uddhavphatak Jun 24, 2024
53fe9d4
qpdf-cm-private.h changed to pdfio-cm-private.h
uddhavphatak Jun 24, 2024
7817e65
qpdf-cm.cxx changed to pdfio-cm.c
uddhavphatak Jun 24, 2024
94506df
only added the pdfio files and removed other files, because due to ch…
uddhavphatak Jun 24, 2024
8ece949
changed variable names
uddhavphatak Jun 24, 2024
cf11c5e
changed variable names
uddhavphatak Jun 24, 2024
e4abdb3
added file pdfio-xobject.c and pdfio-xobject-private.h
uddhavphatak Jun 24, 2024
eb33ee5
wrong function call names
uddhavphatak Jun 24, 2024
2647003
changed qpdf dependancy to pdfio
uddhavphatak Jun 24, 2024
cd14cc0
added C-nup-private.h and C-nup.cxx
uddhavphatak Jul 7, 2024
1193547
support for pdfio 1.3.0
uddhavphatak Jul 7, 2024
aed7aca
changed the function declaration for dump
uddhavphatak Jul 7, 2024
f803918
added stream
uddhavphatak Jul 7, 2024
499e868
nup file changed from C++ to C
uddhavphatak Jul 7, 2024
510c348
C-intervalset and header added
uddhavphatak Jul 9, 2024
a35010c
intervalset files converted to C format
uddhavphatak Jul 9, 2024
537a848
updated function definitions
uddhavphatak Aug 12, 2024
89bd280
updated the function to used latest apis
uddhavphatak Aug 12, 2024
7bbb9a0
updated
uddhavphatak Aug 12, 2024
e1e9c5c
updated the code, testing remaining
uddhavphatak Aug 12, 2024
56ea4f5
Merge branch 'OpenPrinting:master' into pdfio-implement
uddhavphatak Aug 12, 2024
f330868
Update build.yaml
uddhavphatak Aug 12, 2024
ab7b4fe
the Makebox function had error
uddhavphatak Aug 12, 2024
98dd109
the function names weren't same as in header files
uddhavphatak Aug 12, 2024
611ecbf
Update build.yaml
uddhavphatak Aug 15, 2024
ee02270
Update build.yaml
uddhavphatak Aug 16, 2024
9fcb1e8
Update build.yaml
uddhavphatak Aug 16, 2024
67cb72f
updated files
uddhavphatak Sep 5, 2024
11ab2dc
pdfio-pdftopdf-processor-private.h and its definition file
uddhavphatak Sep 5, 2024
a2268fe
update
uddhavphatak Sep 5, 2024
075597b
C-pdftopdf-processor-private.h
uddhavphatak Sep 17, 2024
b7c7d2a
updated functions, run successfullyyyyyy
uddhavphatak Sep 19, 2024
0155c51
removing files which are unnecessary now due to their dependence on q…
uddhavphatak Sep 19, 2024
7273892
wrong header file name of deleted files
uddhavphatak Sep 19, 2024
c41b669
Merge branch 'OpenPrinting:master' into pdfio-implement
uddhavphatak Oct 7, 2024
0e762c7
converted pdf.cxx and pdf.h to C-pdf.c and C-pdf.h, changed the respe…
uddhavphatak Oct 9, 2024
81f58d9
Removing the qpdf dependent files
uddhavphatak Oct 9, 2024
622272b
updated pclmtoraster.c, changed in the Makefile as well
uddhavphatak Oct 15, 2024
b85c6c1
remove C++ pclmtoraster.cxx
uddhavphatak Oct 15, 2024
475dd85
addition of final files
uddhavphatak Oct 19, 2024
8c7e9fb
Merge branch 'OpenPrinting:master' into pdfio-implement
uddhavphatak Oct 19, 2024
7667e4f
converted pwgtopdf.cxx
uddhavphatak Nov 14, 2024
622cc6b
add ported C-pwgtopdf.c and remove pwgtopdf.cxx
uddhavphatak Nov 15, 2024
d5a608d
removed the C- suffix from the ported C files
uddhavphatak Nov 18, 2024
183d5c5
renamed
uddhavphatak Nov 20, 2024
f7f3a66
makefile edit
uddhavphatak Nov 20, 2024
41ec072
renamed
uddhavphatak Nov 20, 2024
1e638af
Update build.yaml
uddhavphatak Nov 30, 2024
7b3ec2a
removing the check for qpdf due to removal of its dependency
uddhavphatak Nov 30, 2024
00f27b0
:qMerge remote-tracking branch 'origin/pdfio-implement' into pdfio-im…
uddhavphatak Nov 30, 2024
081ef95
Merge branch 'OpenPrinting:master' into pdfio-implement
uddhavphatak Dec 5, 2024
eee3511
Corrected missing PDFio/remaining QPDF compiler arguments
tillkamppeter Dec 6, 2024
8396bc7
solved errors which were coming in cupsfilters/testfilters.sh.log
uddhavphatak Jan 1, 2025
fc097e5
Merge branch 'OpenPrinting:master' into pdfio-implement
uddhavphatak Jan 1, 2025
282cdf5
Update build.yaml
uddhavphatak Jan 1, 2025
b44ca2e
fixed all the issues related to pointer allocation resulting in progr…
uddhavphatak Jan 13, 2025
b809c15
removed gibberish debugging messages from cupsfilters/pdftopdf/pdfio-…
uddhavphatak Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,16 @@ jobs:
sudo apt-get install -y avahi-daemon libavahi-client-dev libssl-dev libpam-dev libusb-1.0-0-dev zlib1g-dev
sudo apt install autotools-dev autopoint cmake libtool pkg-config libcups2-dev libexif-dev liblcms2-dev libfontconfig1-dev
sudo apt install libfreetype6-dev build-essential qtbase5-dev qtchooser libcairo2-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libopenjp2-7-dev liblcms2-dev libjpeg-dev
- name: Install libqpdf > 11.0.0
- name: Install pdfio >= 1.4.0
run: |
cd ..
mkdir qpdf
wget -O qpdf-11.6.3.tar.gz https://sourceforge.net/projects/qpdf/files/qpdf/11.6.3/qpdf-11.6.3.tar.gz
tar -xzf qpdf-11.6.3.tar.gz
cd qpdf-11.6.3
mkdir build &&
cd build &&
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_INSTALL_DOCDIR=/usr/share/doc/qpdf-11.6.3 \
.. &&
make
mkdir pdfio
wget https://github.com/michaelrsweet/pdfio/releases/download/v1.4.0/pdfio-1.4.0.tar.gz
tar -xzf pdfio-1.4.0.tar.gz
cd pdfio-1.4.0
./configure --prefix=/usr --enable-shared
make all
make test
sudo make install
cd ..
cd ..
Expand All @@ -57,4 +52,4 @@ jobs:
- name: make
run: make
- name: Run Tests
run: make check || cat test/error_log*
run: make check || cat test/error_log*
52 changes: 25 additions & 27 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -178,32 +178,31 @@ libcupsfilters_la_SOURCES = \
cupsfilters/lut.c \
cupsfilters/mupdftopwg.c \
cupsfilters/pack.c \
cupsfilters/pclmtoraster.cxx \
cupsfilters/pdf.cxx \
cupsfilters/pdftopdf/pdftopdf.cxx \
cupsfilters/pclmtoraster.c \
cupsfilters/pdf.c \
cupsfilters/pdftopdf/pdftopdf.c \
cupsfilters/pdftopdf/pdftopdf-private.h \
cupsfilters/pdftopdf/pdftopdf-processor.cxx \
cupsfilters/pdftopdf/pdftopdf-processor-private.h \
cupsfilters/pdftopdf/qpdf-pdftopdf-processor.cxx \
cupsfilters/pdftopdf/qpdf-pdftopdf-processor-private.h \
cupsfilters/pdftopdf/pptypes.cxx \
cupsfilters/pdftopdf/pptypes-private.h \
cupsfilters/pdftopdf/nup.cxx \
cupsfilters/pdftopdf/nup-private.h \
cupsfilters/pdftopdf/intervalset.cxx \
cupsfilters/pdftopdf/intervalset-private.h \
cupsfilters/pdftopdf/qpdf-tools.cxx \
cupsfilters/pdftopdf/qpdf-tools-private.h \
cupsfilters/pdftopdf/qpdf-xobject.cxx \
cupsfilters/pdftopdf/qpdf-xobject-private.h \
cupsfilters/pdftopdf/qpdf-pdftopdf.cxx \
cupsfilters/pdftopdf/qpdf-pdftopdf-private.h \
cupsfilters/pdftopdf/qpdf-cm.cxx \
cupsfilters/pdftopdf/qpdf-cm-private.h \
cupsfilters/pdftopdf/pdftopdf-processor.c \
cupsfilters/pdftopdf/pdfio-pdftopdf-processor.c \
cupsfilters/pdftopdf/processor.h \
cupsfilters/pdftopdf/pptypes.c \
cupsfilters/pdftopdf/pptypes-private.h \
cupsfilters/pdftopdf/nup.c \
cupsfilters/pdftopdf/nup-private.h \
cupsfilters/pdftopdf/intervalset.c \
cupsfilters/pdftopdf/intervalset-private.h \
cupsfilters/pdftopdf/pdfio-tools.c \
cupsfilters/pdftopdf/pdfio-tools-private.h \
cupsfilters/pdftopdf/pdfio-xobject.c \
cupsfilters/pdftopdf/pdfio-xobject-private.h \
cupsfilters/pdftopdf/pdfio-pdftopdf.c \
cupsfilters/pdftopdf/pdfio-pdftopdf-private.h \
cupsfilters/pdftopdf/pdfio-cm.c \
cupsfilters/pdftopdf/pdfio-cm-private.h \
cupsfilters/pdftoraster.cxx \
cupsfilters/pdfutils.c \
cupsfilters/pdfutils-private.h \
cupsfilters/pwgtopdf.cxx \
cupsfilters/pwgtopdf.c \
cupsfilters/pwgtoraster.c \
cupsfilters/raster.c \
cupsfilters/rastertopwg.c \
Expand All @@ -217,7 +216,7 @@ libcupsfilters_la_LIBADD = \
$(FONTCONFIG_LIBS) \
$(CUPS_LIBS) \
$(LCMS_LIBS) \
$(LIBQPDF_LIBS) \
$(LIBPDFIO_LIBS) \
$(LIBJPEG_LIBS) \
$(EXIF_LIBS) \
$(LIBPNG_LIBS) \
Expand All @@ -232,7 +231,7 @@ libcupsfilters_la_CFLAGS = \
$(FONTCONFIG_CFLAGS) \
$(CUPS_CFLAGS) \
$(LCMS_CFLAGS) \
$(LIBQPDF_CFLAGS) \
$(LIBPDFIO_CFLAGS) \
$(LIBJPEG_CFLAGS) \
$(EXIF_CFLAGS) \
$(LIBPNG_CFLAGS) \
Expand Down Expand Up @@ -320,11 +319,10 @@ test_ps_LDADD = libcupsfilters.la
testfilters_SOURCES = \
cupsfilters/testfilters.c \
$(pkgfiltersinclude_DATA)

testfilters_LDADD = \
libcupsfilters.la \
-lm -ldl -lcups

$(CUPS_LIBS) \
-lm -ldl
testfilters_LDFLAGS = \
-D_GNU_SOURCE \
-L/usr/lib
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ AS_IF([test x"$lcms2" = "xno"], [
AC_DEFINE([USE_LCMS1], [1], [Defines if use lcms1])
])
PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.0.0])
PKG_CHECK_MODULES([LIBQPDF], [libqpdf >= 11.0.0])
PKG_CHECK_MODULES([LIBPDFIO], [pdfio >= 1.3.0])

# =================
# Check for Poppler
Expand Down
2 changes: 1 addition & 1 deletion cupsfilters/ghostscript.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ cfFilterGhostscript(int inputfd, // I - File descriptor input

if (doc_type == GS_DOC_TYPE_PDF)
{
int pages = cfPDFPagesFP(fp);
int pages = cfPDFPagesFP(filename);

if (pages == 0)
{
Expand Down
Loading