Hi all,
My client would like to dynamic images up to 200 pictures to my forms. It is working fine. However, when I add images up to 35 images. I could not add images to the form any more. Then, I save data on the form. All images and data typed on the form are disappeared. I don't know reason.
If I only add 10 images - I can save data and images on the form. The size of pdf is 15456 kb. I was unable to add more pictures or data on the form.
Maybe there are problem the size of pdf? How much size can an dynamic pdf limited?
Can we save the information and images as much as we want?
I have spent 2 weeks to work and try to figure out this problem. However it is not successful.
Please help,
Cindy
Solved! Go to Solution.
Views
Replies
Total Likes
You should ensure, that your users do not import big images.
Therefore you can use a script on the change event of an image field which checks the data size and warns the user if the file is too big.
function formatNumber(number) {
var num = number + '',
x = num.split('.'),
x1 = x[0],
x2 = x.length > 1 ? '.' + x[1] : '',
rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2 + "KB";
}
var sizeLimit = 200, //allow upto 200KB images
thisSize = Math.round((this.value.oneOfChild.value.length * 3 / 4) / 1024);
if (sizeLimit > 0) {
if (thisSize > sizeLimit) {
xfa.host.messageBox("Note: With " + formatNumber(thisSize) + " the size of the imported image is greater that the recommended maximum of " + formatNumber(sizeLimit) + ".\nLarge images can cause a insufficent performance.\n\nIf possible, use images with the following recommended specs:\nFormat:\t\tPNG or JPG\nColor depth:\t8 Bit (higher is not supported)\nColor space:\tRGB (CMYK is not supported)\nFile Size:\t\t" + formatNumber(sizeLimit), "Recommended image size exceeded", 3, 0);
}
}
Views
Replies
Total Likes
I've run into issues where Adobe Reader runs out of memory when using many images in a single PDF. I don't believe there is a limit to the number of images in the PDF format.
Views
Replies
Total Likes
Thank you for your response.
If the Adobe Reader runs out of memory. What we need to do?
Thanks,
Cindy
Views
Replies
Total Likes
You should ensure, that your users do not import big images.
Therefore you can use a script on the change event of an image field which checks the data size and warns the user if the file is too big.
function formatNumber(number) {
var num = number + '',
x = num.split('.'),
x1 = x[0],
x2 = x.length > 1 ? '.' + x[1] : '',
rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2 + "KB";
}
var sizeLimit = 200, //allow upto 200KB images
thisSize = Math.round((this.value.oneOfChild.value.length * 3 / 4) / 1024);
if (sizeLimit > 0) {
if (thisSize > sizeLimit) {
xfa.host.messageBox("Note: With " + formatNumber(thisSize) + " the size of the imported image is greater that the recommended maximum of " + formatNumber(sizeLimit) + ".\nLarge images can cause a insufficent performance.\n\nIf possible, use images with the following recommended specs:\nFormat:\t\tPNG or JPG\nColor depth:\t8 Bit (higher is not supported)\nColor space:\tRGB (CMYK is not supported)\nFile Size:\t\t" + formatNumber(sizeLimit), "Recommended image size exceeded", 3, 0);
}
}
Views
Replies
Total Likes
Thank you very much for your help.
Cindy
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies