plainprinter icon indicating copy to clipboard operation
plainprinter copied to clipboard

Unknown Image Format

Open kusold opened this issue 3 years ago • 6 comments

Prerequisites

OS: MacOS 12.6 PlainPrinter Version: 0.2.2

Current Behavior

When I click "Start Printing", I receive a popup that contains the following:

Error: Unknown image format.
at Function.open (/Applications/PlainPrinter.app/Contents/Resources/app.asar/node_modules/pdfkit/lib/image.js:34:13)
at PDFDocument.openImage (/Applications/PlainPrinter.app/Contents/Resources/app.asar/node_modules/pdfkit/lib/mixins/images.js:122:24)
at PDFDocument.image (/Applications/PlainPrinter.app/Contents/Resources/app.asar/node_modules/pdfkit/lib/mixins/images.js:27:22)
at /Applications/PlainPrinter.app/Contents/Resources/app.asar/dist/main/webpack:/src/main/main.ts:290:13
at node:electron/js2c/browser_init:189:563

Steps to Reproduce

  1. Open Plain Printer on a Mac

  2. Configure,and press Start

  3. Error occurs image

Possible Solution (Not obligatory)

I have found references that pdfkit requires uppercase extensions. Grabbing the images as *.PNG may work.

Context

This causes the printing feature to not work.

Your Environment

  • Node version: v18.10.0
  • PlainPrinter version or branch: 0.2.2 Release
  • Operating System and version: MacOS 12.6

kusold avatar Oct 04 '22 20:10 kusold

Hello, thanks for the report. I'm just testing on my macOS 12.6 with M1 chip, it works fine, so no clues how to fix this.

manhtai avatar Oct 06 '22 08:10 manhtai

I’m using an Intel Mac, so that might be the difference. I also verified my file system is case-insensitive (the standard).

kusold avatar Oct 06 '22 14:10 kusold

It works fine on my Intel Mac also (Mac 16in 2019). Same macOS version.

manhtai avatar Oct 07 '22 11:10 manhtai

I have an Intel Mac 2019 15 inch, and have the same problem.

Hao-Xue-Git avatar Oct 28 '22 18:10 Hao-Xue-Git

+1 here. @kusold do you use multiple monitors? No idea if this may be related, but still.

bemfica avatar May 20 '24 11:05 bemfica

I might have been using multiple monitors. My use case for this tool has passed, as well as my Intel Mac, so I haven’t attempted again since running into this bug.

kusold avatar May 20 '24 16:05 kusold