Posts tagged "document reuse"

I’ll be speaking at Adobe MAX this year!

I will be presenting a session on Variable Data Design at Adobe MAX this year. While I’ve presented at MAX previously, recently it’s been all DPS or AEM-related discussions. This talk digs deep to my roots in Data Driven Marketing and Variable Data Publishing. From the abstract:

Learn how to take personalized communications beyond email. Before email, there was data merge, which enables you to create personalized print materials using the design tools you already know and love. Whether for mailing campaigns, photo books, directories, business cards, or even t-shirts, you can use data merge to personalize your projects.

In this session, you’ll discover how to:

  • Unlock the potential of personalization in InDesign
  • Use Illustrator and Photoshop to generate personalized assets to use with InDesign
  • Manage personalization on a large scale with popular third-party variable data printing (VDP) solutions
Share on Facebook

Using Captivate 7 projects with DPS

I had posted a fix for using Captivate 6 HTML5 projects in DPS. In that article, I showed how to remove embedded browser check code so that your project would render without a browser check in DPS. However, in Captivate 7, removing the browser check script from the index.html file doesn’t do the job.  (If you have my DPS Examples app installed on your iPad, and you’re reading this blog on your iPad, then tap here to see examples of Captivate content running in a DPS folio.)

I asked the Captivate engineers if they had a trick up their sleeves, and this is what they delivered (thanks to Suresh Jayaraman and independently to Mayank Mahajan: if you see either of them, give them each a high five…)

  1. Open “AdobeCaptivate.ini” file present in Adobe Captivate installation folder .
  2. Add the following line of text at line 2 or line 3 of the “AdobeCaptivate.ini” file .
    • SuppressIncompatibleBrowserMessage = 1
  3. Publish the project to HTML 5

Now, the result is a folder with an index.html file. As I indicated in the earlier article, you can then make a Web Content overlay and point it at your index file. Another approach is to use the Captivate project as an HTML article rather than in a Web Content Overlay.

If you have portrait-only folio, rename the index.html file to index_v.html. If you have a landscape-only folio, rename the index.html file to index_h.html. If you have a dual-orientation folio, don’t change the name of the index.html file. In the Folio Builder panel of InDesign CC, click the “Add article” button and choose Import Article.

Add an article to your folio

Enter your article metadata and then browse to the folder that contains your Captivate project, and then click OK.

Import the HTML Article

InDesign will now seem to go into zombie mode, in which it will appear to be processing the HTML folder, but will never finish the task. The solution, which I outlined in another blog post, is to quit InDesign while it is hanging on the HTML import. Actually, what you need to do is to tell inDesign to quit, but don’t actually quit. Instead, wait, and InDesign will emerge from its coma and finish importing the HTML article.

Quit InDesign CC to complete the import

Then, you can politely tell the “Do you really want to quit?” dialog that you do not want to quit, and your HTML project from Captivate will now be safely in your folio, with no browser check. Once published, your user will need to push the “play” button on the Captivate project to start it, which is annoying to be sure. I hope the Captivate engineers will allow us one day to auto play a Captivate HTML5 project, if only in our DPS folios.

Share on Facebook

Using Edge Animate CC projects as HTML DPS articles with InDesign CC

Since its release (or pre-release…), designers have used Edge Animate to bring HTML5 animations to their DPS projects. While most designers place their projects into InDesign-based articles, some have asked how to use Edge Animate CC assets as HTML articles. Learn more about HTML articles in DPS Help. When they try to import the project after publishing it for Web from Edge Animate, however, they run into an issue with InDesign not being able to convert the HTML into an article. There is a workaround, at least for InDesign CC users. CS6 users won’t be able to use this workaround.

Edge Animate makes a single HTML file that references assets, CSS and Javascript files. This is good, because this is exactly the structure that DPS wants for an HTML article.  Your project needs to be called “index” for dual orientation articles, and  “index_h”, or “index_v” for single orientation articles. When you publish from Edge Animate, it makes a folder called “Web” in the “Publish” folder. In that folder will be a file called “index.html” (or “index_h.html” or “index_v.html”). From InDesign, open the Folio Builder panel, open your folio, and click the “Add Article” and choose “Import Article,” or choose “Import Article…” from the flyout menu. Fill in your article metadata, and then browse to the Web folder in the Publish folder of your Animate project. When you have everything set up for your article, click OK.

