#pdf #tectonic #io #xe-te-x #image #typesetting #capabilities

sys tectonic_pdf_io

Xdvipdfmx’s PDF, XDV, and image I/O APIs in C, as a Rust crate

7 unstable releases (3 breaking)

0.4.1 May 18, 2023
0.4.0 Oct 27, 2022
0.3.0 Oct 3, 2022
0.2.0 Apr 26, 2022
0.1.0 Jun 4, 2021

#456 in Images

Download history 183/week @ 2023-11-25 124/week @ 2023-12-02 120/week @ 2023-12-09 105/week @ 2023-12-16 103/week @ 2023-12-23 66/week @ 2023-12-30 116/week @ 2024-01-06 125/week @ 2024-01-13 104/week @ 2024-01-20 204/week @ 2024-01-27 144/week @ 2024-02-03 181/week @ 2024-02-10 233/week @ 2024-02-17 240/week @ 2024-02-24 197/week @ 2024-03-02 79/week @ 2024-03-09

778 downloads per month
Used in 19 crates (2 directly)

MIT license

2MB
52K SLoC

C 51K SLoC // 0.1% comments Rust 1K SLoC // 0.1% comments

The tectonic_pdf_io crate

This crate is part of the Tectonic project. It provides the PDF, XDV, and image I/O capabilities of XeTeX’s xdvipdfmx as a crate, currently providing only a C API.

This crate depends on libpng, which it attempts to find externally using pkg-config or vcpkg. It should be possible to create another “bridge” crate so that this external dependency could be avoided, but this hasn’t been done yet.

If your project depends on this crate, Cargo will export for your build script an environment variable named DEP_TECTONIC_PDF_IO_INCLUDE_PATH, which will be a semicolon-separated list of directories enabling your code to include the dpx-*.h headers.

You will need to ensure that your Rust code actually references this crate in order for the linker to include linked libraries. A use statement will suffice:

#[allow(unused_imports)]
#[allow(clippy::single_component_path_imports)]
use tectonic_pdf_io;

Cargo features

This crate currently provides no Cargo features.

Dependencies

~5–17MB
~157K SLoC