AttachStdIO() public method

public AttachStdIO ( GhostscriptStdIO stdIoCallback ) : void
stdIoCallback GhostscriptStdIO
return void
        public GhostscriptRasterizer(GhostscriptStdIO stdIo)
        {
            _viewer = new GhostscriptViewer();
            _viewer.ShowPageAfterOpen = false;
            _viewer.ProgressiveUpdate = false;
            _viewer.DisplayPage += new GhostscriptViewerViewEventHandler(_viewer_DisplayPage);

            if (stdIo != null)
            {
                _viewer.AttachStdIO(stdIo);
            }
        }
Ejemplo n.º 2
0
        public FMain()
        {
            InitializeComponent();

            this.Text = Program.NAME;

            pbPage.Width = 100;
            pbPage.Height = 100;

            _viewer = new GhostscriptViewer();
            _viewer.AttachStdIO(new GhostscriptStdIOHandler(_stdOut, _stdErr));

            _viewer.DisplaySize += new GhostscriptViewerViewEventHandler(_viewer_DisplaySize);
            _viewer.DisplayUpdate += new GhostscriptViewerViewEventHandler(_viewer_DisplayUpdate);
            _viewer.DisplayPage += new GhostscriptViewerViewEventHandler(_viewer_DisplayPage);
        }
Ejemplo n.º 3
0
        public FMain()
        {
            InitializeComponent();

            this.Text = Program.NAME;

            pbPage.Width  = 100;
            pbPage.Height = 100;

            _viewer = new GhostscriptViewer();
            _viewer.AttachStdIO(new GhostscriptStdIOHandler(_stdOut, _stdErr));

            _viewer.DisplaySize   += new GhostscriptViewerViewEventHandler(_viewer_DisplaySize);
            _viewer.DisplayUpdate += new GhostscriptViewerViewEventHandler(_viewer_DisplayUpdate);
            _viewer.DisplayPage   += new GhostscriptViewerViewEventHandler(_viewer_DisplayPage);
        }
Ejemplo n.º 4
0
        private void FMain_Load(object sender, EventArgs e)
        {
            txtOutput.AppendText("Is64BitOperatingSystem: " + System.Environment.Is64BitOperatingSystem.ToString() + "\r\n");
            txtOutput.AppendText("Is64BitProcess: " + System.Environment.Is64BitProcess.ToString() + "\r\n");

            _preview.Show();
            this.Show();

            GhostscriptVersionInfo gvi =  GhostscriptVersionInfo.GetLastInstalledVersion();

            _viewer = new GhostscriptViewer();

            _viewer.AttachStdIO(_stdioHandler);
            
            _viewer.DisplaySize += new GhostscriptViewerViewEventHandler(_viewer_DisplaySize);
            _viewer.DisplayUpdate += new GhostscriptViewerViewEventHandler(_viewer_DisplayUpdate);
            _viewer.DisplayPage += new GhostscriptViewerViewEventHandler(_viewer_DisplayPage);

            _viewer.Open(gvi, true);
        }