Read the update instructions on the bottom of page 4
Version 14.01.10 and newer
For
MAC OSX 10.4 and newer
Windows 200x, XP, Vista, 7
InDesign CS4, CS3 or CS2
This add (an image) has been turned into an active element using script labels.
Read more in this guide.
Address your questions with an email to ai@aiedv.ch
Exporting InDesign Documents and how to get it right
Interactive Web Documents
All purpose XML
Flip Page eBook
A Guide to XML, eBook and HTML-Exports as flipping page eBook
Two versions of «BatchXSLT for InDesign» are available! The ‚Standard‘ and the ‚PRO‘ version.
The DEMO package may be switched from ‘Standard’ to ‘PRO’ mode. The PRO version exports a lot of additional informattion about the original document content. See pages 15 and 28 ff.
To publish documents on the Internet as a flip page eBook, you need the Standard version only.
Links
The latest guide is available in the following versions:
The re-use of text and images from printed products in different media like Internet, CD production or specialized database applications gains more and more in importance. InDesign documents usually may not be re-purposed ‘as is’. The question arises how documents may be exported to an adequate format. The answer is clear: it must be XML and/or HTML.
The present guide should help to build a bridge between layout design and information technology and shows the important steps to keep in mind when creating documents for multiple output media.
In fact, exporting documents is no big deal with «BatchXSLT for InDesign» and consists of a few easy steps only:
– push a button to export the document
– check the exported data in a browser
– publish on the Internet, CD or with a database
These steps will be discussed on the following pages in more than three short lines. You will learn how to create printable documents which allow trouble free further processing in the web department.
Keep in mind: If you have to export a document, then you work for two target products at the same time! One is your print product and the other one is the web output.
In most cases, this does not mean additional work and expense but may be done with proper and sensible design!
Andreas Imhof
XML eBooks with «BatchXSLT for InDesign»
«BatchXSLT for InDesign» does not create a flip book based on Flash but based on plain XML!
Such eBooks may be textually searched, may be read by search engines and are suitable for any further data processing!
No matter what you want to do with the exported data, this type of XML is YOUR choice!
Independent consultant and Software developer for InDesign and QuarkXPress since 1993.
Owner of the sites www.AiEDV.ch www.ePaperArchives.com www.ePaper-System.com
Document exports to XML, ePaper, eBook and HTML for InDesign and QuarkXPress
XML-Transformations (XSLT) custom-made
Document title: „Exporting
InDesign Documents
(and how to get it right)“
Category: HOWTO
Copyright 2007 - 2009, www.AiEDV.ch, All Rights reserved.
InDesign® is a trade mark of Adobe Inc. USA
QuarkXPress® is a trade mark of Quark Inc., USA
How «BatchXSLT for InDesign» works
An example: Let us assume, that we want to publish our Newspaper or periodicals on the Internet.
What material do we have to start:
– An InDesign document containing any number of pages
– Any number of images placed on theses pages
What do we need on the Internet:
a) For each document an XML or HTML file reflecting the content
b) All images as JPEGs, attached to articles
c) A PDF of each page
d) A JPEG of each page
«BatchXSLT for InDesign» transforms InDesign documents into understandable structured XML. It creates groups of text and image boxes and merges them to article objects with linked JPEG images.
The automatically generated external style sheet (a CSS) may be modified to match the visual needs in browser views.
The resulting XML and HTML output files contain information on:
– Article content (styled text with a CSS)
– To articles attached image links
– Article positions on a page
– JPEG- and PDF previews of all pages
The exported data is suitable for any further electronic processing.
A Goody:
A browser may display the created XML or HTML data as a navigable ePaper (eBook)!
System Requirements
«BatchXSLT for InDesign» runs with Windows XP, Vista and 7, OSX 10.4 and newer and with InDesign CS4, CS3 & CS2
IMPORTANT! Java 1.5 or newer must be installed!
«BatchXSLT for InDesign» does NOT run with older Java-Versions!
Checking the installed Java Runtime Environment
Make sure, the minimal version of the Java Runtime Environment mentioned below is installed. If an older version is installed like 1.4 or 1.3, you must update the system software or install the latest Java version.
On Mac OS X check:
At a Terminal prompt enter ‘java -version’
Java should answer with: ‘java version “1.x.x_xx”’
On Windows check:
In a Console window enter ‘java -version’
Java should answer with: ‘java version “1.x.x_xx”’
For OSX 10.4: The X11 System must be installed!
You may find it in the folder „Applications/Utilities” with the name „X11“. If it is not there, you must install it from the DVD which was included with your system when you purchased it, or you may download it from Apple Inc.
Requirements
Software downloads
The «BatchXSLT for InDesign» software package may be found on the web site www.aiedv.ch or with the following links:
I suggest, to directly make an export as a first test. The following articles discuss the program installation and the export of a document. If the subsequent examination of the data is unsatisfactory, starting from page 9, many articles describe the rules to observe when writing and designing documents which must be exported.
The «BatchXSLT for InDesign» software package contains all tools to start a document export with a mouse click.
Easy to operate InDesign scripts control the whole export procedure: All required output format files are produced and then «BatchXSLT» automatically is called to create the desired core data – the XML file. This file, as well as the HTML file with the same name, may be opened in a browser as a navigatable flip page eBook.
Preparing Document Exports
Updating from a previous version?
If you are updating from a previous version or just want to test a new version, do not trash or overwrite the two main application folders mentioned in the following installation procedure! Rename the two core program folders “BatchXSLT4InDesign” and “BatchXSLT4InDesign Scripts” to “BatchXSLT4InDesign_OLD” and “BatchXSLT4InDesign Scripts_OLD” or store them aside, until you are sure, that you no longer need them!
Keep track of any made changes in the software you made which you will need in the new version too!
If you already have an installed version read the update instructions on the bottom of page 4
Installing the InDesign Exporter Scripts
A second copy process...
JavaScript programs are contained in the package to automate and enable the export procedure. The path to these scripts is:
To install these scripts into InDesign, you have to copy the folder "BatchXSLT4InDesign Scripts" from the opened disk image into the InDesign Script Panel folder. You also may copy it from above mentioned path to any other InDesign application:
For InDesign CS3/4: YourInDesignCSxProgrammFolder/Scripts/Scripts Panel/
For InDesign CS2: YourInDesignCS2ProgrammFolder/Presets/Scripts/
«BatchXSLT4InDesign» Software Installation
What are the scripts for and where can they be found?
Find the scripts in InDesign’s main menu like shown in the image:
The script „ExportCurrentDocument.jsx“ creates the flip page eBook. It exports the content of the current document, creates all page previews as PDFs and JPEGs, copies the original images and starts «BatchXSLT» to transform the prepared material to (e-paper) XML and HTML. With CS2, some dialog options are NOT available: to split articles running over multiple pages.
The script „ftpToWebArchive.jsx“ is the starter for «BatchXSLT» to transfer exported data to a web server using the FTP protocol.
The script „pushToWebDatabase.jsx“ is the starter for «BatchXSLT» to load exported text data into the full-text search database.
Installing «BatchXSLT4InDesign» on Mac OS X (Windows next page)
2 simple copy processes...
Mount the downloaded disk image with a double click to see the disk image window containing the software:
1.
Drag/drop the ‘BatchXSLT4InDesign’ package icon (a folder) from the package into your system’s “Applications” folder.
If you do not have such rights (administrator rights are required) copy it to your user HOME folder.
The ‘Home folder’ is NOT the screen desktop!
But this is the folder shown in the Finder with the small house icon. It points to: /Users/yourName/
You should see this folder structure in your “Applications” folder (marked green - “Programme” is German language) or in your user directory (marked red):
The folder „BatchXSLT4InDesign“ containing the following sub-folders and files:
– BatchXSLT
– Docs
– Export
– START.htm
Everything is contained in this folder and sub-folders to run «BatchXSLT for InDesign» on any OSX Intel or PPC machine with Java 1.5 or newer.
The main application is contained in the folder “BatchXSLT” and is named “BatchXSLT.app”
If you already have an installed version read the update instructions on the bottom of page 4
Windows Installer
You must be logged in as an administrator in order to install this package.
The Windows Installer installs the «BatchXSLT4InDesign» application folder into the system’s “Programs Folder” and will let you choose the InDesign to install the exporter scripts.
Start the downloaded installer package “BatchXSLT4InDesign xx-xx-xx Setup.exe”. (xx-xx-xx is any version number).
Choose the installer language and click [ Next > ].
Accept the License Agreement and click [ Next > ].
You are now asked for the path to your InDesign application to install the InDesign exporter scripts:
Click [ Browse... ]
To install the scripts for InDesign CS3 and CS4 locate the folder “Scripts Panel” within your InDesign application folder. This will be a path like:
Click [ OK ] button if the path is correct and then click [ Next > ] to continue installation.
Click [ Next > ] at the following dialogs and then click [ Install ].
After installation has completed, you may view the online manual and «BatchXSLT for InDesign» is started automatically.
Click [ Finish ] at the last installer window.
Switch to the «BatchXSLT for InDesign» application window and check the messages at the bottom section.
The message which is most important is:
*** Sanity Check Results: IM: OK, GS: OK, IM-GS: OK
This means that ImageMagick is OK, Ghostscript is OK and when ImageMagick is talking to Ghostscript everything is OK.
What was installed?
1. The «BatchXSLT for InDesign» main application was installed into your system’s “Programs Folder”.
2. The exporter scripts folder was installed into your InDesigns “Scripts Panel”. See next article to finde the InDesign Scripts Palette.
3. Two registry keys were set. One for Ghostscript and one for ImageMagick.
To verify the registry key open “Regedit” and navigate to HKEY_LOCAL_MACHINE/SOFTWARE/
You will see the keys “GPL Ghostscript” and ”ImageMagick”.
Nothing ‘magick’ is contained in the sub keys but the paths into the «BatchXSLT for InDesign» application folder to the imaging helpers Ghostscript and ImageMagick.
Uninstalling
Call the uninstaller contained in the programs folder BatchXSLT4InDesign.
OR (if you made a manual install) do a manual uninstall: delete the two folders mentioned above and also delete the registry keys.
You also may want to remove the working folders created in your home folder: “Export” and “BatchXSLT4InDesignComm” (a communication folder). That’s it.
What are the exporter scripts for and where can they be found?
Find the scripts in InDesign’s main menu like shown in the image:
The script „ExportCurrentDocument.jsx“ creates the flip page eBook. It exports the content of the current document, creates all page previews as PDFs and JPEGs, copies the original images and starts «BatchXSLT» to transform the prepared material to (e-paper) XML and HTML. With CS2, some dialog options are NOT available: to split articles running over multiple pages.
The script „ftpToWebArchive.jsx“ is the starter for «BatchXSLT» to transfer exported data to a web server using the FTP protocol.
The script „pushToWebDatabase.jsx“ is the starter for «BatchXSLT» to load exported text data into the full-text search database.
The Document Export
Exporting InDesign to XML e-Paper
Finally... a real example
To enable you to immediately export a document, the software package contains an example document.
The previously installed folder „BatchXSLT“ contains the sub-folder „_TestData“. Therein find the folder „in“ with several files:
– DB_20080628_01_FrontCS3.indd
– DB_20080628_01_Front.indd
– as well as all images: 28_01hinweis.eps, 28_01zimbabwe.eps, and more...
Open the file “DB_20080628_01_FrontCS3.indd” in InDesign CS3/4 or “DB_20080628_01_Front.indd” in CS2.
At the InDesign Script Palette double click the script “ExportCurrentDocument.jsx”.
For InDesign CS3/4 the following dialog is shown (in the InDesign CS2 dialog the options for „Story splitting“ are not available):
Do not change any other options for a full featured export!
HTML flip book and general purpose XML.
Fill in the fields „Company Name“, „Object Name“ etc. Sub-folders with the given information are created below the „Export Base Path“
Click the OK-Button to start the export.
After a minute the message appears, that the base export has been completed and that the exported data, which is now transformed by «BatchXSLT for InDesign», may be expected in the output folder.
What happened?
The export script has compiled an .inx file (InDesign’s Interchange Format), has produced page PDFs and -JPEGs and has copied all images into the folder “Export/in” in your Home folder. After this, it has called «BatchXSLT» to create the XML-eBook.
That’s it! The eBook is ready!
Where to find the exported data and what can be done with it is discussed in the articles on the following pages.
XML without limits
Just a simple example on what can be done with XML data: display it in a browser as a navigable eBook.
It is not the XML data itself behaving like a flip page eBook. This is done by external programs: Javascript programs linked into the XML file, as well as the browser’s internal XSL transformer.
These additional programs and a style sheet, all attached to the document, may be found in the folder „XSLCSS“. The referencing links are contained in the XML file.
The purpose of exported data may be:
– publish 1 to 1 on the Internet or on a CD
– push into a database
– extract article by article
– filter plain text for a full-text search engine
– to develop an own ePaper-system
An endless list...
Firefox Version 3 shows plain text but no flip page eBook!!??
This is standard behavior - don’t panic!
Change the Firefox internal settings zu view exported XML on the local machine. This is no problem when displaying html or XML from a web server.
How you can change this setting is described on page 21.
Please Note!!
An XML file must be displayed with a suitable Browser:
On Windows:
– Firefox (www.firefox.com)
– Internet Explorer 6 and newer
– Chrome
– Safari
– Opera
On Mac OS X:
– Firefox
– Safari 2.0.4 or newer
– Opera
Other newer Browsers may work too – check it out – there are many of them!
Where is the exported data?
You may find all exported data below the folder
Export/out
which may be found in your personal directory, your Home folder!
Data Check with a Browser
The visual data check is important!
Make a visual check of all exports until you feel confident, that editing was done according to the rules!
The check is simple and may done within a browser
Whether the data subsequently will be used to show an eBook in a browser currently is of no importance. To display as a flip page eBook is one out of many possible ways to use and visualize such XML data.
This is XML and therefore is open for any processing
Particularly check the correct boundaries of the articles on a page.
Moving the mouse over an article on the page preview, the blue frame shows what elements belong to this article and also reflects the separation within the XML file
If you know, that the document contains very special characters (fonts), then check the correct drawing of these characters in the browser.
Also examine the quality of the converted JPEG images!
Display as eBook in a Browser
Open the previously exported file „DB_20080628_01_FrontCS3.xml“ in an XML-aware Browser (see the frame with the title „Please Note“).
An HTML version of this XML file has been created too and is named „DB_20080628_01_FrontCS3.htm“.
You should see an eBook with flippable pages which is navigable with the mouse. Flip the pages by clicking the mouse on the corners of the page previews.
An article is marked (framed) by moving the mouse over it and a short text preview is shown. Clicking on an article shows it in a readable form on the right side of the pages.
If you are not happy with the result, the following pages show you some important things about editing documents!
Data Inspection
Influence Read Flow
– Chained article text always is shown in correct read flow.
– An article’s frames are sorted „Top-Down“.
– Objects anchored in text behave like a normal character and therefore appear in proper read flow.
Document exporters are able to merge – to catch – elements like text and image boxes into one single unity.
To find components belonging to the same group, they pay attention to:
1. grouped boxes
2. touching or overlapping boxes
3. chained text boxes
4. boxes in neighborhood within a given catch radius
Text and image boxes only are attentive to other boxes within a given catch radius.
All items play an important part when an article should look as close as possible to its original in the printed product.
InDesign Documents to XML, XML- and HTML- ePaper www.aiedv.ch
Advertisement
Proper Page Design
Frames without capture mechanism
Some box types will not try to combine other frames into a single article!
The blue background box of this page for example does NOT try to combine all articles into a single large article.
The reason is simple: the blue colored box is defied to have content type “Unassigned” (not Text and not image box.
There are several box types which are always exported as a standalone object:
1. All kind of lines created with the line drawing tool
2. Frames defined to have “Unassigned” content
3. Boxes whose height or width is more than 80% of the paper height/width
A page with a background image, like shown on the cover page of this document, can be created with a special master page.
Elements on master pages will NOT be exported.
Too large title box
The Captured Article
Avoid too large text and image boxes!
This actually should be an independent article! The overlap with the left (red) title box means for the exporter to export and merge both articles into one single article unity!
The far too wide title box of this single column article does not bother in the printed document and just looks fine. Touching the article on the right hand side causes, that both articles are merged into one article. This might be correct if you intentionally enlarged the box but certainly not in this case.
Separate different articles
The clear separation of articles on a page is important when extracting article unities!
On this page, the blue background shows, that each article has enough distance to his neighbor.
No box of one article should touch or even cover an other element of an article next to it.
The article below, titled “Too Large Title Box” and marked red, shows the importance of such article gaps.
The browser view - the blue marker around the article - immediately shows, that both articles were merged into the same article unity. Click on the article and you will be able to read the text of both articles as a single article.
In this case, this certainly is wrong!
In the printed product, both ads have identical appearance, however NOT in an electronic version!
in
Holidays
Paradise
€ 290.-
Don’t just «paste over» the images provided by your advertisers with new text!
The read-flow and color fidelity of text and images may be lost!
Category #2
The
Splitting of Sections
is not only very important for your readers, but especially for full-text search engines.
In order to be able to deliver relevant results, it is most important, that a textual section covers one theme only like “cars to sell”.
If you don’t split sections, you run the risk that a
full-text search result
will return an article actually talking about “cars to sell” but also about “higgledy-piggledy”.
The optical
Separation
of sections in a printed product is done automatically by our eyes and brain.
In an eBook, where a computer is responsible for an adequate display, the physical separation (box splitting) must be done manually when a document is created!
The best chance to make sure the read-flow of an article is preserved is to chain text boxes.
The three boxes of this article:
a) Title and lead
b) This text box
c) and the text box on the right
are chained with each other.
Chained text boxes assure that the correct read flow of an article is preserved even when it is built from a more complex box structure.
Articles running over multiple pages are NEVER separated and are exported as single text flow.
The box chain also guaranties, that the box on the right side having a lot of space to the title, is attached to the correct article.
Chains are not useful in all cases! Often enough, especially in automated ads production, text is filled into chained boxes in one piece.
In these cases it is of importance to physically split sections. Your readers will be happy not to read thousands of lines with any number of sub-sections as a single article.
«To chain or not to chain...»
It is up to you to decide when and where text boxes should be split.
Active Document Indexes
Active links to certain pages in a document made with character styles
Document indexes whose page numbers are acting as active links and actually flip to the chosen page make your readers happy!
Create a new Character Style named
gotoPage
and mark the page numbers in the index lines with this style.
You may create any number of such styles as long as their name starts with ‘gotoPage’ like ‘gotoPage bold’.
When the reader clicks on one of these page numbers the desired page is shown.
The document index entries on the 2nd page of the front cover of this document exactly work like this.
Links using Script Labels
Sophisticated web links for ads and images
A lot of ads are placed into a document as plain images. A stand-alone image box containing an image (the ad) positioned anywhere on a page.
To make such images more attractive for readers and advertisers, an interactive and informational part may be attached to it.
Using InDesign’s Script Label palette, information for active links may be attached to image boxes:
– Title and descriptive text
– a target internet address
How to achieve this, is described in the chapter „Tips and Tricks“ starting on page 19.
Links with style sheets
Links to external web sites like www.anydomain.eu
Particularly in an automated production environment it is very convenient to define web links using style sheets.
Create a new Character Style named
wwwLink
An Internet address like www.aiedv.ch which is marked with this style turns into an active web link when clicked in a Browser. However, in a page PDF, such ‘styled’ links are not active.
The «BatchXSLT for InDesign» manual describes, how to create any number of such style sheets which will become active when clicked.
Active Links
Interactive Web Links with InDesign
Active links to external web sites made with InDesign Hyperlinks.
Links to external web sites may be achieved using InDesign‘s Hyperlinks Palette.
The palette may be found from InDesign’s main menu:
Window –> Interactive –> Hyperlinks
Mark the text which should act as a Hyperlink like, for example, this address:
This also can be any text which does not look like a web address.
At the Hyperlinks palette, you now create a new link (marked red).
The window for the Hyperlink options shows up:
The information in the URL field is the link target.
More information on URL Hyperlinks can be obtained from the InDesign manual
The proper functionality of a given link may be tested within InDesign by clicking on the small right pointing arrow in the Hyperlink palette.
«BatchXSLT for InDesign» automatically will create an XML or HTML tag which may be used by web applications and which will work as a clickable active link in any web browser.
NEVER, NEVER! set paragraph, line endings within hyper links!
InDesign’s built in feature to automatically create a table of contents can be used for an active index which will flip to the desired page when clicked.
Use InDesign’s “Table of Contents” palette to define and create your TOC.
Nothing special: add all the styles which should go into the index, set the index level and set the style for this level.
The most important style to set is the one for the ‘Page Number’.
As mentioned in an article on the previous page, we need a character style to mark the plain page number. It’s name must be ‘gotoPage’.
Set the style for the ‘Page Number’ to ‘gotoPage’ like shown in the image below (marked red). This may be any character style who’s name starts with ’gotoPage’ like ‘gotoPage bold’ or ‘gotoPage_12pt’
Now save and create your table of content. Put it on a ‘normal page’ – do NOT put it on a master page! Objects located on master pages are not exported.
You now may check the page numbers in the table of contents: it’s character style must be set to ‘gotoPage’. As browsers can not display ‘tabbed text’ like page layout programs can, you might want to reformat your TOC as a real table. Like this the TOC shown in a browser will be a nice looking formatted table.
The TOC of this document was created this way.
Automated Active Table of Contents
Images containing Layers
Reduce images composed with layers like Photoshop PSD and TIFF to one single layer and remove unused layers!
Suppress Images and Boxes
The image’s filename can determine if certain unwanted images should not be exported. Especially useful for head and background images.
Image names starting with excl_ or 555 automatically are excluded from export.
This is configured in the file ‚autostart.jt‘ at the line:
tp_65 = imageEXCLUDE=excl_;555
Adjust with a plain text editor, each term separated with a semicolon.
Another way to suppress an image box: Enter *noexp* at the box’ (not content) Script Label.
Paper size of PDF and Illustrator images
PDF images, most often fill a small part of the drawable part of the paper only. With InDesign, the desired part of the image is simply moved under the cutting rectangle of the image box. This is fine for printing but not for exporting!
Do this: Set the paper size equal to the size of the actually drawn image content. Document exporters usually have troubles to locate the wanted image clip on the whole sheet of paper.
A Photoshop PSD image:
as TIFF (clip):
as PDF:
Line Drawings
Choose a proper export format for images
As a preset standard, images are converted to JPEGs. If the majority of your images are black and white line drawings, then you should configure «BatchXSLT for InDesign» to turn the original images into GIFs.
In these cases, GIF images are of better quality and use less space on the disk.
Image Details
Proper image clips
Particularly, when you mainly use PDFs and Illustrator (.ai) images in your documents, you should make sure, that the placed images are cut to the desired snippet.
Do not position a huge image showing a panoramic view when you actually need one of the heads only. Cut the head from the large image and create a new small image to place into the InDesign document.
Complete Images
Create complete images!
A bad habit is to simply stick new text boxes over unreadable text in an image.
DON’T do this!
Finish the image in your preferred imaging software: rub out unwanted parts and write new readable text. Like this, the image is complete and a unity.
Paste over text boxes are exported AFTER the image and are loosing the direct context to the image.
Embedded images
Usually, images embedded into an InDesign document can be exported. However, it is not guaranteed!
Each image should have an external image file on the hard disk or mounted volume!
Exportable Image Formats
Most popular image formats may be exported from InDesign documents.
Many different image formats are used in a printable product: PDF, TIFF, EPS, Illustrator (a PDF derivate), Photoshop PSD and other.
«BatchXSLT for InDesign» uses two external image converters to extract images to a format suitable on the Internet: «Ghostscript» and ImageMagick».
This ‚Team‘ is able to convert original high resolution images to JPEG or GIF or any other format recognized by modern browsers. Some samples are shown below:
The exported XML for all output modes always is the same. However, different XSL transforms make the XML data behave different in a browser.
Finish Param:
This parameter, usually “-strip” to remove color profiles from output JPEGs, can be set to empty if any color problems are encountered.
Copying original images:
– Don’t copy original images: No original images will be copied.
– Copy all original images: All original images will be copied into the output folder for further processing.
– Copy PDF,JPG,GIF,PNG only: Web suitable image formats are copied only. In a browser, the original image is shown, when an image in article view pane is clicked.
Page JPEGs at width:
If page JPEGs are exported (standard for flip books), the width of such page images in pixels can be set here. 400x means 400 pixels in width. Always add the ‘x’.
Page PDFs:
When checked, a PDF of each page will be created.
Document PDF:
When checked, a PDF of the whole document will be created.
Spreads (Document PDF):
When checked, double page PDF will be created.
Story splitting: (this option available in CS3 and 4)
Two different versions in different sizes of the same image may be exported. To do this, add a second image size separated by ‚//‘.
Examples:
Image fixed width 150 pixel // second original size:
150x//1.0
The first in original size and the second very large:
1.0//600x
An icon of 70 pixels in width and one scale by 3.0:
70x//3.0
Size of exported images
By default, each original image is exported as a JPEG in its original size. See the field ‚Export Options‘ (marked red) in the screen shot below.
The following units may be given for image sizes:
Scale factor: 1.0 for original size, 0.5 for half in size, 2.0 for double size or any other value as x.x.
Absolute width in pixel: 150x for 150 pixels (note the following ‚x‘). Height automatically calculated.
Absolute height in pixel: x150 for 150 pixels (note the leading ‚x‘). Width automatically calculated.
Image manipulation
Images can be manipulated in fully automated mode. Separated by a semicolon, commands from the ImageMagick command set may be given. As the third element, the keyword ‚nocrop‘ may be given to indicate, to export from the original image and cropped and shown by InDesign.
Examples:
Enhance contrast: 125x;-contrast
Even stronger contrast: 125x;-contrast -contrast
Image 1 lighten by 10% and removed color profiles//
image 2 triple size; more contrast from original: 1.0;-modulate 110 -strip//3.0;-contrast;nocrop
Image with 200 pixel in width; un-manipulated original:
Chained boxes will not be split (unlinked). The whole story in a chain of boxes is assigned to the first box in a chain.
– Split chained story frames per page:
This will split text boxes of articles running over multiple pages in a page per page manner. This let’s readers step through an article in a browser page by page.
Table Options:
Various options for the behaviour of tables in a browser
Box chatching:
Catch Radius: Default is 0 and means, that boxes which are at least touching are catched into the same article. The higher this value (in pixels) is, the boxes are catched which are at least are within this enlarged radius. The check boxes allow to inhibit box catching for certain boxes like those with ‘unassigned’ content or are chained or are empty image or text frames.
CSS Name:
If not set, a CSS matching the document’s styles is generated. If set (like NYT.css), this NYT.css will be created if it does not already exist.
Output Mode:
This does not change XML or HTML output but the way the exported stuff is shown in a browser and how it behaves. Different XSLs are linked.
View Mode:
Enables, disables or lets readers toggle the “Loupe Mode” in browser view.
Export PRO Attributes:
If checked, all elements and attributes available in the PRO version are exported - otherwise, the ‘Standard’ elements are exported. See chapter „Technical Reference“.
This option is effective only in PRO or DEMO version. If you own a license for the ‚Standard‘ version, this option has no effect.
You can use this option in the DEMO version to compare the created XML outputs for ‘Standard’ and ‘PRO’ version.
The background image of this page will not be exported because the image box (not the content) is marked with
*noexp*
as a Script Label.
More Script Label functions:
This box should never catch other boxes:
*nocatch*
But this box does:
*catch*
Boxes marked like this are never catched:
*notcatched*
Exclude these PDFs from full text search:
*nopdftextextract*
Multiple options in Script Labels must be separated with ##
*nocatch*##*notcatched*##...
Rotated Objects
A difficult thing!
Rotated objects always are exported in the unrotated state. A browser is not able to rotate images or text.
If you have to rotate an image for print output, then do this (in your preferred imaging program) in a way, that your needs for print and the unrotated web output conform to your requirements.
Special Characters and Fonts
Compared to a printed document, on the Internet a limited number of fonts is accepted only.
When ever possible, do not use very special fonts with characters having no Unicode-equivalent. Use Unicode-enabled fonts only. For technical documents with math symbols, formulas and very special characters or signs, it is a good idea to create images and to insert, anchor them at the appropriate character position.
No manual line breaks!
For aesthetic reasons people like to manually format text lines.
Such manually inserted line and paragraph breaks are exported too and lead to unwanted line breaks in a browser view: A line break in the middle of a sentence, a single word on a line and so on.
Avoid typing forced line breaks, hyphenations and paragraph returns.
Need a very special export format?
Ask us - we can help!
Master Pages
Elements from master pages are NOT exported!
If you have defined recurring elements (like page heads) on a master page but need to export their content, then you have to explicitly place them on the real document pages.
No Outline Paths!
Fonts embedded as Outlines (Paths) will NOT be exported.
To bypass the problem of inadequate fonts when printing, text often is converted to Outlines and embedded into the document. This mainly is a common praxis when producing ads received from online advertisers.
Outlines, also known as paths, may not be re-translated to browser-readable characters and therefor are lost during the export process and will appear as empty box in a browser!
Document Names
Use distinct names
Distinct, uniquely identifiable document names mainly make sense when data will be transferred into a database, especially to full-text search databases.
Name your documents like this:
A shortcut for the object, for example NYT for “New York Times“ with an added issue date. So: The NYT Newspaper issue on day 14 of September 2008 would have the name:
NYT_20080914.indd
As a separator in the file name always use an underscore.
If you put standalone documents on the Internet, this naming convention is for your understanding and pleasure only.
Style sheets are more than useful
ALWAYS use paragraph or character style sheets to style your text!
Styles contained in a document are exported into an external CSS file (Cascading Style Sheet), and enables us to let the text look as expected in any medium. Like this, it is very simple for a web developer to modify the appearance of text when viewing it online within a browser.
So: Do not set paragraph and character formatting ‘attribute by attribute’ but use styles! ‘Manually’ changed attributes like font family, the size, bold and italic are more difficult to customize for browser views.
The CSS file is exported to the folder ‚XSLCSS‘ within the ‚Export‘ folder structure and receives a name similar to the original InDesign document, ending with the filename extension ‚.css‘.
The style names used in InDesign may be found in this .css file as class names but, after all, they are still recognizable.
These style sheets for the browser may be adapted with any standard text editor to match the display need on the Internet: for sure, the original font family used for InDesign will be replaced with a font like ‘Verdana’ which is a save font for Internet applications. No problem to adjust the background color for special titles like the section bars in this document.
... and what to AVOID
What to DO ...
Publishing eBooks #1
A copy process is enough...
I assume that you will not make document exports just because you like it and for your own pleasure, but, that you want to make available your text and images to the public.
Just copy it!
Viewing exported eBooks on your local machine exactly works the same way on any other medium!
For the Internet:
Copy the folder structure with the exported data on any web server using an FTP upload program. Keep in mind, that the folder „XSLCSS must be reachable relatively to the exported data.
The folder „XSLCSS“ is accessed by the XML and HTML files relatively to their own location. For example: ../../../XSLCSS
After having copied all Files and folders you may set a link on your web site pointing to the HTML eBook file.
Set the upload preferences within your FTP client to ‘BINARY’ transfer to make sure that the data is stored without changes on your web server!
For the local Intranet:
You may copy all data in the same manner as you would transfer it on an Internet server.
For the CD or DVD:
Copy the data (like described before) as a one to one comparable folder structure on a CD or DVD and set a link for your readers.
Publishing eBook Data
Self-Explaining Data Paths
Folder sub-structures are constant on any publishing medium
The following diagram illustrates, how data is stored into a clear and self-explaining folder structure, so it can simply be copied to any type of publishing medium.
The position of the folder ‚XSLCSS‘ is most important! It contains the programs to turn the static plain XML data into an interactive document for Browsers.
These programs are referenced from the XML and HTML file relatively to their own location in the folder structure. The default setting is: „../../../XSLCSS“.
To use this FTP tool, you need a direct connection to your web server.
It may NOT be protected by a Proxy server or Firewall!
Ask your web master!
Full-text Search
Full-text Search
«BatchXSLT for InDesign» eBooks are enabled for a full-text search with a database!
Discussing this topic would go beyond the scope of this guide.
Please, read the manual to integrate the full-text search module. It may be found in the software package at the folder
Perhaps you may need to ask your web master for help.
Sure! If you have any questions then address your e-mail to: ai@aiedv.ch
Publishing eBook Data continued
Publishing eBooks #2
May be triggered from InDesign too...
Not everybody knows how to use FTP transfer programs or has one available.
The software package «BatchXSLT for InDesign» contains a Javascript, which helps to load the exported data on a web server. The script is named „ftpToWebArchive.jsx”.
As you already have made it available to InDesign during the previously completed software installation, you now may find a list item in InDesign’s Scripts Palette.
Call it with a double click and you will see the main FTP Transfer window shown below:
Enter the information for the following fields:
FTP domain Name:
for example: www.aiedv.ch
Data Root Path:
This is the base path to the data folder on the web server like „data/ePaper“ directly below the „FTP Domain Name“.
The data structure below the path given in „Source Data Path“, will be copied 1 to 1 into the „Data Root Path“. The folder hierarchy will be preserved.
If this sounds toot cryptic to you, then you should ask your web master for help. He or she certainly will know the correct path settings.
User Name and Password:
These are the user name and associated password which will enable BatchXSLT to log into the FTP server and to transfer data.
Activate the check box ‚Save these settings‘ for the following calls of this script will not need any further details to start a transfer.
If you have any troubles, please, ask me: ai@aiedv.ch!
This is me, Andreas Imhof, the producer of this whole software package.
After the very first transfer, the folder ‚XSLCSS‘ must be transferred manually!
BatchXSLT automatically ignores folders named ‘XSLCSS’ when doing FTP transfers. The obvious reason for the behavior is, that this folder usually is copied only once and then never must be changed again!
Ask your web master.
Box#4: The image on the left as well as this text box are standalone elements.
If the check box “Chained boxes don’t catch” were not be checked, Then these 6 elements would have been merged into a single article. Except Box#5
Box#2: This box should be catched by the combined bounding box of TITLEbox and Box#1. However, in the export dialog we have checked “Chained boxes don’t catch”
Box#3: This box is not covered by any catching bounding box. But, it is grouped with Box#2!
Catching boxes
If you have a column with several articles (like ‘Notes’), on a colored background box, then define this background box to have ‘unassigned’ content to export all articles separately.
If you want them to be exported as a single article with several sub-articles, then define the background box as text or image.
Box#5: This box does not touch any of the above boxes or bounding boxes and therefore is exported as a standalone article. It would be catched only if the catch radius would be large enough.
TITLEbox: Bounding box and bounding box of bounding boxes...
Box#1: This box is chained with the TITLEbox. Each box which catches an other box builds a new combined rectangular bounding box to catch more boxes into the same article.
The rectangular horizontal bounding box (dotted) of rotated objects catches other objects into a single article.
A rotated box
Rotated objects always are shown unrotated in a browser!
Objects in an article entity are sorted TOP - DOWN if the chain order does not command anything else.
Background boxes with unassingned content
Boxes with ‘unassigned’ content do NOT catch other boxes to an article.
An other non-cathing box is a line.
Special boxes
Changing Readflow
The Chain Order
In this example, the chain order is changed to export a different readflow:
First the lead box, then the title and as the last box the text.
Chaining
Boxes don‘t touch?
The same three boxes which do NOT touch each other.
Chaining boxes will output the text in exactly the same order the boxes are chained.
Chained boxes NEVER are split – the whole text is exported as one article, even if the text goes over multiple pages.
Grouping
Boxes don‘t touch?
The three boxes of this small article do NOT touch each other.
One way to export all three boxes as an article unity is to group them together.
How are boxes grouped to an article entity?
We all know it: An article consists of one or more boxes containing text or images. A special system called “Articles Components Recognition” (ACR) takes care to merge boxes into article unities.
Several properties of boxes and their layout are important to help to build an article from single boxes:
– overlapping
– grouping
– chaining
The boxes of this first example article, which we read as an entity in a Newspaper, are neither overlapping, nor grouped or chained.
Each box is exported as independent text. You can verify this by moving the mouse over each box and click on it.
The other examples on this page use the attributes mentioned above to build and export whole articles: grouping, overlapping and chaining.
The background color helps to see the boundaries of the different boxes. The bounding box is THE keyword for building articles.
Boxes! Nothing but boxes...
Box Catching or Building Articles
Interactive Image with Sound and Movie
Procedure:
1. Place an image and convert it to a button.
2. Drag/drop the needed sound and movie files to the spread.
3. Using the buttons palette define the desired actions to the image:
3.a) Start sound on mouse over
3.b) Start movie on click
Done
To sell
Mini Cooper
Excellent condition!
Feature: Power Pack.
For more information: 555-555-55
Click the image to see this racer in action!
Sounds and Movies
Embedding Sound and Movie
Movies and sound documents can be embedded and played with a mouse click
Sure, sound and movies are nonsense for printed publications. However, they make sense if an online issue should contain additional information for readers (or shoppers).
Examples:
– Training material with enhanced information from sound and movies.
– Possible positions of a chair should be shown in a sales catalog.
– You want to sell your used car like shown in the following „Mini“ add.
If the following error message is shown during licensing procedures:
Sorry! An error occurred Querying the License Server!
configure your Proxy server or Firewall to allow a direct connection with the license server at the domain
http://www.door.epaper-system.com
You already know this domain: It is the domain where you have downloaded this software from.
After a short moment, you should see the same window filled in with your personal license data:
Enter the License Code
Enter the license code which was sent to you into the field “License Code” and press the [ Register ] button.
Transferring a License
You may not copy the licensed software to an other machine without transferring it!
If you need to use the package on a different machine, you first have to transfer the license:
Again, open the licensing window and press the [ Transfer ] button. This software is now reverted to a demo version.
Use the procedure “Enter the License Code” mentioned above to re-enter the license code on an other machine.
Purchase a License
Licenses may be purchased from our Download and Ordering System.
Go to: door.epaper-system.com, and create an account, if you not already have one, to log in.
[ Select ] “BatchXSLT for InDesign XML Transformer” from the products list on the right side.
Press the [ Buy now ] button.
You may choose your preferred payment method: credit cards, PayPal or cash in advance by invoice.
After the monetary transfer is complete, you will receive your license code to the given email address.
Make sure to state a valid email address!!
DEMO Mode
The downloaded software runs in DEMO Mode.
The downloaded, unlicensed «BatchXSLT for InDesign» software is fully functional but – runs in DEMO mode.
DEMO mode means, that many words of the exported text are transposed.
After having purchased and entered the personal license code, all text is exported correctly.
Licenses
Open the Licensing Window
To open the licensing window, click on the demo text below the “BatchXSLT” icon in the top right corner of the «BatchXSLT for InDesign» main window (marked red in the image). The currently empty license information is opened in a new window.
The software licensing procedure is complete and you may close the window.
You now have a fully working copy, which no longer screws up your exported text.
DEBUGGING and Console Messages
The Console window may show what’s going wrong
If anything does not work like expected, then you may set «BatchXSLT for InDesign» into the DEBUG mode.
Do it this way:
Open the file
autostart.jt
with a simple text editor and change the line:
tp_45 = DEBUG=0
to
tp_45 = DEBUG=1
Restart «BatchXSLT».
During the following transforms, you will see a lot of messages in the console window which might help you to find a helpful error message.
Drop shadows are not exported
Paper Background images
A separate master page helps.
You may create a page with a background image, like the cover page in this guide, by creating a special master page with a placed image. Apply this master to the desired page(s). Elements on master pages are not exported and therefor will not capture other boxes.
Links with Script Labels
More sophisticated web links for ads and images
To add interactive meta data to an image or a text box – do this: Activate the “Direct Selection Tool” and then the image or text box. At the „Script Label“ Palette make entries with the syntax: Keyword:Content##
Acceptable keywords are:
title – A help text which is shown in the browser when the mouse is moved over this item
href – The URL which must be called when the mouse is clicked
target – the target window in which the URL should be shown
text – an additional text to show in web display
Entries are separated with two hashes ## from each other. If one single entry is set only, it must end with these two hashes ##. For text boxes, the key words title and text are supported only.
The shown ad (on the cover page of this document) has the following entries in the Script Label Palette:
title:A mouse click takes you to the software producer of «BatchXSLT for InDesign»##href:http://www.aiedv.ch##target:_blank##text:<div style=”width:250px;border:2px solid #aaaaaa;background-color:#f2f2f2;padding:3px;color:#336699;”>This add (an image) has been turned into an active element using script labels.<br/>
Read more in this guide.<br/>
Address your questions with an email to <a href=”mailto:ai@aiedv.ch”>ai@aiedv.ch</a></div>##
The ‚text‘ entry may contain any valid formatting tags and other HTML tags (XHTML compliant notation) like <br/>, <a href=“mailto:ai@aiedv.ch“>ai@aiedv.ch</a>
and so on...
Dieser farbige und formatierte Abschnitt wurde dieser Textbox mittels Schlüsselwort 'text' im Script Label zugefügt und ist nur im Browser sichtbar!
Bei Fragen wenden Sie sich bitte an ai@aiedv.ch
Tips and Tricks
To be able to help you best, the section „Tips and Tricks“ will continuously be updated.
usually works fine by using the plugin ‚Q2ID’ developed by MARKZWARE.COM.
InDesign can not open these newer documents directly. To make an export, you need this additional plugin to convert such documents for InDesign.
Remove unwanted formatting
Manually set Font Sizes
Often, staff uses manually set overrides on set styles – like font size.
The script ‘custom.js’ contains a function named ‘clean_content()’ which lets you clean out unwanted stuff like this. Read the comment: the code to clean ‘font-size:xxpt’ is already contained but commented.
Firefox 3 Browser and display of local XML does not work
Changed security checks in Firefox 3 browser cause that XML flip page eBooks, loaded from a local machine, are shown as continuous text.
To view local XML eBooks as expected, you may do this:
1) type: about:config in the address bar
2) change: security.fileuri.strict_origin_policy to false
The XML flip page eBooks again are shown as navigable eBook.
HTML flip books are NOT affected!
Customizing the Web Site
eBook Web site titles set from document info
Web site headers and titles are set from InDesign’s document info
The window to set the document information may be found in the InDesign main menu:
File -> File Info
The following fields may contain XHTML Tags:
Document Title, Author, CopyRight Info.
This allows, for example, to define additional buttons or a different formatting.
Not to forget: without fail, it must be XHTML!
Otherwise your document can not be exported.
Example for the CopyRight Info:
<a href=“http://www.mydomain.com/manual.pdf“ title=“To the Manual“>Manual</a>
The Basics
When opening the exported HTML file (or XML), the flip page ebook, you see one out of many possible ways to visualize such exported InDesign data.
Like mentioned before several times, the exported base data is plain “all purpose XML”. „All purpose XML“ also means to be able to display it as a flipping pages, interactive eBook.
Frequently, the XML data is used to push article by article into an existing web system.
Others are using the exported XML data, images and PDFs to build their own ePaper or archives system on top of it.
For all of those who actually want to use the functionality of this „standard“ flip page ebook, the following articles discuss the way to customize the web site.
The Export folder structure contains a folder named ‚XSLCSS‘. Within it, the programs and style sheets can be found which turn the base XML data into the flip page ebook with the desired appearance.
The Look and Feel
Web site positioning, background images and colors as well as font sizes and colors are defined in the style sheet file: flipbook.css
Besides ‘real’ style sheets, it also contains so-called „Helper Style Sheets“ defining the display mode of certain elements.
The Functionality
flipbook.js: This Javascript programm takes the sterile data and creates the interactive flip page e-Book. Furthermore it reads and executes the flags in above mentioned „Helper Style Sheets“.
The window shown above is created by a Javascript function. This function can be found in the script file ‚custom.js‘ and is named
‚init_features_popup()‘
The „XSLCSS“ Master Folder
In the program package you may find the so called XSLCSS Master Folder:
The entire content of this folder is copied into the “Export” folder structure during a document export if it does not already exist there.
So, if you make changes in any of the files and whish that all the changes become permanent for all other exports then copy the changed file(s) into the XSLCSS Master Folder.
Example: You have changed the CSS reflecting the document’s styles and want them to be used for any further exports (same Newspaper new issue) then copy it into the Master Folder.
Hint: If such an adjusted CSS file exists under the chosen name within the XSLCSS folder it will never be overwritten!
IMPORTANT! It is strongly recommended to save all changed files in an external storage location. Also, all changes should be documented very well so they can be re-built after an upgrade to a newer software version.
Playing with Options
Certainly you have seen the small arrow in the top/right corner of the browser window. When moving the mouse over it a window will pop up which allows you modify several options. These functions, without doubt, make sense in the demo version only – you may totally disable this window or you might want to make some changes to match your own needs. More on this in the following article.
The look and feel of the flip page web site is controlled by css files.
Book Theme: basic layout
Standard gray:
This term represents the standard CSS ‚flipbook.css‘. Full width of browser window, gray head with page navigation icons on left side.
Standard gray, Thumbs right:
Controlled by ‚fbtempl_std_gray_rpn.css‘
Metallic gray:
Controlled by ‚fbtempl_metal_gray_rpn.css‘
Metallic gray, Thumbs right:
Controlled by ‚fbtempl_metal_gray_rpn.css‘
Switch on or off any of the options and watch the behavior and appearance of the web site.
Clicking the on/off switches fires internal Javascript functions to toggle the option. You may add your own functionality to this popup window.
All CSS files and Javascripts relevant for the web site may be found within the export folder structure ‚XSLCSS‘. Those of the contained css files starting with ‚fbtempl‘ are for the demo only or as examples for you. They safely may be deleted when not used in a production environment.
flipbook.css – Design and Behavior
As mentioned before, ‚flpbook.css‘ controls the look and feels of the web site and also the behavior. Read the comments contained in the file.
Example 1: Controlling a function: The pop up window shown in the image above is switched on or off by the style
.show_features_pop { z-index:1; }
Set the z-index to 0 and the small arrow to open the window is disabled: controlled by Javascript.
Example 2: The layout: Whether the page should be shown in entire width or centered, is defined by the style „fb_body“. As an example, the style „fb_body_center“ shows how to center the page with a fixed width.
Example 3: The size of the page navigation icons is set by the style „page_thumb_img“ and it’s attribute ‚width‘. When changing the icon size, also the width of the navigation bar must be adjusted: „left_nav_td“ and „left_nav_div“ or „right_nav_td“ and „right_nav_div“.
Not to forget: Many other options and functions are available! All files (Cascading Style Sheets and Javascript programs) contained in the folder XSLCSS may adjusted to match specific needs.
CSS and Javascript programming skills needed
Whatever is shown in a Browser’s window, is the work of accessories and programs which are interpreting and treating the exported base XML data and hand over the result to the Browser for display: for example as the shown flipping pages eBook.
Of importance solely is the information contained in the XML data. Whether you want to use this flip page eBook ‘as is’ or XML data for your existing Web system is needed is of no importance. The information contained in the XML data is extensive and fits most further processing.
What information is exported and which options are available to control the output will be discussed in detail in the following „Technical Reference“.
Again: if you have any questions, do not hesitate to contact me.
Andreas Imhof
Advanced Programmer’s Information
Technical References
JobTickets Execution Priority
Three types of JobTickets are processed by „BatchXSLT for InDesign“ with different priorities.
Priority #1
“autostart.jt” is called once only when the transformer is started. this JobTicket is never deleted.
Priority #2
After the Transformer is started the internal JobTickets handler looks for JobTickets named ‘override.jt’, ‘override.jt1’ ... ‘override.jt9’.
The number in the file name extension ‘.jt#’ again is a priority indicator. If a JobTicket named like this is found it is executed immediately. After execution has completed, this ‘override.jt#’ file is deleted.
Priority #3
If no JobTicket with Priority #2 could be found by the JobTickets handler, it then looks for a file named ‘override.que’ – a queue file containing JobTcket names.
This is the current procedure used by the ‘ExportCurrentDocument.jsx’ to command BatchXSLT:
– a JobTicket is written with name like ‘123456789override.jt’ to command BatchXSLT to make the main transform
– a second JobTicket is written with a name like ‘123456789override.jt1’ to command BatchXSLT to transform the exported XML to HTML
– the names ‘123456789override.jt’ and ‘123456789override.jt1’ are written into the queue file ‘override.que’.
The JobTickets handler reads a JobTicket name from ‘override.que’ and and passes the name to the main transformer. After processing is done the JobTicket is deleted and the next name is passed to the main transformer.
Any process can write such JobTickets even when it runs on a different machine in the network but has read/write access to the folder at ~UserHome/BatchXSLT4InDesign/BatchXSLT.
JobTickets
«BatchXSLT for InDesign»’s behavior is controlled by JobTickets.
JobTickets are plain text files located or placed into the communications folder path located at ~UserHome/BatchXSLT4InDesign/BatchXSLT. Such JobTicket files are automatically opened and processed by the main XML transformer engine «BatchXSLT».
The very first JobTicket is loaded when BatchXSLT starts and is named “autostart.jt”. It is located in the applications mainfolder /Applications/BatchXSLT4InDesign/BatchXSLT and is responsible to set the transformer into an initialized state where it can accept further commands.
JobTicket files contain lines of keyword (parameter names) and a value pairs.
Some of the parameters are important to the main engine only and other parameters will control the behavior of the XSL transformation: all parameters starting with “tp_#” - the transformer parameters. All these parameters are passed through all XML files encapsulated within a <call_parameters> element.
Following, a portion of the file “autostart.jt”. You may open and read the complete file with a plain text editor.
In the example below, all comments are removed to shorten the text.
autostart.jt
# comments are removed.
mode = 0
jt_triggerfile =
sourcePathName = ** Drop a .inx file and ...
xslPathName = XSL/INXepaper.xse
outputPathName =
xslVersionName = E
xslVersionDate = 20090615
# Parameters to pass to the XSL Style Sheet.
# The following ‘tp_X’ (tp_1..tp_99) entries ...
# Syntax: tp_X = name=value
# Example: tp_1 = myparameter1=any ... value
tp_3 = outputMode=0
tp_5 = pageJPEGScale=330x
tp_7 = pageJPEGQuality=90
tp_9 = pageJPEGdpi=150
tp_11 = pageJPEGParams=
tp_13 = imageTYPE=1
tp_15 = imageQUALITY=90
tp_17 = imageSCALE=1.0
tp_19 = imageDPI=400,300
tp_21 = imagePARAMS=
tp_23 = catchRadius=0
tp_25 = allBoxesNoCatch=2
tp_27 = chainedBoxesNoCatch=0
...
tp_39 = overwriteCSSfiles=0
tp_41 = wwwLinkStyles=wwwLink
tp_43 = FOLDERINDEXNAME=index.html
tp_45 = DEBUG=0
tp_47 = DEBUGIMAGES=0
tp_49 = documentPDFname=
tp_51 = TABLE_CELLS_WIDTH_PRESERVE=1.0
tp_53 = TABLE_BORDER_COLLAPSE=1
tp_55 = imageCopyToOutput=0
tp_57 = ALLOW_PARACLASS_OVERRIDES=1
tp_59 = fontsizeMinimum=8
tp_61 = magnifyingGlass=10
tp_63 = outputModeCustomXSL=
tp_65 = imageEXCLUDE=excl_;555
tp_67 = imageCROP=1
tp_69 = imagesMORE=
tp_71 = TABLE_AS_BLOCK=0
...
Controlling the Transformer #1
InDesign writes JobTickets
«BatchXSLT for InDesign»’s behavior when exporting a document to XML is controlled by JobTickets created by InDesign scripts.
The main InDesign exporter script “ExportCurrentDocument.jsx” prepares everything needed by BatchXSLT to create the new XML output:
a) a PDF of the whole document
b) a PDF and a JPEG of each page
c) an interchange format file
d) a copy of all images which must be converted to JPEG
When everything is ready, two JobTicket files are written and their name is passed through a jobticket queue file to BatchXSLT. (More about this queue file later in this chapter).
The first JobTicket file “override.jt” below commands the transformer to create an XML file suitable for epaper applications, and to convert an link all images and page previews:
After the above “override.jt” has been processed by BatchXSLT, the second JobTicket “override.jt1” commands to transform the created XML file to plain HTML:
contains par elements controlling the output. parameters are defined in the main start file ‘autostart.jt’ or dynamically in ‘overrideX.jt’ files. JobTicket files are automatically detected and processed by BatchXSLT.
par
the following parameters automatically are passed to the transform XSL by the BatchXSLT transformer engine:
name=”XMLSRC_VERSION”
1.0
name=”XMLSRC_ENCODING”
UTF-8
name=”XMLSRC_DOCTYPE_DECLARATION”
empty for ‘automatic’
name=”SYSTEM_OS_NAME”
Mac OS X or Windows
name=”SYSTEM_VM_VERSION”
Java VM version like: 1.5.0_16
name=”SYSTEM_DEFAULT_CHARSET”
like ‘MacRoman’ or ‘windows-1252’
name=”TRANSFORM_ENGINE”
BatchXSLT 11.02
name=”INPUT_PATH”
main source path
name=”INPUT_SUB_PATH”
subpath below INPUT_PATH
name=”INPUT_NAME”
name of inx file
name=”OUTPUT_PATH”
path to output directory
name=”OUTPUT_NAME”
name of xml file
name=”STYLESHEET_PATH”
path to main xsl ‘INXepeper.xse’
name=”STYLESHEET_NAME”
INXepaper.xse
name=”LOGFILE_WRITE”
1 to write messages into log file
name=”LOGFILE_PATH”
path to such log files
name=”LOGFILE_NAME”
name of a log file
name=”USER_NAME”
the user’s login name
name=”USER_HOME”
the user’s home folder
name=”USER_DIR”
current program’s directory
name=”LOCAL_MACHINE_NAME”
the machine’s name
name=”GS_VERSION”
Ghostscript version string
name=”GS_VERSION_NUM”
Ghostscript version number
name=”GS_PGM_PATH”
path to Ghostscript
name=”GS_ENVIR”
Environment for Ghostscript
name=”IM_VERSION”
ImageMagick version string
name=”IM_VERSION_NUM”
ImageMagick version number
name=”IM_PGM_PATH”
path to ImageMagick
name=”IM_ENVIR”
Environment for ImageMagick
name=”USERLICENSE_TYPE”
license type: 0 = normal, 1 = DEMO
par
the following parameters are passed to the transform XSL using ‘tp_xx’ statements.
Debugging and intermediary files
name=”DEBUG”
1 to show DEBUG messages in console window.
if set, ‘INTERMEDIARY_XML_preserve’ will be set automatically
name=”DEBUGIMAGES”
1 to show messages from image converters only
name=”DEBUG_cssfile”
1 to show debug info for CSS file creation
name=”INTERMEDIARY_XML_only”
1 to create the intermediary XML file only. default = 0
Parameters declared in JobTickets are passed through all transform steps.
Example: if a transform parameter like “tp_7 = pageJPEGQuality=90” is declared in a JobTicket, it can be found in the XML file as “par” element within “the “call_parameters” element:
1 to not to delete the intermediary XML file. default = 0
Output type and final transform
name=”outputMode”
output view mode: 0 = flipbook 1 = as pages ePaper 2 = as article list 3 = as XML tree
all output modes are created from the same main intermediary XML file
name=”outputModeCustomXSL”
name of a custom transform XSL if outputMode > 3
name=”OUTPUT_FEATURES”
0 = export elements and attributes of Standard version only, 2 = in addition export all Elements and attributes of PRO version 2 is effective only in PRO or DEMO version
Page previews
name=”pageJPEGScale”
Scale for page JPEGs or fixed width in pixels. default = 330x
means: 330 pixels in width.
name=”pageJPEGQuality”
Quality of page JPEGs (1..100), default = 90.
the lower this value, the poorer the image quality, the smaller the file size
name=”pageJPEGdpi”
DPI of page JPEGs. default = 150
the lower this value, the poorer the image quality, the smaller the file size
name=”pageJPEGParams”
custom parameters for page JPEG creation (see ImageMagick manual)
1 to indicate, that PDFs always have a TrimBox. default = 0
name=”COLORPROFILE_remove”
color profiles REMOVE command for ImageMagick default = empty to not to remove profiles
name=”COLORPROFILE_TIFF”
Path to color profile to use for specific image types
name=”COLORPROFILE_EPS”
name=”COLORPROFILE_AI”
name=”COLORPROFILE_PSD”
name=”COLORPROFILE_ALL”
name=”COLORPROFILE_OUTPUT”
the output color profile to use default = empty = Utilities/Profiles/ColorMatchRGB.icc
name=”COLORSPACE”
ImageMagik command for output color space. default = empty = -colorspace RGB
name=”MAX_IMAGENAME_LENGTH”
max length of image names, default = 31
CSS and XSL
name=”XSLCSSPath”
relative path or absolute URL to external files like XSL, JavaScripts, CSS and helpers.
default = empty, which wil result in a path like ../../../XSLCSS/’ depending on the nested output folder structure
name=”CSSpath”
path to linked external CSS. default is the content of ‘XSLCSSPath’
name=”CSSname”
name of linked CSS or empty to auto-generate.
if empty, a CSS is generated with a similar name like the document’s name.
to use a (manually) adapted CSS state the name of this CSS.
existing CSS files by default are not overwritten.
name=”CSSnameFinal”
the name of the final linked CSS.
if “CSSname “ was empty, a CSS was generated with a similar name like the document’s name.
name=”overwriteCSSfiles”
1 to always recreate the CSS. 0 = default = don’t overwrite existing CSS
name=”CSSexpanded”
1 to export enhanced CSS infos. all style attributes are exported into a commented section within a CSS declaration of a style.
Box catching and sorting
name=”catchRadius”
the box catch radius. default = 0
Zero means, that all boxes at least touching a neighbour box are captured into the same article.
set to any value like for example 3 to also catch boxes into the same article even if the boxes don’t directly touch each other.
box catching can be turned of by the following ‘allBoxesNoCatch’ parameter.
name=”allBoxesNoCatch”
combined flags for the following 4 catch types 0 = normal 1 = catch for all box types turned off 2 = catch for empty boxes types turned off 4 = catch for image boxes types turned off 8 = catch for chained text boxes types turned off 16= catch for text boxes types turned off
name=”emptyBoxesNoCatch”
1 = empty boxes don’t catch. default = 1
name=”textBoxesNoCatch”
1 = text boxes don’t catch. default = 0
name=”chainedBoxesNoCatch”
1 = chained text boxes don’t catch. default = 0
name=”imageBoxesNoCatch”
1 = image boxes don’t catch. default = 0
name=”groupBoxesToArticles”
1 to create article groups from touching boxes. default = 1
name=”sortBoxesByAreaSize”
1 to sort boxes by surrounding area box. default = 1
list of styles acting as www links. default = ‘wwwLink’
name=”continuedArticleStyles”
style names linking to the next part of an article. default = empty
Tables handling
name=”TABLE_CELLS_WIDTH_PRESERVE”
non empty to resize cells by a factor
name=”TABLE_BORDER_COLLAPSE”
1 = default to collaps cell borders
name=”TABLE_AS_BLOCK”
1 to export tables always on a new line
Text and styles handling
name=”ALLOW_PARACLASS_OVERRIDES”
1 to allow overriding paragraph classes. 0 to suppress overridden styles of classes
name=”preserverControlCharacters”
1 to preserve all control characters. dafault = 0
name=”preconvertTextFlags”
see ‘public.js’ for a description of flags
Flip book look and behaviour
name=”addMissingPages”
1 to add missing pages in a flipbook
name=”showArticleInNewWindow”
1 to open clicked article in new window
name=”magnifyingGlass”
how to show magnifying glass in flip book view: 0 = do not enable, allow normal mouse over only 10 or 1 = enable glass and set default view mode with floater and allow toggle 11 or 111 = enable loupe, set default view mode with loupe and allow toggle 110 = enable glass, set view mode with loupe and DO NOT allow toggle
name=”suppressSiteElements”
addable flags to suppress elements in output html flipbook web site 0 = default to show all flipbook site elements 1 to suppress the whole top head - page navigation 2 to suppress the bottom PDF toolbar 4 to suppress the loading progress 8 to suppress the info message text below pages add each flag with its own char like: ‘148’
name=”suppressExportMouseOvers”
addable flags to suppress export and mouse overs in output html flipbook web site (processed by flipbook.xsl) 1 to completely suppress the mouse over function 2 to suppress all text and the mouse over text 4 to suppress all images and the mouse over images add each flag as it own char like: ‘14’
Layers handling
name=”includeLayers”
1 to include layers info in resulting XML
name=”excludeHiddenLayers”
1 to not to export hidden layers. dafault = 0
Special information
name=”includeMetaData”
1 to include meta data info. dafault = 0
name=”excludeNotes”
1 to not to export Notes. dafault = 0
name=”includeDescription”
1 to include simple output description at end of output
name=”XPLATFORM_NAMES”
0 or blank = do not encode filenames 1 = URI encode (%XX), 2 = default = Xplatform safe URI encode to (xXX)
name=”FOLDERINDEXNAME”
non empty to create an output index.htm file. default = index.htm
name=”INTERNET_AWARE_FONTNAMES”
1 to remove unsafe characters from font names. default = empty
„BatchXSLT for InDesign“ Exported XML Elements and Attributes
Complete list of elements and attributes exported by BatchXSLT for InDesign. All units (where not marked) are in PostScript (72 pts/inch). ‘PRO’ marked elements/attributes are for PRO version only.
The PRO version exports more elements and attributes than the ‘Standard’ version.
To export and publish your documents as a flip page eBook (including full-text search) you need the ‘Standard’ version only!
empty box image box text box chained text box line pusg button
cont
content type of box: ‘unas’ = unassigned content (including line boxes) ‘empty’ = empty image or text box ‘text’ = a text box ‘anchored_text’ = an anchored text box ‘chained_text’ = a chained text box ‘imag’ = an image box ‘anchored_imag’ = an anchored image box
Self
box id
spread
spread number
page_sequence
physical page number
page_name
page section number
groupid
group box id if box is in a group
anchorid
anchor id. For anchored box non empty
angle
angle if box is rotated
coords
html coords rounded pixels: left,top,right,bottom
bbox
bounding box as doubles: left,top,right,bottom
shape
box shape points scaled/rounded to size of page jpeg