Planet PDF Forum Archive

Planet PDF ForumThe page you are viewing is part of our 160,000 page PDF discussion forum archive spanning 1999-2008. Would you believe we have a 2nd forum archive which covers 2008 - 2011? But... if you really want to bust-a-move head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner discussions to in-depth developer and pre-press discussions.


How to search this archive. The quickest way is to use the filters on our Advanced Search page so that only archive pages are included in the results.


Previous | Next | (P-PDF) What's Wrong with my PDF?


Topic: A few different problems
Conf: (P-PDF) What's Wrong with my PDF?, Msg: 140530
From: gkaiseril
Date: 10/5/2005 01:57 AM

>1. The sum from page one is not picking up on page two.

You have to add a calculation for the field to pickup the value from page 1 or place a copy of the field on page 2.

>2. When the form is reset the $0 value remains, which doesn't work if the form is printed and filled out manually.

You are using the built in sum of selected fields to calculate the total. Your total is zero and the built in functions do not suppress the zero result. If you want to suppress the zero result, you need to write a custom calculation script to archive this. A simple document level function could be added to the pdf to perform this calculation. See below.

>3. The first few text boxes on page 2 are not calculating into the sum of the page properly.

Your order for calculation of the form fields needs to be adjusted to the correct order or you could write one calculation script that would do all the extensions and totals. This script could be placed in the grand total field or as a document level script function with a call to the function in the grand total field. If properly constructed this script would only need to be updated when a fields) that is not a simple quantity * price is added.

A document level script to add an array of fields:

function AddArray(aFieldNames)
{
/*
Return the sum of the values of the fields for the field names passed in passed aFieldNames array.
*/
// variable to accumulate sum
var fSum = 0;
// loop through passe field names in passed array
for (i = 0; i < aFieldNames.length; i++)
{
// add only fields with a value not blank
fSum += Number(this.getField(aFieldNames[i]).value);
}
// return sum
return fSum;
}

The page 1 total custom calculation script becomes:

// set field value to sum of array of the following fields
event.value = AddArray (["Text100", "Text103", "Text161", "Text162", "Text163", "Text164", "Text165", "Text166", "Text167", "Text168", "Text169", "Text170", "Text171", "Text172", "Text173", "Text174", "Text176", "Text177", "Text178", "Text179", "Text180", "Text181", "Text182", "Text183", "Text184", "Text185", "Text186", "Text187", "Text188", "Text189", "Text190", "Text191", "Text192", "Text193", "Text194", "Text195", "Text196", "Text197", "Text198", "Text199", "Text200", "Text201", "Text202", "Text203", "Text204", "Text205", "Text206", "Text207", "Text208", "Text209", "Text210", "Text211", "Text212", "Text213", "Text214", "Text215", "Text216", "Text900", "Text98"]);
// suppress zero result
if (event.value == 0) event.value = "";

A similar change would be made to the page 2 total and the total for the beverage order.

PDF In-Depth Free Product Trials Ubiquitous PDF

LockLizard Safeguard PDF Security

Made specifically for publishers of high value information published in PDF format, it protects your PDF...

Download free demo

ARTS PDF Aerialist X

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Ubiquitous PDF: DIY PDF magazines, courtesy of CNET and Magazinify

Thanks to Magazinify.com, it's possible to have web articles delivered right to your inbox in PDF form. If that weren't enough, the nice folks at CNET have been nice enough to publish a step-by-step guide about how to set this all up using just a little time and a free Magazinify account.

September 06, 2011
Search Planet PDF
more searching options...
PDF Resources
Platinum Sponsor

ARTS PDF

Create & Edit PDF - Nitro PDF Software

Silver Sponsors

LockLizard DRM PDF Security Quick PDF Library: The Unrivaled PDF Developer Toolkit

Featured Product

ARTS PDF Crackerjack X

The most popular Acrobat plug-in for PDF-based color print production and automation.

Featured Event

Adobe Digital Marketing Summit

March 20-23, 2012 -- Salt Palace Convention Center, Salt Lake City, Utah

The Digital Marketing Summit is the premier event for digital marketers and advertisers to learn about and share key strategies for driving marketing innovation. Attend Summit to learn how you can create, measure, and optimize digital experiences to revolutionize how the world engages with ideas and information.

PDF Store Categories