-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display PDF in external viewer #7
Labels
enhancement
New feature or request
Comments
fadden
added a commit
that referenced
this issue
Jan 19, 2024
Files are identified by extension, HFS file type, and signature. The file is extracted into a temp file and handed to the default viewer for that extension. Windows doesn't allow you to delete an open file, so if the file is open in the external program when the file viewer is closed, the temporary file won't be removed. We can scan for these at launch and scrub them, ideally with user confirmation since we can't absolutely guarantee that we created them. (Issue #7.)
fadden
added a commit
that referenced
this issue
Jan 20, 2024
The file viewer can't clean up its temporary files if an external viewer still has the file open, so we need to scan for stale temp files when the program starts. We're removing "cp2tmp_*" from the system temporary directory, so it should be safe to remove the files without user review and confirmation. The CLI was refusing to export "host image" files, but this seems wrong. We now simply extract them as-is. The GUI was already doing this. Fixed a bug where you couldn't export a "host image" file from the GUI with drag & drop if it was in a file archive. (Issue #7)
Feature is available in https://github.com/fadden/CiderPress2/releases/tag/v1.0.1-dev1 |
Available in v1.0.1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When a PDF file is encountered, usually in a ZIP archive that collects a disk image and documentation together, the file viewer currently dumps the raw file as converted text. It should instead offer the conversion option "Host Image", and put a "view with external program" button in the middle of the display tab. When clicked, the default system viewer is launched, with the PDF in a temp file.
The original CiderPress automatically launched an external viewer for GIF/JPEG with no prompting. I don't think automatically launching the viewer is a good idea, because it would be jarring if you were scrolling through things with the prev/next button, but it might make sense to pop it open if the PDF file were double-clicked (i.e. the viewer is opened with a single item selected).
Update: this would also be useful for files on CD-ROM, e.g. the Opus ][ documentation directory. These have HFS file types; on the Opus ][ disc I see:
PDF
/CARO
: PDF filesW8BN
/MSWD
: Word filesRTF
/MSWD
: RTF files; could be displayed directly in the Rich Text control, but probably better to launch a viewer since they might use fancy formatting or be very largeThe text was updated successfully, but these errors were encountered: