protected virtual void OnDisplayPage(GhostscriptViewerViewEventArgs e) { if (DisplayPage != null) { DisplayPage(this, e); } }
protected virtual void OnDisplayUpdate(GhostscriptViewerViewEventArgs e) { if (DisplayUpdate != null) { DisplayUpdate(this, e); } }
void _viewer_DisplayPage(object sender, GhostscriptViewerViewEventArgs e) { pbPage.Invalidate(); pbPage.Update(); tbPageNumber.Text = _viewer.CurrentPageNumber.ToString(); tbTotalPages.Text = " / " + _viewer.LastPageNumber.ToString(); }
// this is the last raised event after complete page is rasterized void _viewer_DisplayPage(object sender, GhostscriptViewerViewEventArgs e) { // complete PDF page is rasterized and we can update our PictureBox // once again by calling PictureBox.Invalidate() and PictureBox.Update() }
void _viewer_DisplayUpdate(object sender, GhostscriptViewerViewEventArgs e) { pbPage.Invalidate(); pbPage.Update(); }
void _viewer_DisplaySize(object sender, GhostscriptViewerViewEventArgs e) { pbPage.Image = e.Image; }
internal void RaiseDisplayUpdate(GhostscriptViewerViewEventArgs e) { this.OnDisplayUpdate(e); }
void _viewer_DisplaySize(object sender, GhostscriptViewerViewEventArgs e) { _preview.pbDisplay.Image = e.Image; }
void _viewer_DisplayUpdate(object sender, GhostscriptViewerViewEventArgs e) { _preview.pbDisplay.Invalidate(); _preview.pbDisplay.Update(); }
void _viewer_DisplayPage(object sender, GhostscriptViewerViewEventArgs e) { if (e.Image != null) { _lastRasterizedImage = e.Image.Clone() as Image; } }
// this is the first raised event before PDF page starts rasterizing. // this event is raised only once per page showing and it tells us // the dimensions of the PDF page and gives us page image reference. void _viewer_DisplaySize(object sender, GhostscriptViewerViewEventArgs e) { // store PDF page image reference _pdfPage = e.Image; }
private void _viewer_DisplayUpdate(object sender, GhostscriptViewerViewEventArgs e) { throw new NotImplementedException(); }
// this event is raised when a tile or the part of the page is rasterized // code in this event must be fast or it will slow down the Ghostscript // rasterizing. void _viewer_DisplayUpdate(object sender, GhostscriptViewerViewEventArgs e) { // if we are displaying the image in the PictureBox we can update // it by calling PictureBox.Invalidate() and PictureBox.Update() // methods. We dont need to set image reference again because // Ghostscript.NET is changing Image object directly in the // memory and does not create new Bitmap instance. }
void _viewer_DisplayPage(object sender, GhostscriptViewerViewEventArgs e) { _lastRasterizedImage = e.Image; }