Merge pull request #82 from storytold/fix/73-macos-open-from-finder

macOS: open PDFs from Finder, Open With and the Dock (#73)
This commit is contained in:
BFlat
2026-10-07 02:17:21 +07:00
committed by GitHub
12 changed files with 157 additions and 76 deletions
@@ -12,7 +12,8 @@
</developer>
<description>
<p>
PrintCraft is a pdf editor. Read, organize, combine, split and secure PDFs
PrintCraft is an open-source PDF workbench. Read, comment on, fill in and sign PDFs;
organize, combine and split pages; edit, redact, protect and export documents.
</p>
</description>
<launchable type="desktop-id">ai.storyteller.printcraft.desktop</launchable>
@@ -23,20 +24,19 @@
<url type="help">https://github.com/storytold/printcraft</url>
<url type="contact">https://discord.gg/artcraft</url>
<categories>
<category>Graphics</category>
<category>RasterGraphics</category>
<category>Photography</category>
<category>Office</category>
<category>Viewer</category>
</categories>
<keywords>
<keyword>photo</keyword>
<keyword>image editor</keyword>
<keyword>psd</keyword>
<keyword>layers</keyword>
<keyword>pdf</keyword>
<keyword>viewer</keyword>
<keyword>annotate</keyword>
<keyword>forms</keyword>
</keywords>
<screenshots>
<screenshot type="default">
<caption>Editing The Great Wave off Kanagawa with type layers and adjustment layers</caption>
<image>https://raw.githubusercontent.com/storytold/printcraft/main/docs/images/printcraft-demo.jpg</image>
<caption>A PDF open with its threaded comments</caption>
<image>https://raw.githubusercontent.com/storytold/printcraft/main/docs/images/printcraft-viewer.png</image>
</screenshot>
</screenshots>
<branding>
@@ -53,6 +53,7 @@
</supports>
<provides>
<binary>printcraft</binary>
<mediatype>application/pdf</mediatype>
</provides>
<content_rating type="oars-1.1"/>
<releases>
+3 -4
View File
@@ -17,10 +17,9 @@ vendor: Learning Machines LLC
homepage: https://getartcraft.com/apps/printcraft
license: MIT OR Apache-2.0
description: |-
Open-source, native image editor that works the way Photoshop users expect.
Layers, masks, adjustment layers, layer styles, type and brushes; opens and
saves layered PSD/PSB files; 8/16/32-bit documents; GPU compositing (wgpu).
Includes printcraft-cli, a headless converter and command runner.
Open-source, native PDF workbench: read, comment, fill and sign forms,
organize, combine, split, edit, redact, protect and export PDFs.
Includes printcraft-cli, a headless command runner and opt-in MCP server.
# The binaries link only glibc and libgcc_s directly. Windowing (X11/Wayland, xkbcommon) and the
# GPU (Vulkan, EGL/GL) are loaded at runtime, so they are dependencies/recommendations here
+15 -56
View File
@@ -45,64 +45,23 @@
<key>NSHumanReadableCopyright</key>
<string>Copyright © the PrintCraft authors. MIT OR Apache-2.0.</string>
<!-- Printcraft's own format. -->
<key>UTExportedTypeDeclarations</key>
<!-- Documents PrintCraft opens (#73): it is offered under Open With and can be made the default
for PDFs, without taking over from the system's viewer on install ("Alternate"). Declared by
extension and MIME type; LaunchServices maps them to the system's PDF type. Finder hands the
file over as an Apple event, which apps/printcraft/src/apple_events.rs receives. -->
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>ai.storyteller.printcraft.document</string>
<key>UTTypeDescription</key>
<string>PrintCraft Document</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.image</string>
</array>
<key>UTTypeIconFile</key>
<string>PrintCraft</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array><string>pcraft</string></array>
<key>public.mime-type</key>
<array><string>application/x-printcraft</string></array>
</dict>
</dict>
</array>
<!-- Types macOS may not know; the system's own declaration wins when it has one. -->
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>com.adobe.photoshop-large-image</string>
<key>UTTypeDescription</key>
<string>Photoshop Large Document</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.image</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array><string>psb</string></array>
</dict>
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>ai.storyteller.printcraft.qoi</string>
<key>UTTypeDescription</key>
<string>QOI Image</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.image</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array><string>qoi</string></array>
</dict>
<key>CFBundleTypeName</key>
<string>PDF Document</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeExtensions</key>
<array><string>pdf</string></array>
<key>CFBundleTypeMIMETypes</key>
<array><string>application/pdf</string></array>
</dict>
</array>
+1 -1
View File
@@ -55,7 +55,7 @@ Local test: `python3 -m http.server 8765` inside the folder, then open http://lo
```html
<iframe
src="https://example.com/printcraft/"
title="PrintCraft image editor"
title="PrintCraft PDF workbench"
style="width: 100%; height: 720px; border: 0;"
allow="fullscreen; clipboard-read; clipboard-write"
allowfullscreen>
+2 -3
View File
@@ -4,9 +4,8 @@
wix build printcraft.wxs -arch x64 -d Version=1.2.3 -d BinDir=... -d IconPath=... -o out.msi
Per-machine install into Program Files, a Start Menu shortcut, `.pcraft` owned by PrintCraft,
and PrintCraft offered under "Open with" for PSD/PSB and the image formats it reads (without
taking over the user's default app for them).
Per-machine install into Program Files, a Start Menu shortcut and an App Paths entry. Files
opened with PrintCraft arrive on its command line.
-->
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package