Requirements

Prerequisite knowledge

Basic familiarity with the LiveCycle ES environment is recommended. Prior experience working with 3D objects is helpful.

User level

Beginning

Additional Requirements

LiveCycle ES Update 1 (with PDF Generator 3D)

The release of LiveCycle ES (Enterprise Suite) Update 1 includes new functionality that allows you to generate server-side 3D PDF diagrams. This means you can turn CAD-formatted diagrams (created using SolidWorks, Catia, and more) into PDF documents while retaining all of the 3D attributes. You can then distribute the PDF documents for review, and it is no longer necessary for reviewers to install the CAD software in order to view and interact with 3D diagrams. They can download the free Adobe Reader instead, streamlining the workflow process.

When you use this new 3D PDF generation feature in combination with the data merging capabilities of the LiveCycle Forms ES software, the result is a very powerful tool for producing interactive, data-driven 3D documents.

In this article I’ll demonstrate some of the basic features of the LiveCycle PDF Generator 3D ES software. I’ll also walk you through the process of adding metadata and a 3D object to a form template to create a PDF document.

Understanding LiveCycle PDF Generator 3D ES

LiveCycle PDF Generator 3D ES is a server-side component that converts 3D CAD diagrams into PDF documents. It is a superset of LiveCycle PDF Generator ES for the Windows operating system. LiveCycle PDF Generator 3D ES supports assemblies (the creation of master 3D files with additional support files) so that you can distribute a complete review project in a single PDF document.

LiveCycle PDF Generator 3D ES includes the Adobe 3D Reviewer – a utility program that converts 3D files and merges them with a PDF template.

Workflow for creating 3D PDF documents

To create a 3D PDF document, LiveCycle PDF Generator 3D ES requires two files: a CAD drawing (or assembly) and a settings file. The settings file is an XML file that contains the paths to the other elements needed to complete the PDF conversion. This may include (but is not limited to) the following files:

  • The PDF template used to place the 3D object. This could be either an Acroform or an XDP-based document created with LiveCycle Designer and saved as a PDF.
  • The JavaScript file that bridges the interaction between the PDF template and the 3D object.
  • The directory containing the additional CAD files. This folder is used when the 3D file is an assembly of additional 3D objects.
    Note: You can include several additional search directories in the same settings file.
  • Information on font substitution.
  • Optimization information for controlling the visual quality of the 3D object.

The example below displays a typical settings file. As you read through the code, notice that the TemplatePDF, DefaultScript and AdditionalSearchDirectory nodes all have entries for the external files:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <A3DConversionSettings SettingsName="DefaultCatiaV5" xsi:noNamespaceSchemaLocation="pdfg3d_complete_settings.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <General> <DefaultScript Path="C:\temp\Interaction.js"/> <PreviewImage ImageChoice="1" ImagePath=""/> </General> <Document> <TemplatePDF Path="C:\temp\Template.pdf"/> </Document> <Import> <FormatSpecificDataToImport Attributes="true" ConstructionAndReferences="false" HiddenObjects="false" SetUnits="false" SetUnitsChoice="7" Solids="true" Surfaces="true" ThreeDDrawings="false" ThreeDPMI="true" Wireframes="true"> <Fonts AlwaysSubstitute="false" DefaultDisplayUnitsWhenMissingChoice="2" DefaultNumberOfDecimalPlacesWhenMissingValue="2"> <ProprietaryFontDirectories> <ProprietaryFontDirectory Path=""/> </ProprietaryFontDirectories> </Fonts> <Assembly> <UseRootDirectory Value="true"/> <Recursive Value="false"/> <CacheActivation Value="false"/> <AdditionalSearchDirectories> <AdditionalSearchDirectory Path=" C:\temp\otherFiles" Recursive="false"/> </AdditionalSearchDirectories> <PathDefinitionFiles> <PathDefinitionFile File=""/> </PathDefinitionFiles> </Assembly> </FormatSpecificDataToImport> </Import> <Optimize> <ThreeDFormatInPDF FormatChoice="2"/> <SurfaceTriangulation LevelOfDetailChoice="2"/> <PRC CompressBrep="false" CompressBrepChoice="0" CompressTessellation="true"/> <U3D MeshQuality="false" MeshQualityValue="100"/> </Optimize> </A3DConversionSettings>

You can choose to either load the settings file into LiveCycle PDF Generator 3D ES from the AdminUI panel or pass them into a process at runtime as an XML variable. The AdminUI panel also includes a wizard for creating the settings file directly without generating a separate XML file (see Figure 1).

Creating the PDF template

When you begin the process of creating a LiveCycle PDF Generator 3D ES document, the first thing you’ll need to do is create the PDF template that is linked to the settings file. PDF templates must be in a PDF format. You can choose to create the templates as Acroform documents or as XDP-based documents. Since this article’s focus is on using LiveCycle, I’ll discuss the process for creating PDF templates in the XDP format.

