write_text.json
The JSON file of the “Fonts embedded in the file” example. Text set in a font embedded in the file, cut down to the letters actually used, and still searchable, copyable and readable aloud.
This file is a request: an application sends it over the network to the server, which creates the PDF and sends it back. It makes the same page as the Rust and Python versions of this example. A request names every file it uses, never its content; the call carries the request and the files together. A font the server already holds, such as DejaVuSans, is named with nothing attached. Send the request to the address the API page gives.
What this example is for
Send a document to somebody who does not have your house font and one of two things happens: their reading software quietly puts another one in its place and your layout moves, or it draws empty boxes where the letters were. Carrying the font inside the file is the only cure, and it is the first thing a commercial printer will ask you for before accepting the job.
What this example shows
- A font carried inside the file, cut down to the letters drawn.
- Text that can still be searched, copied and read aloud.
- Any font you hand it, not one fixed choice.