Skip to content

Commit 6c949b5

Browse files
committed
begun documenting updating pdf2htmlEX for new poppler releases
1 parent aeee020 commit 6c949b5

3 files changed

Lines changed: 87 additions & 3 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
*.swp
2+
13
# Byte-compiled / optimized / DLL files
24
__pycache__/
35
*.py[cod]

Readme.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,20 @@ We tag/release these files in sync with the pdf2htmlEX/pdf2htmlEX releases
1212
pdf2htmlEX (potential) release on a *clean* *known* Linux release.
1313
(See the [Ansible documentation](https://docs.ansible.com))
1414

15-
2. the **packaging** directory contains the **debian** based build_dists.py
16-
packaging tool and associated files. These are automatically copied into
17-
the pdf2htmlEX project on the AWS EC2 build machine by the
15+
2. the **packaging** directory contains the **debian** based
16+
[build_dists.py](building/build_dists.py) packaging tool and associated
17+
files. These are automatically copied into the pdf2htmlEX project on the
18+
AWS EC2 build machine by the
1819
[ec2-install-pdf2html-master.yml](building/ec2-install-pdf2html-master.yml)
1920
ansible playbook.
2021

2122
3. the **docs** directory contains more detailed information used to
2223
develop new versions of pdf2htmlEX. In particular:
2324

25+
* [NewPopplerRelease](docs/NewPopplerRelease.md) contains a useful
26+
collection of steps use to bring pdf2htmlEX sources up to date with
27+
a new [poppler](https://poppler.freedesktop.org/) release.
28+
2429
* [TipsAndTricks](docs/TipsAndTricks.md) contains ideas which have
2530
been useful in the past for identifying how changes to poppler
2631
might impact pdf2htmlEX.

docs/NewPopplerRelease.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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

Comments
 (0)