You can create XDP-based PDF files using Adobe LiveCycle Designer ES. The interface allows you to add fields, buttons and other interactions just as you would add these elements for any template; however, the PDF file must also include the following:

  • A button object named A3DR_3DFrame (which is case sensitive). This object describes the location where the 3D object will be placed.
  • You must save the form as a Static PDF Form.

If you want to include additional interactions between the PDF template and the 3D object, you can correlate other field names with the JavaScript file. For example, you can allow users to click on a portion of the 3D object and see the attributes from that part shown in a field. The JavaScript file contains the code to get the attribute and display it in a specific field (A3DR_PartNotes) and to hook it up, you must ensure that the corresponding field exists in the PDF template.

You can also call JavaScript methods from the PDF template. Simply add a script to the PDF template to call the method in the JavaScript file. For example, suppose you have a method called setRenderMode in your JavaScript file. To call the method, you would add the following script to the PDF template:

xfa.resolveNode("#subform[0].A3DR_Attributes") var myDoc = event.target; var a3d = myDoc.getAnnots3D(0)[0]; a3d.activated = true; //need to activate it to talk to it a3d.context3D.setRenderMode(this.rawValue);

Working with the JavaScript file

If you want the PDF template to interact with the 3D object, you can add an optional JavaScript file that contains the code to facilitate the interactions. A thorough discussion of the object model for 3D objects is outside the scope of this article. However, it is important to understand that the objects that can be accessed are based on the structure of the 3D object in your document.

As mentioned above, it is also possible to pass data from the 3D object into the PDF template fields. To accomplish this, you must ensure that the field names are indicated in the JavaScript file and incorporate the JavaScript file in your assembly.

For more information, see

Building a service using LiveCycle PDF Generator 3D ES

In the previous pages of this article I covered the basics of working with LiveCycle PDF Generator 3D ES. In this section I’ll describe the process for using the LiveCycle PDF Generator 3D ES service. There are two operations available with the LiveCycle PDF Generator 3D ES service: Create3dPDF and Create3dPDFCustom.

Create3dPDF requires you to upload the settings file or create it using the AdminUI panels. Create3dPDFCustom requires you to load the settings file at runtime from a com.adobe.idp.Document object. Other than this difference, they are both the same.

To begin, I’ll use the Create3dPDF service, because it offers the opportunity to describe the AdminUI configuration as well.

Start by opening the AdminUI screen in a browser. Log in, and then select Services > LiveCycle PDF Generator ES > Adobe 3D-PDF Settings. Click New.

Enter the path to your JavaScript file under the Default Script Path field. If you are choosing not to use the JavaScript file in your assembly you can leave this field blank.

Click Document. In the screen that appears, provide the path to your PDF template. A PDF template is required. If you don’t have a PDF template and you want to follow along, download the sample files provided on the first page of this article and use the included sample PDF template. If you use the sample PDF template, uncompress the sample files archive and then provide a path to the template in the Template PDF Path field (see Figure 2).

Click Import. In this screen you can set the options as desired and needed. If you will be including supporting files, specify the additional search paths (where the external CAD files are located) in the Assembly section.

Click Optimize. This screen allows you to select additional optimization settings.

After you are finished, click Save. A dialog box prompts you to name the settings file. Take note of the name you use, because you’ll need this name later when you set up the process.

Now let’s begin creating the process. Open and log in to your LiveCycle Workbench ES and create a new short-lived process.

Add a new activity using the Create3dPDF service (which is located under the Generate 3D PDF - 1.0 category).

In the Properties window, in the Input section, find the Input Document setting. Set the Input type to variable and click the Add "+" button next to the field. In the dialog box, create a Document object and mark it as Input (see Figure 3). Then click OK.

In the Conversion Setting Name field, set the type to literal and enter the name of the settings file that you just created and named using the AdminUI tool (see Figure 4).

In the Output section, set the type as variable in the Created Document field. Click the Add "+" button to create a Document variable. Make sure to mark the variable for Output.

Save and Activate the process. You can test the process by selecting Invoke from the Workbench. In the Input Parameters dialog box, browse to select your 3D object file and then click OK (see Figure 5).

After the process executes, you’ll be presented with a dialog box with the option to save or open your new PDF file. Select the option to Open the PDF and notice that the 3D object is now placed on the button in the template (see Figure 6).

At this point you can interact with the 3D object. Click on the object and then try rotating it with your mouse. If you attached a JavaScript file, you can also set it up to display the data in the template.

Where to go from here

This example is very basic, but it serves as an example of how the LiveCycle PDF Generator 3D ES server-side component can be used in a process. Since the PDF template is an XDP-based document, you can also choose to add data fields that can be populated by LiveCycle Forms ES. You can include metadata information such as the document creation date, department name, project information, and any other details that describe the 3D object.

You could also use other services, such as LiveCycle Rights Management ES, to protect the intellectual property that is contained within the 3D object.

For more information, check out the online PDF Generator 3D documentation.