This is the point when things begin to go wrong. InDesign now attempts to convert the Animate project to a DPS article. You will discover that it will try for a very, very, very long time, although it will not finish the job. If you remove the file called “index_edgePreload.js” (or _h or _v), you will be able to upload the project, but it won’t work. It seems that InDesign must render the HTML in order to create a TOC image for the article, and it fails when it tries. It turns out that there is a way to force InDesign to complete the task, however.

Right after you click OK, quit InDesign. Seriously. Quit InDesign. Or, more correctly, ask InDesign to quit. At that point, you will see an alert box telling you that Folio Builder is busy “Building folio.” DO NOT click either of the buttons in the dialog box until you see the “Please Wait… Building Folio” alert appear and then disappear. Pay attention, because it might go by very quickly. When it’s gone by, click “No.”

Forcing an Edge Animate project to upload

 

Now, your Edge Animate project has been converted to an article and you can preview it in your browser or on your device. Timing is a consideration, of course. If you build an animation that is set to auto play, it is likely to play when you’re not looking at it, especially if it is not the article that opens when the folio opens. DPS will preload HTML articles adjacent to the article you are viewing, so those autoplay animations will animate and stop when you are not looking at them. If you place them onto an InDesign layout, then you have better control over when they play.

Share on Facebook

Sending email and email attachments from DPS publications

Many of my customers have asked how to send an email from within a DPS publication. For instance, in a sales enablement situation, it’s often necessary to share documentation after the salesperson has discussed the products or services with their clients. In an earlier blog post, I detailed how to display PDFs and other document types directly in your DPS applications. While this is good, it’s not a leave-behind that many sales people require. I wanted to explore some ways to send email from DPS publications, and here are a few of the ways I concocted this afternoon. (If you have my DPS Examples app installed on your iPad, and you’re reading this blog on your iPad, then tap here to see examples of sending emails from a DPS folio.)

Just send it!

Often, it is necessary to just send an email to a specific address. This is easiest to achieve with a hyperlink or a button with a URL destination that uses the mailto: tag. For instance,

mailto:someone@example.com?cc=someoneelse@example.com&bcc=andsomeoneelse@example.com&subject=Summer%20Party&body=You%20are%20invited%20to%20a%20big%20summer%20party!

is a URL that will fire off an email in the device email client. This email will be addressed to someone@example.com with CC to someonelse@example.com and BCC to andsomeoneelse@example.com. Its subject will be Summer Party and the content will be You are invited to a big summer party! It will be sent by the default email account on the device’s email client. Copy that URL into a button URL action in InDesign, and presto, you have an email button.

You can get creative with the content, of course. You can include links to files, so long as the link is a fully formed URL path. For iOS Mail, use the <br> tag to go to a new line. For other mail clients, you’ll have to experiment. Here’s how I set up my email button.

The URL destination:

mailto:someone@example.com?subject=Tax%20Time&body=Pay%20your%20taxes!<br>http://www.irs.gov/pub/irs-pdf/fw4.pdf

sends an email to someone@example.com with the subject Tax Time and

Pay your taxes!

http://www.irs.gov/pub/irs-pdf/fw4.pdf

as the message. Most email clients will interpret the link to the PDF as a hyperlink and will allow the reader to click or tap on the link and view the tax form.

Let’s get a little more sophisticated with this now. In InDesign CS6, we can insert HTML directly onto our layouts via the Object>Insert HTML menu. I have created a little form that has two inputs: email address and a menu to choose which file to include as a link in the body of the email message.

Copy and paste the following into your InDesign layout using Object>Insert HTML and preview on your iPad. If you have InDesign CS5 or CS5.5, you can save this as a .html file and point at it in a Web Content overlay.

