From 9e4f3f77f39e26de8c390c8d359cc50a2938dd9d Mon Sep 17 00:00:00 2001 From: awang Date: Sat, 1 Aug 2015 13:17:12 +0800 Subject: [PATCH] convert rendered canvas from pipeline to png --- web/pdf_thumbnail_view.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/pdf_thumbnail_view.js b/web/pdf_thumbnail_view.js index 1294d35542632e..3a62f5dbb50926 100644 --- a/web/pdf_thumbnail_view.js +++ b/web/pdf_thumbnail_view.js @@ -238,6 +238,11 @@ var PDFThumbnailView = (function PDFThumbnailViewClosure() { rejectRenderPromise(error); return; } + + self.image.src = self.canvas.toDataURL(); + self.canvas.width = 0; + self.canvas.height = 0; + delete self.canvas; self.renderingState = RenderingStates.FINISHED; if (!error) {