Situatie
Aside from making clean printable documents, files made with Adobe Acrobat Pro can contain formulas that automatically compute your inputs. Here’s how to make simple calculations in a PDF file.
Using a PDF with Calculations
When it comes to software that can create files with formulas and automatic computations, you likely have a spreadsheet program like Microsoft Excel or Google Sheets in mind. However, the nature and formatting of spreadsheets make them unwieldy and impractical to use as a form that you distribute to people.
Fortunately, Adobe Acrobat, the top-of-the-line PDF creation suite, has several tools that allow you to make fields with automatic computations in them.
There are many potential use cases for a PDF with a calculated form, such as:
- Order Forms: If you’re handing out a form filled with possible products and their prices to a customer, you can create a field that quickly displays the final price of their order without having to pull out a calculator.
- Assessments and Exams: You can make a quiz or assessment that automatically displays the score when you’re done answering.
- Invoices: If you’re creating a printed invoice, you can set it to display the final amount you’re charging automatically.
Aside from the above, PDF forms can be useful for performing risk assessments, creating membership forms, or even making a simple offline personality test
Solutie
Pasi de urmat
Making Simple Calculated Fields
To start, go into Acrobat, and create a form. Click “Tools” on the upper right of the screen, scroll down, and select “Prepare Form”. From here, you can start a new form from scratch, or base it off of an existing PDF or document file that you already have. Importing a file will give you the option to populate boxes with fillable fields automatically. Whether or not you do this is unimportant, as you can always edit and create these fields later.
To better understand how to make a calculated form, let’s start with an example. Above is a simple order form with seven fields: Quantity 1 to Quantity 5, where each field corresponds to different item quantities; Total Quantity; and Total Price. We want the five quantities to be fillable fields that users can input themselves, while the Total Quantity and Total Price fields are automatically computed.
To make sure a field is fillable, double-click it, or right-click and go to Text Box Properties, and leave the Read-Only box unchecked.
Because all of our quantity boxes are fillable, we need to create a computation for our Total Quantity field. Select the box, then go to Text Box Properties > Calculate. From here, we can do one of two things: you can select the second option to pick one of the preset calculations, such as sum, product, or average; or you can choose the third option to create a simplified field notation formula. For this example, we’ll use the preset calculations and select “sum”.
Click Pick, and you’ll be brought to a menu where you can select all the fields you want to sum together. Select all the fields you want to include, then click OK. You’ll notice that your field’s value changed to 0.
sing the Simplified Notation
Next, we want to create a computation for our Total Price field. Unlike Total Quantity, we can’t simply sum up a set of fields. We need to create a series of equations.
To do that, we can use the Simplified Notation format. Select the Total Price box, go to Text Box Properties > Calculate, and select the third option. You’ll be able to input a formula into a text box by clicking the Edit button.
For simple arithmetic computations, this formula box works very similarly to an Excel formula box. Simply type in the field names of the quantity boxes, and you’ll be able to add, subtract, multiply, or divide them with other numbers. You can also place computations in parentheses to segment them. For reference, here are the modifiers for basic arithmetic calculations:
- Add: +
- Subtract: –
- Multiply: *
- Divide: /
For this particular example, we want to multiple each quantity with their respective price. Considering the prices laid out, we’ll end up with the following simple formula:
(Qty1*5)+(Qty2*7)+(Qty3*7)+(Qty4*12)+(Qty5*20)
Inputting the above formula will multiply each quantity by their respective price, and will generate the final price.
If, for example, we wanted to order 3 USB Drives, 2 Apple Lightning Cables, and 1 10000 mAh Battery Bank, we’d get the following result:
Filling, Saving, and Complex Calculations
Before you save your file, set any boxes you don’t want to be editable to Read-Only in the Text Box Properties. Anyone opening the PDF form won’t be able to edit those fields.
Save your document as a standard PDF file, and it should be a fillable form on any document viewing software, including web browsers. After it’s filled out, it can then be saved or printed just like any other PDF file.
Because the calculation system in PDF files is based around Javascript, you can do a lot of advanced things with it. If you’re interested in learning more, you can go to Adobe’s website to read about all the various modifiers you can use, as well as creating custom calculation scripts that allow you to have conditional formatting and formulas that let you modify text.
Leave A Comment?