Menu

PoDoFo Text Layout in C++: Shaping, Kerning and IronPDF
📰

PoDoFo Text Layout in C++: Shaping, Kerning and IronPDF

DEV Community: cpp·IronSoftware·about 15 hours ago
#3iHRkTQt
#devtocpp#devto#dev#include#slip
Long article (991 words) — no AI summary yet.
Reading 0:00
15s threshold

In a warehouse desktop app, the C++ code behind packing-slip-7731.pdf places each string on the page at an x and a y, one order at a time. That works until the slip gains a customer name in Arabic or a large heading in a display face, and then the gap between drawing text and laying it out starts to show.

For the C++ edition of IronPDF, the status is coming soon, with early-access sign-up, and the packing slip starts in PoDoFo.

How does PoDoFo draw a packing slip?

It draws each string at coordinates that the code works out. PoDoFo is a portable C++17 library for parsing, changing and creating PDF files. It builds with CMake on top of FreeType, LibXml2, zlib and OpenSSL, among other libraries, and is licensed under LGPL 2.0 or later or MPL 2.0.

#include <podofo/podofo.h>

// Create a document, a page and a painter that draws on it PdfMemDocument document ; PdfPainter painter ; auto & page = document . GetPages ( ) . CreatePage ( PdfPageSize :: A4 ) ; painter .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.