The QPDF 12.2 API differs from the initially-written calls: - processInputFile → processFile - getArrayAsArray → getArrayAsVector - setOutputFile(string) → setOutputFilename(const char*) - setQDF → setQDFMode The spike CMakeLists now finds QPDF via either a CMake config target (qpdf::libqpdf for system packages, QPDF::qpdf for vcpkg) or a pkg-config fallback (PkgConfig::QPDF), so it builds against the Debian libqpdf-dev package as well as a vcpkg manifest install. The contract test target was missing SpikeRunner.cpp from its sources, causing a link error; added it with the spike/ include directory. ASan caught a heap-use-after-free in the initial write path: QPDFWriter retains the const char* passed to setOutputFilename and dereferences it during write(), after the temporary std::string from output.string() is destroyed. Both the input and output filename strings are now kept alive across the QPDF calls that retain them. This is exactly the bug class the §7.2 sanitizers-in-CI posture exists to catch. Builds and passes under GCC 14.2 + Qt 6.8.2 + QPDF 12.2, both Release and ASan+UBSan configurations. Signed-off-by: ai-ad4 <ai-ad4@users.noreply.gitea.lm.je> |
||
|---|---|---|
| .gitea/workflows | ||
| .reuse | ||
| LICENSES | ||
| ci | ||
| cmake | ||
| docs | ||
| packaging | ||
| spike | ||
| src | ||
| test | ||
| .clang-format | ||
| .clang-tidy | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .gitleaks.toml | ||
| .pre-commit-config.yaml | ||
| CMakeLists.txt | ||
| CMakePresets.json | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| README.md | ||
| SECURITY.md | ||
| TRADEMARK.md | ||
| reuse.toml | ||
| vcpkg-configuration.json | ||
| vcpkg.json | ||
README.md
FreePDFEditor
A cross-platform native desktop PDF editor with a true WYSIWYG interface and full content editing: edit existing text with reflow, replace images, manipulate vector objects, plus annotations, forms, signatures, and page assembly.
- Stack: C++20, Qt 6.7 (Widgets shell, custom canvas), CMake, vcpkg.
- License: GPL-3.0-or-later (see
LICENSES/GPL-3.0-or-later.txt). Qt is dynamically linked under LGPL-3.0. - Targets: Windows 10+, macOS 12+ (Intel + Apple Silicon), Linux (X11/Wayland).
This repository contains the source and build infrastructure. The full engineering plan and
roadmap live in docs/plan.md; architecture decision records are under
docs/adr/.
Status
Pre-M0. This is the initial repository scaffold described in §14 of the plan: CMake + vcpkg skeleton, governance docs, CI matrix, packaging pipeline, an empty-window application shell, the pixel-diff harness scaffolding, and the Spike A (QPDF verbatim round-trip) harness. The feasibility spikes that gate the project run on top of this scaffolding.
Building
cmake --preset default
cmake --build --preset default
ctest --preset default
See CONTRIBUTING.md for the full build setup, gate matrix, and coding
standard.
Source control
All code is developed on the project Gitea instance at https://gitea.lm.je/ai-ad4/freepdfeditor
per docs/plan.md §13. See SECURITY.md for vulnerability reporting.