This line causes incorrect handling of PDFs with embedded transparent images.
Code that determines whether transparency is required on a given page is included in the procedure pdfshowpage_setpage. I'm not clear on what else that procedure does, but the rest of it might be important too.
Unless there is a specific reason that pdfshowpage_setpage is being omitted, it should be included here. Alternatively, this line could be simplified to
this.Execute("Page pdfshowpage");
... which calls pdfshowpage_init, pdfshowpage_setpage, and pdfshowpage_finish in succession (and has done so since at least 2007 for Ghostscript 8.56, and likely earlier).
Attached is an example of a PDF with a transparent image. Currently it is displayed as a black box on a gray background. It should be displayed as the word "hello", in black text on a gray background.
https://github.com/jhabjan/Ghostscript.NET/blob/49a233f888eff8d3ac67786a602c5fe40b0da675/Ghostscript.NET/Viewer/FormatHandlers/GhostscriptViewerPdfFormatHandler.cs#L274
This line causes incorrect handling of PDFs with embedded transparent images.
Code that determines whether transparency is required on a given page is included in the procedure
pdfshowpage_setpage
. I'm not clear on what else that procedure does, but the rest of it might be important too.Unless there is a specific reason that
pdfshowpage_setpage
is being omitted, it should be included here. Alternatively, this line could be simplified tothis.Execute("Page pdfshowpage");
... which calls pdfshowpage_init, pdfshowpage_setpage, and pdfshowpage_finish in succession (and has done so since at least 2007 for Ghostscript 8.56, and likely earlier).
Attached is an example of a PDF with a transparent image. Currently it is displayed as a black box on a gray background. It should be displayed as the word "hello", in black text on a gray background.
hellopng.pdf