Browse Source

Make xObjForm use raw format

Julian Viereck 14 years ago
parent
commit
2fcc93c751
  1. 7
      pdf.js
  2. 3
      web/viewer.js

7
pdf.js

@ -4252,8 +4252,8 @@ var PartialEvaluator = (function() {
if ('Form' == type.name) { if ('Form' == type.name) {
// console.log("got xobj that is a Form"); // console.log("got xobj that is a Form");
args[0].code = this.eval(xobj, xref, xobj.dict.get('Resources'), args[0].raw = this.evalRaw(xobj, xref, xobj.dict.get('Resources'),
fonts, images); fonts, images, uniquePrefix);
} }
if (xobj instanceof JpegStream) { if (xobj instanceof JpegStream) {
images.bind(xobj); // monitoring image load images.bind(xobj); // monitoring image load
@ -5369,7 +5369,8 @@ var CanvasGraphics = (function() {
this.endPath(); this.endPath();
} }
this.execute(ref.code, this.xref, stream.dict.get('Resources')); var code = this.pe.evalFromRaw(ref.raw)
this.execute(code, this.xref, stream.dict.get('Resources'));
this.restore(); this.restore();
}, },

3
web/viewer.js

@ -152,7 +152,8 @@ var PDFView = {
while (container.hasChildNodes()) while (container.hasChildNodes())
container.removeChild(container.lastChild); container.removeChild(container.lastChild);
var pdf = new WorkerPDFDoc(data); // var pdf = new WorkerPDFDoc(data);
var pdf = new PDFDoc(new Stream(data));
var pagesCount = pdf.numPages; var pagesCount = pdf.numPages;
document.getElementById('numPages').innerHTML = pagesCount; document.getElementById('numPages').innerHTML = pagesCount;

Loading…
Cancel
Save