Creating PDF output in Adobe CQ

When you author in Adobe CQ, you may need to create a pdf version of the page. PDF pages would be helpful for users if they need to read the content when they are not connected to Internet.

Adobe CQ allows you to create the pdf version of the page using an OSGi bundle, PDF rewriter. After activating the content, call the page with the .pdf extension in the Author instance. The call will be automatically resolved to provide you with the pdf view of the content.

This blog entry explains how to create a pdf output using Adobe CQ 5.5 QuickStart.

It is assumed that:

  • Author instance is installed on port 4502 on the local machine.
  • Writer instance is installed on port 4503 on the local machine.

Check if PDF Writer bundle is installed and it’s Active in your instance.

  1. Login to Adobe CQ Web Console Configuration.  (http://localhost:4502/system/console/configMgr)
  2. Select OSGi > Bundles.
  3. Filter for Day Communique 5 Rewriter.
  4. Ensure that the bundle is installed and is Active.
    pdf_bundle

Update the XSLT based on your component

While generating a pdf from html, you need to define the XSLT that transforms each element (component) to pdf format. Basically, you need to map all the components to a new style.
By default, Adobe CQ uses the XSLT defined in the following path: /libs/wcm/core/content/pdf/page2fo.xsl
Assume that you use the image component that inherits foundation/components/textimage. And, in the author instance, you have inserted an image using the component. To include the image in the pdf view, add the following in the XSLT.

<xsl:template match="*[contains(@sling:resourceType,'foundation/components/textimage')]">
 <xsl:if test="@jcr:title">
 <fo:block font-size="18pt" space-before.optimum="12pt" text-align="start"><xsl:value-of select="@jcr:title"/></fo:block>
 </xsl:if>
 <xsl:if test="file">
 <fo:block><fo:external-graphic src="sling:/{$resource}/par/{local-name()}/file" content-width="100pt" content-height="100pt"/></fo:block>
 </xsl:if>
 <xsl:if test="@FileRef">
 <fo:block><fo:external-graphic src="sling:/{@FileRef}" content-width="100pt" content-height="100pt"/></fo:block>
 </xsl:if>
 <xsl:if test="image/@fileReference">
 <fo:block><fo:external-graphic src="sling:/{$resource}/par/{local-name()}/image.img.png" content-width="100pt" content-height="100pt"/></fo:block>
 </xsl:if>
 <fo:block font-size="12pt" space-before.optimum="12pt" text-align="start"><xsl:apply-templates select="text"/></fo:block>
 </xsl:template>

Ensure that every component you use in the page has a corresponding XSLT match.

Replicate the XSLT file to the publish instance

This is an important step, since the author instance still has the outdated version of XSLT. You need to activate the XSLT that you updated and make the most updated version available in your author instance.

  1. Login to SiteAdmin. (http://localhost:4502/siteadmin)
  2. Click Tools and in the left navigator select Replication > Activate Tree.
  3. Double-click Activate Tree.
  4. Provide the start path as /libs/wcm/core/content/pdf/page2fo.xsl
  5. Click Dry Run to see the file that is updated after the last Activation.
  6. Select the page2fo.xsl file and click Activate.
    activate_tree

Three mistakes I made while creating a website using Adobe CQ

  1. While activating (publishing) pages in the new website, I didn’t activate the template, components, and style folders.And, I got a blank screen without any content. Content in the Live CQ pages checks for the corresponding JSP page to render the content. If these pages are not activated, the page won’t display anything. Activating a page can be done in the Website tab of the Siteadmin. However, to activate templates, components, and so on, go to the Tools tab. Then, select Replication in the left-side pane and double-click Activate Tree. Search for the node that you want to activate. For example, if you want to activate a component, go to the apps folder and then select the corresponding folder and activate all components in which you added the content.
  2. New components in the sidekick were not enabled explicitly. And, in the sidekick menu, I couldn’t see the components that I created when I was in the Edit mode.Create a page that uses the template that you created. Click the Design icon in the sidekick. The Design of Par tab appears. Select the Edit button. The Allowed Components list displays the components that you created. Select the components to display in the Edit mode.
  3. Sidekick is not enabled because of the script errors in newly created components.You can figure out if it’s an issue with the component by creating a new folder in the apps directory and then drag and drop the newly created components to it. Do it one-by-one while checking the authoring page to see the sidekick.

Flash Player 11.4 is available for download

The latest Flash Player version (11.4.402.265) is available. Please go to Adobe site to update Flash Player.

Flash Player 11.3 issues on Mozilla Firefox

A new version of Flash Player plug-in is available today (June 21st). The latest version is 11.3.300.262.
Go to http://get.adobe.com/flashplayer/ to get the latest version.

This version is for Mozilla Firefox and Safari.
If you have any issues with Flash Player 11.3 on Mozilla Firefox, see Issues | Flash Player 11.3 | Mozilla Firefox.

 If you have issues with installing Flash Player, please post the issue @ http://forums.adobe.com/community/flashplayer/installing_flashplayer.

Fireworks CS6 What’s New

Here is the link: http://helpx.adobe.com/fireworks/using/whats-new-cs6.html
Help & support page: http://helpx.adobe.com/fireworks.html
Archive of old docs: http://helpx.adobe.com/fireworks/archive.html

FrameMaker 10 ACE is live

Check your mastery by registering @ www.pearsonvue.com/adobe/exams/

ExtendScript to print the word count in an FM book file

Find the script here.
To test the script:

  1. Create a book file with many chapters. Chapters must be added as files.
  2. Open the book file.
  3. Ensure that chapters are not opened.
  4. Run the script.
  5. Wait for the script to open all the chapters and then print the word count.
    (Note that the script doesn’t include the words inserted in tables.)

Developing a document checklist using ExtendScript

I developed a script that can be used as a document checklist for a FrameMaker 10 book. You can add questions such as, “Have you updated variables?” Running the script captures the question and the answer to a .txt file. See the comments in the script to know more details.

Download the script here.

Disabling ActiveX filtering

Flash Player does not work if ActiveX filtering is enabled on Internet Explorer 9. When you visit sites that have Flash content, “You need to upgrade your Flash Player to watch this video” error appears. To disable ActiveX filtering, click Tools > Safety > ActiveX Filtering as shown below:

Your Flash Player version

I see many comments from users about the Flash Player version they installed and the most updated version available from Adobe. The latest version of Flash Player is 11,0,1,152

I have developed a Flash movie to help you. If you have Flash Player installed, it shows the Flash Player version installed on your machine and your operating system. It also displays a link to the Flash Player uninstaller for your operating system. Means, if you are on Mac, the link will point to the uninstaller for Mac.

Note that if you don’t have Flash Player installed, you see “plug-in not found” error.

Compare the version available in your machine and the latest version. If needed, uninstall the existing version and get the latest installer from Adobe.