|
| 1 | +# Updating pdf2htmlEX to a new poppler release |
| 2 | + |
| 3 | +This note collects the steps to take when updating pdf2htmlEX to a new |
| 4 | +poppler release. |
| 5 | + |
| 6 | +The [poppler](https://poppler.freedesktop.org/) sources can be browsed/cloned at |
| 7 | +either: |
| 8 | + |
| 9 | +* [cgit](http://cgit.freedesktop.org/poppler/poppler) |
| 10 | + |
| 11 | + `git clone https://anongit.freedesktop.org/git/poppler/poppler.git` |
| 12 | + |
| 13 | +* [gitLab](https://gitlab.freedesktop.org/poppler/poppler) |
| 14 | + |
| 15 | + `git clone https://gitlab.freedesktop.org/poppler/poppler.git` |
| 16 | + |
| 17 | +### Copy 3rdparty/poppler/git files |
| 18 | + |
| 19 | +From the poppler sources you need to copy the six files |
| 20 | + |
| 21 | +* CairoFontEngine.cc |
| 22 | +* CairoFontEngine.h |
| 23 | +* CairoOutputDev.cc |
| 24 | +* CairoOutputDev.h |
| 25 | +* CairoRescaleBox.cc |
| 26 | +* CairoRescaleBox.h |
| 27 | + |
| 28 | +into the pdf2htmlEX/3rdparty/poppler/git directory of a development fork. |
| 29 | + |
| 30 | +To find the required files, in a local clone of the poppler sources, type |
| 31 | +the following: |
| 32 | + |
| 33 | + git tag |
| 34 | + |
| 35 | +this will list the current poppler tags, |
| 36 | + |
| 37 | + git checkout <<your chosen tag>> |
| 38 | + |
| 39 | +this will checkout the sources at the required poppler tag/release. Since |
| 40 | +the poppler sources change so fast, you will usually be checking out these |
| 41 | +files in a "detached" HEAD. Since we are not *developing* or making changes |
| 42 | +to the poppler source this is no problem. |
| 43 | + |
| 44 | +You will find the six files listed above in the poppler subdirectory of the |
| 45 | +main poppler repository. This poppler subdirectory also contians most of |
| 46 | +the poppler source code. To list the "Cairo*" files, while in the poppler |
| 47 | +repository, type: |
| 48 | + |
| 49 | + ls poppler/Cairo* |
| 50 | + |
| 51 | +To copy them into place type: |
| 52 | + |
| 53 | + cp poppler/Cairo* <<path to development pdf2htmlEX>>/3rdparty/poppler/git |
| 54 | + |
| 55 | + |
| 56 | +### Review changes |
| 57 | + |
| 58 | +At this point it is important to move to the pdf2htmlEX development |
| 59 | +repositry and review the `git diff` to see what has changed between the |
| 60 | +last and current poppler releases. (This will hint what problems you might |
| 61 | +have compiling pdf2htmlEX). |
| 62 | + |
| 63 | +### Renaming config.h files |
| 64 | + |
| 65 | +Since we are essentially working with multiple packages (poppler, |
| 66 | +fontforge, and pdf2htmlEX) all in the same source tree, it is *very* |
| 67 | +important to keep their various "config.h" files distinct. |
| 68 | + |
| 69 | +We do this by renaming them: |
| 70 | + |
| 71 | +* poppler-config.h |
| 72 | +* fontforge-config.h |
| 73 | +* pdf2htmlEX-config.h |
| 74 | + |
| 75 | +Unfortunately, the six files you have just copied from the poppler sources, |
| 76 | +all `#include <config.h>`. These must be changed to `#include |
| 77 | +<poppler-config.h>`. |
0 commit comments