NickNaso / ghostscript4js

Ghostscript4JS binds the Ghostscript C API to the Node.JS world.
http://www.nacios.it
Apache License 2.0
66 stars 19 forks source link

GS error not caught by js code #52

Open naren8642 opened 4 years ago

naren8642 commented 4 years ago

I am trying to handle a GS font error gracefully. So I tried ghostscript4js. WHen I ran it on a document that i know has a font issue, this was not handled by the library. Here is the output for reference. I am using the example provided on the readme using the callback. It just prints 'All is OK'

(node:2270) Warning: N-API is an experimental feature and could change at any time. GPL Ghostscript 9.26 (2018-11-20) Copyright (C) 2018 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 1. Page 1 Can't find CID font "Calibri". Attempting to substitute CID font /Adobe-Identity for /Calibri, see doc/Use.htm#CIDFontSubstitution. The substitute CID font "Adobe-Identity" is not provided either. attempting to use fallback CIDFont.See doc/Use.htm#CIDFontSubstitution. The fallback CID font "CIDFallBack" is not provided. Finally attempting to use ArtifexBullet. Error reading a content stream. The page may be incomplete. Output may be incorrect. Error: File did not complete the page properly and may be damaged. Output may be incorrect. %%BoundingBox: 17 17 1203 771 %%HiResBoundingBox: 17.421875 17.097656 1202.404297 770.152344 All is ok root@948c20816c14:/docs#