Adding calculations to your PDF files
Video: Adding calculations to your PDF filesAs I said in the last movie, you just can't do everything in InDesign. One of the most important things that you need Acrobat for is adding advanced functionality to your PDF files. For example, calculation fields. I had my flyer document open for my exercise files, and I'm going to click on this text frame and zoom in 200% by pressing Cmd+ 2, or Ctrl +2 on Windows. You'll notice that I've added a Total field here. And I want this Total field to automatically calculate how expensive these tickets are going to be based on how many tickets the people are going to buy.
Viewers: in countries Watching now:
While PDFs can be used for printing, they also have interactive features that make them great for forms, brochures, and prototypes. In this course, InDesign insider David Blatner tells you what interactive PDFs are, why they're so useful, and how to make them yourself with Adobe InDesign and Acrobat. Learn to make hyperlinks to websites, other pages in your document, and email; add buttons that navigate, show, and hide content; create a form with check boxes and text entry fields; and embed audio and video. Plus, discover how to add polish with calculations, page transitions, and more.
- Creating a new interactive document
- Linking to URLs and mail addresses
- Creating bookmarks
- Adding buttons with rollover states
- Adding text, list, and submit fields to forms
- Embedding audio and video
- Adding page transitions
- Best practices for exporting high-quality interactive PDF files
Adding calculations to your PDF files
As I said in the last movie, you just can't do everything in InDesign. One of the most important things that you need Acrobat for is adding advanced functionality to your PDF files. For example, calculation fields. I had my flyer document open for my exercise files, and I'm going to click on this text frame and zoom in 200% by pressing Cmd+ 2, or Ctrl +2 on Windows. You'll notice that I've added a Total field here. And I want this Total field to automatically calculate how expensive these tickets are going to be based on how many tickets the people are going to buy.
This is just a regular text frame that I've turned into a Text Field button. If I open the buttons and Forms panel, you can see that this is just a Text Field type button. I'm going to make one change here. I'm going to set this to Read Only, because, I don't want my user, the person looking at this pdf to fill this out. I want to calculate it for them. All right, let's go ahead and close that panel and export this PDF. I'll go to the File menu and choose Export. I'll make sure that interactive PDF is selected, since I have form fields and then click Save. I'm going to use the same values that I've been using all along in this title and click OK, and InDesign exports the PDF and then opens it in Acrobat. I find this big purple bar that Acrobat puts at the top of the screen, a little bit annoying, I'm just going to click on the icon on the left, to close it. Then I'll zoom in on this by pressing Cmd+2, or Ctrl+2 on Windows, and then just scroll down a little bit.
Now this field works just the way you'd expect, you can click on the Radio buttons, type in the text fields, and so on. Plus I could come over here and type the number of tickets that I want to purchase. But how am I going to get this field over here to automatically calculate the total? Well, to do that I need to be a little bit sneaky. I'm going to go to the Tools section and I'm going to open up, not my Content Editing, but my Interactive Objects section. Now I'll chose the Select Object tool, which let's me actually select the object those form fields, inside my PDF. I'm going to grab this total over here, and I'm going to duplicate it, and there's various ways to do that.
But the easiest really is just to copy it to the clipboard with a Cmd+ C or a Ctrl + C on windows, and then paste it Cmd+ V or Ctrl+ V. Now I'll move it down here kind of out of the way. Next, I'll right click on this or Ctrl+ click with one button mouse and choose Properties. I'm going to go in here and change the properties for this new field that I've created. First of all, I'm going to change its name. This is going to be called the price of the tickets. Obviously you can call it anything you want. I'm also going to change the form fields from visible to hidden.
I don't want anyone to see this field, it's going to be a secret hidden field in the background. Finally, I'm going to go to the Options tab, and I'm going to say this has a default value of 14. I know it should be 14 because if I move this out of the way, you'll see that the tickets are supposed to be 14 dollars each. Great, now I'll close this and I've set up a hidden field that has the price of the tickets. Now let's change our total field. I'll Right Click on this, or Ctrl+ Click with one button mouse, and Click Properties. The only thing I need to change inside the text field properties for this field, is the Calculate tab. So I'll click on Calculate, and I'm going to tell this field to have a calculation in it.
It's really easy to do. All I need to do is turn on the value is V Radio button, tell it what it's going to be, not going to be a sum. It's going to be a product. It's going to be a multiplication, and it's going to multiply two fields, and I can pick those fields by clicking the Pick button. I want to multiply the number of the tickets by the price of the tickets. Click Ok, click Close and I am done. Now when I go back to the Hand tool as I change the number of tickets here crops down to two tickets.
The total updates updates automatically for me I do wish I had a dollar symbol that would be nice. And we can do that by going back to the Select Object tool right clicking on this and choosing Properties. And then I'm going to change the format of this. I'm going to say the format of this is a number and in fact it should have a currency sign before it. The dollar sign. Click close, and it looks like it's working. Let's go back to the hand tool and we can see I now have a dollar sign and cents after the dollars. Change the number, hit Tab, and it updates automatically.
That wasn't so hard, was it? But there is one problem. What if you later need to go back and make a change to the InDesign document? For example, I just noticed that this says 2012 when it's supposed to say 2014. Oh no! Will all this extra work in Acrobat go to waste? Not at all with the trick that I'm going to show you in the next movie.
Find answers to the most frequently asked questions about InDesign Insider Training: Interactive PDFs .
Here are the FAQs that matched your search "" :
- Q: I am trying to turn objects in a layered InDesign document into buttons, following the lessons in Chapter 3, but they don't show up when I export to PDF. What's wrong?
- A: This is a known issue with InDesign, stacked layers, and buttons. The final stacking order in your PDF is actually determined by the order the buttons are created, not the stacking order of the layers in your document. David Blatner has researched and proposed a solution to this issue on his InDesign Secrets blog. Read more about it here.
- Q: This course was updated on 01/17/2014. What changed?
- A: The author updated three movies in the "Links and Bookmarks" chapter, since the behavior of hyperlinks has recently changed in InDesign CC.
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.