Fixed examples/acroforms/forms.js

This commit is contained in:
Samuel Chantaraud 2014-02-22 09:46:13 -04:00
parent 287e7c808b
commit 4eb7c04034

View File

@ -58,7 +58,7 @@ function setupForm(div, content, viewport) {
content.getAnnotations().then(function(items) {
for (var i = 0; i < items.length; i++) {
var item = items[i];
switch (item.type) {
switch (item.subtype) {
case 'Widget':
if (item.fieldType != 'Tx' && item.fieldType != 'Btn' &&
item.fieldType != 'Ch')
@ -125,7 +125,7 @@ function renderPage(div, pdf, pageNumber, callback) {
canvasContext: context,
viewport: viewport
};
page.render(renderContext).then(callback);
page.render(renderContext).promise.then(callback);
// Prepare and populate form elements layer
var formDiv = document.createElement('div');