Skip to content

Commit b926f55

Browse files
author
Alexander Weidt
committed
AcroFormPlugin
-Improved visualization of FieldObjects -Now building Model before writing into PDF in order to handle cross-references
1 parent de9a5c7 commit b926f55

3 files changed

Lines changed: 1090 additions & 1018 deletions

File tree

jspdf.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ var jsPDF = (function (global) {
277277
out('/Parent 1 0 R');
278278
out('/Resources 2 0 R');
279279
out('/MediaBox [0 0 ' + f2(wPt) + ' ' + f2(hPt) + ']');
280-
out('/Contents ' + (objectNumber + 1) + ' 0 R');
281280
// Added for annotation plugin
282281
events.publish('putPage', {pageNumber: n, page: pages[n]});
282+
out('/Contents ' + (objectNumber + 1) + ' 0 R');
283283
out('>>');
284284
out('endobj');
285285

@@ -319,6 +319,7 @@ var jsPDF = (function (global) {
319319
out('/Count ' + page);
320320
out('>>');
321321
out('endobj');
322+
events.publish('postPutPages');
322323
},
323324
putFont = function (font) {
324325
font.objectNumber = newObject();
@@ -428,6 +429,7 @@ var jsPDF = (function (global) {
428429
ITALIC = "italic",
429430
BOLD_ITALIC = "bolditalic",
430431
encoding = 'StandardEncoding',
432+
ZAPF = "zapfdingbats",
431433
standardFonts = [
432434
['Helvetica', HELVETICA, NORMAL],
433435
['Helvetica-Bold', HELVETICA, BOLD],
@@ -440,7 +442,8 @@ var jsPDF = (function (global) {
440442
['Times-Roman', TIMES, NORMAL],
441443
['Times-Bold', TIMES, BOLD],
442444
['Times-Italic', TIMES, ITALIC],
443-
['Times-BoldItalic', TIMES, BOLD_ITALIC]
445+
['Times-BoldItalic', TIMES, BOLD_ITALIC],
446+
['ZapfDingbats',ZAPF ]
444447
];
445448

446449
for (var i = 0, l = standardFonts.length; i < l; i++) {
@@ -1092,7 +1095,7 @@ var jsPDF = (function (global) {
10921095
var objId = (currentPage - 1) * 2 + 3;
10931096
return {objId: objId, pageNumber: currentPage, pageContext: pagesContext[currentPage]};
10941097
},
1095-
'getPDFVersion': function(){
1098+
'getPDFVersion': function () {
10961099
return pdfVersion;
10971100
}
10981101
};

0 commit comments

Comments
 (0)