Platform not supported error in linux
alpfreda opened this issue · comments
Mehdi Akbarzadeh commented
artiebits commented
Hi @alpfreda, the package no longer supports Linux and other Unix-like operating systems, the functionality moved to a new package https://github.com/artiebits/unix-print.
You can check the release notes https://github.com/artiebits/pdf-to-printer/releases/tag/v4.0.0.
Sorry for the inconvenience!
Mehdi Akbarzadeh commented
@artiebits Thanks for your reply.
Our customers used the app on both platforms (linux & win)
what are your suggestions?
artiebits commented
i guess something like this
import os from "os";
import { print as printForWindows } from "pdf-to-printer";
import { print as printForUnix } from "unix-print";
export default function print({ file, optionsForWindows, optionsForUnix }) {
if (os.platform() === "win32") {
printForWindows(file, optionsForWindows);
} else {
printForUnix(file, optionsForUnix);
}
}
Mehdi Akbarzadeh commented
thanks.