git reset --soft HEAD^ git push origin master --force
2020-12-18 在使用 vue-pdf 打印的时候会出现打印乱码的问题需要 修改源码解决 ,解决方式
function createLoadingTask(src, options) {
let CMAP_URL = 'https://unpkg.com/pdfjs-dist@2.0.943/cmaps/'
var source
if (typeof src === 'string') source = { url: src }
else if (src instanceof Uint8Array) source = { data: src }
else if (typeof src === 'object' && src !== null)
source = Object.assign({}, src)
else
throw new TypeError('invalid src type')
// source.verbosity = PDFJS.VerbosityLevel.INFOS;
// source.pdfBug = true;
// source.stopAtErrors = true;
;(source.cMapUrl = CMAP_URL), (source.cMapPacked = true)
var loadingTask = PDFJS.getDocument(source)
loadingTask.__PDFDocumentLoadingTask = true // since PDFDocumentLoadingTask is not public
if (options && options.onPassword)
loadingTask.onPassword = options.onPassword
if (options && options.onProgress)
loadingTask.onProgress = options.onProgress
return loadingTask
}
注:临时解决