1
Vote

Trying to open pdf using GhostscriptViewer

description

Using WPF .net 4.5, making the following call:
GhostscriptViewer viewer;
GhostscriptVersionInfo gsVersion = GhostscriptVersionInfo.GetLastInstalledVersion(
                               GhostscriptLicense.GPL | GhostscriptLicense.AFPL,
                               GhostscriptLicense.GPL);
viewer.Open("path to pdf file", gsVersion, false)
It appears to work, but in the callback:

private void Viewer_DisplaySize(object sender, GhostscriptViewerViewEventArgs e)
{
    e.Image returns a black bitmap.  I am saving it to a file:
    e.Image.Save("path to temp file")
    then looking at it, . . . . alway black and only about 3K in size.
}

All the examples I've seen open the viewer in Windows Forms, I'm trying to do it in a wpf control. Is there a library problem?

Thanks.

comments