فهرست منبع

enable pdfjs cmaps in pdfRenderer

Brian Gough 10 سال پیش
والد
کامیت
84f986058a
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      services/web/public/coffee/ide/pdfng/directives/pdfRenderer.coffee

+ 4 - 0
services/web/public/coffee/ide/pdfng/directives/pdfRenderer.coffee

@@ -30,6 +30,10 @@ define [
 			TEXTLAYER_TIMEOUT: 100
 			TEXTLAYER_TIMEOUT: 100
 
 
 			constructor: (@url, @options) ->
 			constructor: (@url, @options) ->
+				# set up external character mappings - needed for Japanese etc
+				window.PDFJS.cMapUrl = './bcmaps/'
+				window.PDFJS.cMapPacked = true
+
 				if window.location?.search?.indexOf("disable-font-face=true") >= 0
 				if window.location?.search?.indexOf("disable-font-face=true") >= 0
 					window.PDFJS.disableFontFace = true
 					window.PDFJS.disableFontFace = true
 				else
 				else