<style type="text/css">
.emailform {
 height: 100px;
 width: 350px;
 font-family: Verdana, Geneva, sans-serif;
 font-size: 16px;
 font-style: normal;
 text-align: center;
 white-space: normal;
}
</style>
<script>
function sendMail() {
 var link = "mailto:"+document.getElementById('emailAddress').value
 + "?cc=myCCaddress@example.com"
 + "&subject=" + escape("Pay your Taxes!")
 + "&body=" + escape('Use this form to start the onboarding process.<br><a href="'+document.getElementById('chooseFile').value+'">Download your W-4 form now</a>')
 ;
window.location.href = link;
}
</script>
</head>
<body>
<div class="emailform">
 Email address:
 <input type="text" name="emailAddress" id="emailAddress" />
 </br>
 <select name="chooseFile" id="chooseFile">
 <option value="http://www.irs.gov/pub/irs-pdf/fw4.pdf">Federal W4</option>
 <option value="http://www.maine.gov/revenue/forms/with/2012/12_w4me.pdf">MAINE W4</option>
 </select>
 <button onclick="sendMail(); return false">Send email</button>
</div>
</body>

 

Of course, you will need to modify it to meet your use case, especially whether you want to include the CC line and which files you want in the menu.

Set the InDesign CS6 will automatically create a Web Content Overlay for you, and you need to configure it to your taste. Since I set my background color in CSS to match the background frame color in InDesign, I have set mine to transparent and to autostart with a slight delay so that it will only fire when the user actually views it. You must enable user interactions if you want the user to be able to fill out the form. Note that with iOS Mail, you can use HTML formatting in your message, so have fun with the message body. I believe that this technique only allows about 2000 characters in the body, so you might need to keep your messages short. Also, this javascript method will force the user to agree to be sent to the Mail application from the folio, while the direct URL method won’t. Nevertheless, this is a very flexible and robust solution for creating email forms within your DPS application.

Here’s what my example looks like on the iPad.

Now I tap the Send Email button…

Now I return to my folio and enter some info in the email form…

Pretty neat, eh?

Links to files are OK, but what about attachments?

If you need to send attachments to your email, then you are out of luck with a URL. You will need to implement another method. I’ll describe two of them here.

The easiest to make is a web form with an emailer server-side application as its action. Remember that you can insert HTML forms directly into InDesign CS6 with Object>Insert HTML or by putting the form in an iframe and copying and pasting the iframe code into InDesign CS6. Like my example in the previous section, include a few text fields for To: and From:, and perhaps even a menu to choose which file to attach. You can get fancy and have check boxes or menus that attach multiple files to the email, too. Then, in your emailer server-side application, compose and send an email using the information in the form. I have done this with PHP and MySQL hundreds of times over the years, and it is a rock solid method for sending email attachments. Of course, you should obfuscate that URL or put it behind some kind of login, ideally attached to your company’s LDAP or Active Directory, if you need security.

While I usually turn to PHP and MySQL, there are myriad ways to implement this on your server. Check to see what server-side capabilities are available to you and give it a whirl.

Thinking outside the (Mail)box…

So, what happens if you are offline? The online form won’t work, and you’ll need a different solution. On iOS, you can write a custom app with XCode that can leverage Custom URL schemes to transmit information between apps. The mailto: tag above is an example of one that’s built into iOS. Also included are sms:, tel:, and http:. You can build an app that can respond to a custom URL scheme and deploy that app to all of the users who need to send emails. Here’s an example of XCode projects that, when built, communicate with each other. http://mobile.tutsplus.com/tutorials/iphone/ios-sdk-working-with-url-schemes/

Let’s say the app named Enterprise Email that has an ID of com.adobe.jameslockman.emailsenderapp has the registered the custom URL scheme sendemail: in its plist. I can then construct a URL using either of my methods shown above in DPS that will tell iOS to communicate with Enterprise Email using URL encoding, such as: sendemail://someone@example.com&from=me@mycompany.com&file=filename.pdf This URL is easy to populate as the result of a form with or without javascript in a web content overlay.

It’s up to you to determine how to parse the incoming string in your custom app. In addition, you should probably have the app check in to a central file repository from time to time and pick up the list of available files and store them internally. The app should also have the ability to cache email sending requests so that it can wait until it gets a network connection to send its emails. This method completely bypasses Mail and will require the app to enable its own email sending methods. I do not have an example of this in action, but I’m considering building out a simple XCode example. If I do, I’ll post it as another entry and link to it here.

This method will only be applicable to an Enterprise who can manage deployment of apps to its installed base of devices through a Mobile Device Management (MDM) solution or other deployment method such as manual sideloading.

It’s in the mailbag

Remember that your ability to actually send email is dependent on your reader actually completing the email task in Mail. Also, the email will always be sent from their default account. They can always choose not to send the message, but in a sales situation, the sales rep will definitely want to send the message. Also, this provides an offline protection, since Mail lets you cache emails until there is an active network connection. If you need to send attachments, then you will need to look at an always online solution or the helper app solution. Your use case will dictate how far you need to go down the development road, but start simple with a URL or an embedded form. It just might be the all you need.

Share on Facebook

Form Field Flattening in Acrobat X

While at Adobe MAX last week, I was asked how a user could flatten form fields with Acrobat X. Flattening form fields means removing the form fields themselves and placing the data onto the PDF as regular items. This is a common request for folks who want to “lock down” a form without using password protection.

A person who overheard the request chimed in with “just print it to a new PDF!” While correct, printing to PDF to flatten form fields is not optimal. If there are any transparent art elements in the PDF, for instance, they will be replaced with non-transparent “flattened” artwork. Any interactive content will also be removed and replaced with poster frames, if available. What, then, are we to do if we want to keep our PDF just like it was, but without any form fields?

Acrobat Pro can automatically preflight PDF documents using a robust and configurable preflighting engine. In addition, since Acrobat 8, it can also apply what are known as fixups to PDFs in addition to preflighting. Preflight profiles in Acrobat often contain only fixups, and we’ll use one of these fixups now.

With a PDF open, open the Tools pane and open the Action Wizard panel. Next, we need to create a new Action. Click the Create New Action button to open the Create New Action dialog.

 

The Action Wizard allows you to schedule a series of steps from a pre-determined pool of steps on one or more PDFs. All of these steps get bundled into an Action, which you can start by clicking the Action’s name in the Action Wizard panel. We’ll name our new Action later. First, we need to determine on what the Action will act. By default, Acrobat will start with A File Open in Acrobat. This will use the currently open file as the target for the Actions that are about to take place. You can also choose other sources, such as a file or folder to which you would browse, a scanner, or even let the user decide at the start. I’ll keep the default setting, since I want to be able to flatten form fields in a PDF that I am completing.

The Action Wizard allows you to provide instructions to users as well, and it’s a good idea to let the user know what’s going to happen. Click Add Instruction Step to add an instruction step. Enter a title for this step and also the text that will show in the dialog. I included the following: “This Action will flatten form fields in the PDf that’s open in Acrobat. It will not flatten form fields in an XFA (LiveCycle) PDF. When complete, it will save a new PDF with the word flattened inserted before the .pdf extension” Click Save to close the dialog.

Having given our user instructions, we can now choose the sequence of events. For this Action, we want to execute a Preflight profile. Acrobat X comes with a wide assortment of Preflight profiles, some of which contain only fixups. The one we want is called Flatten Form Data. To choose a Preflight Profile, open the More Tools panel and then click Preflight, which is at the top of the list. A Preflight step will now appear in the list under Action Start. To configure which Preflight Profile will be executed, click the Options button in the Preflight step. Having chosen the Flatten Form Data Preflight Profile, click Safe to save the step.

The last thing we need to do is to configure how the flattened PDF will be saved. I want the flattened PDF to go in the same folder as the original PDF, but with a new name to indicate that it has been flattened. To the right of Save To:, click the menu and choose Same Folder Selected at Start. Then, click the Options button to open the Output Options dialog. Choose Add to original file names: and enter “_flattened” into the Insert After field. Ensure that the output format is set to Save File(s) As Adobe PDF, and then click OK to close the dialog. You can choose to Overwrite existing files if you wish; it will not affect the original form.

Having configured the Action, it’s time to save so that we can use it. Click Save, and enter a name for the Action. I called mine “Flatten Form Fields” and entered the text from our alert dialog as the description. Click Save to save the Action, which will make it available in your Action Wizard panel.

To use the Action, open a PDF with Acrobat form fields that contain data. In the Action Wizard panel, click the name of your new Action. You will be reminded of what’s about to happen, and then you can click Next to proceed. You can choose not to show this Actions dialog again. Next, Acrobat will pop up our custom alert, and when you click Next, Acrobat will flatten the form data and save the new PDF. This new PDF will have all form data flattened onto page content and all fields will be removed. This is a great example of how Actions in Acrobat X can help get complex or obscure jobs done quickly and easily.

Share on Facebook