Skip to content

Update to xpdf 4.06 source #25

@ReMiOS

Description

@ReMiOS

I've managed to compile the xpdf-python library with the new xpdf v4.06 sources from: https://dl.xpdfreader.com/xpdf-4.06.tar.gz
(for reference i've used Python v3.14.2, Windows 25H2 and Visual Studio with SDK 10.0.26100.0)

Unfortunately some headers have changed in the xpdf sources and i had to make some (nasty) changes
I've added False Boolean values and NullPointers to make it work.
This is not a correct fix, can you please help me fixing the xpdf-python the correct way ?

ImageDataDev.h
class ImageDataDev: public ImageOutputDev {
public:
23: ImageDataDev(char *fileRootA, GBool dumpJPEGA, GBool dumpRawA,
24: GBool listA, std::vector *imagesA) : ImageOutputDev(fileRootA, dumpJPEGA, dumpRawA, listA) {
==> GBool listA, std::vector *imagesA) : ImageOutputDev( fileRootA, dumpJPEGA, gFalse, dumpRawA, gFalse, listA, gFalse)

ImageInfoDev.h
class ImageInfoDev: public ImageOutputDev {
public:
19: ImageInfoDev(char *fileRootA, GBool dumpJPEGA, GBool dumpRawA,
20: GBool listA) : ImageOutputDev(fileRootA, dumpJPEGA, dumpRawA, listA) {};
==> GBool listA) : ImageOutputDev(fileRootA, dumpJPEGA, gFalse, dumpRawA, gFalse, listA, gFalse) {};

PdfLoader.cc
// helper voor xpdf ≥ 4.06
#define LP nullptr

124: doc->displayPages(textOut, page, page, 72, 72, 0, gFalse, gTrue, gFalse);
==> doc->displayPages(textOut, LP, page, page, 72, 72, 0, gFalse, gTrue, gFalse);

172: doc->displayPages(imageOut, page, page, 72, 72, 0, gFalse, gTrue, gFalse);
==> doc->displayPages(imageOut, LP, page, page, 72, 72, 0, gFalse, gTrue, gFalse);

216: doc->displayPages(imageOut, pageNum, pageNum, 72, 72, 0, gFalse, gTrue, gFalse);
==> doc->displayPages(imageOut, LP, pageNum, pageNum, 72, 72, 0, gFalse, gTrue, gFalse);

259: doc->displayPages(splashOut, pageNum, pageNum, dpi, dpi, 0, gFalse, gTrue, gFalse);
==> doc->displayPages(splashOut, LP, pageNum, pageNum, dpi, dpi, 0, gFalse, gTrue, gFalse);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions