briefutil is a small Qt Quick desktop utility for turning short letters into
PDF files.
Letter layout, markdown body parsing, and PDF rendering are handled natively in C++ with Qt 6 and libHaru.
- lets you pick a sender profile from JSON files
- collects recipient, subject, and body text in a small desktop UI
- supports Markdown in the letter body
- generates DIN 5008 PDF letters
- can use either built-in PDF fonts or custom
.ttf/.otffont files
The default sender profiles cover two letter styles:
simplecommercial
.
|- briefutil/ # CMake project root
|- example.png # README screenshot
|- sample_screenshot.png # README screenshot
|- LICENSE.txt
\- README.md
The project root for the application code is briefutil/.
That directory contains:
app/for the Qt Quick application, QML, and app resourcescore/for the reusablebriefutil_corelibrarytests/for development test executables and test data- the top-level CMake build entry point
- CMake 3.24 or newer
- a C++20 compiler
- Qt 6 with:
CoreGuiQmlQuickQuickControls2
- network access on first configure, because CMake fetches:
libHaruzliblibpng
From the repository root:
cmake -S briefutil -B briefutil/build -DCMAKE_PREFIX_PATH="C:/Qt/6.x/<toolchain>"
cmake --build briefutil/build --config ReleaseAdjust CMAKE_PREFIX_PATH to your local Qt installation, for example
msvc2022_64 or llvm-mingw_64.
With multi-config generators such as Visual Studio, the main executable will be built as:
briefutil/build/app/Release/briefutil.exe
After building:
briefutil/build/app/Release/briefutil.exeOn Windows, the CMake build also runs Qt deployment steps so the build output contains the required Qt DLLs, plugins, and QML modules.
On first launch, the app creates and seeds:
%USERPROFILE%/briefutil/templates/
This folder contains default sender profiles such as:
Max Mustermann.jsonMax Mustermann, Mustermann AG.jsonmustermann_signature.png
Generated PDFs are written by default to:
%USERPROFILE%/briefutil/output/
The app also stores UI and typography settings with QSettings, including:
- dark mode
- selected template directory
- font configuration
- body size and leading
An optional output_dir.conf file in the current working directory can
override the default output directory.
Sender profiles are JSON files loaded from the active template directory.
The important fields are:
idstylesender_linesemailreturn_address_linesigner_namesignature_image
Commercial profiles can additionally define:
company_namecompany_name_colortop_rule_colorfooter_linessigner_title
The signature_image path is interpreted relative to the profile directory.
The body field supports Markdown. The implemented subset includes:
- paragraphs
- bold
- italic
- headings
- bullet lists
- ordered lists
- images
- tables
Plain text without Markdown syntax also works.
The settings window allows changing the fonts used for PDF generation.
There are two supported modes:
- built-in PDF base-14 font names for all configured faces
.ttf/.otffile paths for all configured faces
Do not mix the two modes in one configuration. If you do, PDF generation is rejected with an error.
The font configuration covers:
- sans regular
- sans bold
- sans italic
- sans bold italic
- monospace
The CMake project also defines a few development-only test executables:
test_renderertest_letter_buildertest_markdown_parsertest_md_to_pdf
Typical examples:
briefutil/build/tests/Release/test_markdown_parser.exe
briefutil/build/tests/Release/test_letter_builder.exe briefutil/build/tests/Release/sample.pdf
briefutil/build/tests/Release/test_md_to_pdf.exe briefutil/tests/data/test_sample.md briefutil/build/tests/Release/md.pdfInstall:
cmake --install briefutil/build --config Release --prefix C:/apps/briefutilPackage:
cpack -C Release --config briefutil/build/CPackConfig.cmakeThe Windows packaging path is NSIS-based.
Source code is provided under the Simplified BSD License. See
LICENSE.txt.

