pdfcraft/crates/create
Brandon Thomas 57980200e2 M7.4: Edit a PDF ▸ Add content: text (click and type; standard fonts, size, bold/italic, colour, alignment, wrapping) and images (PNG/JPEG/TIFF/GIF/BMP, centred at natural size) as page content that stays editable: each item is its own tagged content stream with its parameters, drawn in display space; select, move, resize (images keep proportions), double-click to retype, Format text panel, Delete; Bates numbering ▸ Add opens Header & Footer with a Bates number. content_list/page_add_text/page_add_image/content_update/content_delete tools (66 tools). Lucide align-center/right icons
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 00:58:03 -04:00
..
src M7.4: Edit a PDF ▸ Add content: text (click and type; standard fonts, size, bold/italic, colour, alignment, wrapping) and images (PNG/JPEG/TIFF/GIF/BMP, centred at natural size) as page content that stays editable: each item is its own tagged content stream with its parameters, drawn in display space; select, move, resize (images keep proportions), double-click to retype, Format text panel, Delete; Bates numbering ▸ Add opens Header & Footer with a Bates number. content_list/page_add_text/page_add_image/content_update/content_delete tools (66 tools). Lucide align-center/right icons 2026-10-02 00:58:03 -04:00
Cargo.toml M10.3/M10.4: Create from TIFF (every page; 1-bit scans stay 1-bit; resolution from the file), GIF and BMP; opening those converts them. Export pages as JPEG (quality) and TIFF besides PNG, in the dialog and doc_export_images 2026-10-02 00:46:58 -04:00
README.md M10.2/M11.1: Create a PDF (blank, from PNG/JPEG images at their resolution with transparency, from plain text) in a new create crate (L4); opening an image or text file converts it to a new unsaved PDF; Reduce file size (resource merge across the document, GC, object streams) writes a compact copy; Create group Ready; doc_create/doc_reduce tools (49 tools). Fix: the Hand tool did not pan (the page widget took the drag) 2026-10-01 23:29:17 -04:00

README.md

printcraft-create

Layer L4. Create a PDF (Acrobat's Create a PDF tool), execution plan M10.2:

  • blank(width, height, pages): an empty document;
  • from_images(&[(name, bytes)]): one page per image, sized from the image's resolution (PNG pHYs, JPEG JFIF density; 72 dpi when absent). JPEG data is embedded as is (/DCTDecode, grey, RGB or Adobe-inverted CMYK); PNG is decoded and stored with Flate, with transparency as a soft mask;
  • from_text(text, …): plain text set in Helvetica, wrapped and paginated.

Every function returns a printcraft_cos::Document; the caller writes it.