Skip to content

Conversation

@ViliusSutkus89
Copy link
Contributor

Hello,

I had to add support for current Poppler version ( 23.12.0 ), but I don't feel like maintaining an out-of-tree patch, so I'm sharing it with you's.

This patch is a continuation of #145 by @pablgonz .

Feedback would be much appreciated. Patch is mostly about changing data types, because Poppler added some std::shared_ptr's and std::optional's. Current version also requires C++17 .

Regards,
Vilius

@pablgonz
Copy link
Contributor

@ViliusSutkus89 The latest stable release is poppler-24.01.0.tar.xz... Can you test?

@ViliusSutkus89
Copy link
Contributor Author

@pablgonz , I was already using pdf2htmlEX built against Poppler-24.01.0 , I just forgot to update this PR

@Rockstar04 Rockstar04 merged commit 1fabed1 into pdf2htmlEX:master Feb 1, 2024
@pablgonz
Copy link
Contributor

pablgonz commented Feb 2, 2024

@ViliusSutkus89 You can take a look at the latest version of poppler-24.02.0 (https://github.com/pablgonzTemp/pdf2htmlEX/actions)

make $MAKE_PARALLEL
[  2%] Generating /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/base.min.css, /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/fancy.min.css
[  5%] Generating /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/pdf2htmlEX.min.js
[  8%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/pdf2htmlEX.cc.o
[ 11%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/draw.cc.o
+ dirname /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/build_js.sh
+ dirname /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/build_css.sh
+ BASEDIR=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share
+ YUI_DIR=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/../3rdparty/yuicompressor
+ YUI_JAR=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/../3rdparty/yuicompressor/yuicompressor-2.4.8.jar
+ build base.css base.min.css
+ INPUT=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/base.css
+ OUTPUT=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/base.min.css
+ BASEDIR=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share
+ CLOSURE_COMPILER_DIR=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/../3rdparty/closure-compiler
+ CLOSURE_COMPILER_JAR=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/../3rdparty/closure-compiler/compiler.jar
+ INPUT=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/pdf2htmlEX.js
+ OUTPUT_FN=pdf2htmlEX.min.js
+ OUTPUT=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/pdf2htmlEX.min.js
+ echo Building /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/base.min.css with YUI Compressor
+ java -jar /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/../3rdparty/yuicompressor/yuicompressor-2.4.8.jar --charset utf-8 -o /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/base.min.css /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/base.css
+ echo Building pdf2htmlEX.min.js with closure-compiler...
+ java -jar /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/../3rdparty/closure-compiler/compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --warning_level VERBOSE --output_wrapper (function(){%output%})(); --js /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/pdf2htmlEX.js --js_output_file /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/pdf2htmlEX.min.js
Building /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/base.min.css with YUI Compressor
Building pdf2htmlEX.min.js with closure-compiler...
+ echo Done.
Done.
+ build fancy.css fancy.min.css
+ INPUT=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/fancy.css
+ OUTPUT=/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/fancy.min.css
+ echo Building /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/fancy.min.css with YUI Compressor
Building /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/fancy.min.css with YUI Compressor
+ java -jar /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/../3rdparty/yuicompressor/yuicompressor-2.4.8.jar --charset utf-8 -o /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/fancy.min.css /home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/fancy.css
Done.
+ echo Done.
[ 14%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/general.cc.o
[ 17%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/image.cc.o
[ 20%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/font.cc.o
/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/share/pdf2htmlEX.js:332: WARNING - Property from never defined on Array
    [this.outline].concat(Array.from(this.container.querySelectorAll('a.l'))).forEach(function(ele) {
                          ^

0 error(s), 1 warning(s), 76.6% typed
+ echo Done.
Done.
[ 20%] Built target pdf2htmlEX_resources
[ 22%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/form.cc.o
[ 25%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/link.cc.o
[ 28%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/outline.cc.o
[ 31%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/state.cc.o
[ 34%] Building CXX object CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/text.cc.o
/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/src/HTMLRenderer/outline.cc: In member function ‘void pdf2htmlEX::HTMLRenderer::process_outline_items(const std::vector<OutlineItem*>*)’:
/home/runner/work/pdf2htmlEX/pdf2htmlEX/pdf2htmlEX/src/HTMLRenderer/outline.cc:45:61: error: ‘class OutlineItem’ has no member named ‘getTitleLength’
   45 |         writeUnicodes(f_outline.fs, item->getTitle(), item->getTitleLength());
      |                                                             ^~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/pdf2htmlEX.dir/build.make:174: CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/outline.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:140: CMakeFiles/pdf2htmlEX.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Error: Process completed with exit code 2.

@zhenchuan9r
Copy link

Could anybody solve the compilation error?

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.

4 participants