Sunday, October 31, 2010

BatchXSLT for InDesign CS5 is here

It was a long, stony way!
The «BatchXSLT for InDesign V5» exporter to convert InDesign CS5 documents, finally, is ready at www.aiedv.ch.
Now, we can provide exporters for InDesign CS5, CS4, CS3, CS2, all producing the same type of XML, HTML and flip page eBooks. All software (for Windows and OSX) can be downloaded, installed and tested for 30 days in DEMO mode. NO RISK!
The product sheet, software download and purchase: here

Wednesday, January 27, 2010

PROGRAMMING: Hyperlinks in new or same window

Q: We have publications with active hyperlinks pointing to our own web site and others pointing external companies' web sites. We want that 'external' links open in a new window and the ones pointing to us should open in the same window. Can we do this?

A: Yes, you can.
Open the Javascript file 'custom.js' in a plain text editor and locate the lines:
// ******* re-target links
//         check, if links not pointing to this host address should be openened in new window (_target="_blank")
var open_url_in_new_window = ""; // set to someting like ".mydomain.com"
Set the variable 'open_url_in_new_window' to your own domain name.
All links NOT containing the given string will be opened in a new window.
Yes, kind of confusing but thats how it is :)

All user adjustable programs can be found in the folder 'XSLCSS' within the 'Export folder structure.
The 'XSLCSS' master folder is in the installed software package with the folder 'BatchXSLT4InDesign/BatchXSLT/XSL'.

Friday, January 22, 2010

CSS: How BatchXSLT for InDesign creates and handles CSS

"BatchXSLT for InDesign" creates a CSS (Cascading Style Sheet) file for each exported document representing the document's internal paragraph, character and table styles. Such CSS files may be found in the XSLCSS folder within the 'Export' folder structure. CSS file names are ending with '.css'.

CASE #1: If NO special CSS file name is stated in the export dialog, a css file is created with the InDesign document's name.
Example: If an InDesign document named "01_20100122_Frontpage.indd" is exported, a CSS file named "01_20100122_Frontpage.css" is created.

CASE #2: If a special CSS file name is stated in the export dialog, a css file with the indicated name is created.
Example: No matter what name your document has: if a css name is stated like "NYT.css", a css with this name will be created.

IMPORTANT: A css file is created only, and really ONLY, if it does not already exist.
Existing CSS files are NEVER overwritten!

The real world example:
The exported NYT daily Newspaper should always reference the same external css file "NYT.css".
Proceed like this:
1. At the export dialog state the CSS name "NYT.css" and it will be created.
2. Edit this css to match the web site's needs (change font names and sizes...).
3. Make an export of any other "NYT document" and it will reference your modified existing NYT.css file.

BUGFIX: Page PDFs and JPEGs are (partially) empty

BUG: Few customers have reported that the generated page PDFs and JPEGs are partially or totally empty or InDesign crashes during a document export using "BatchXSLT for InDesign".

SOLUTION: Until today, this problem was reported for Mac Power PC machines G5 with a total of physical memory of 2GB or less and huge InDesign documents with lots of PDF adds.
This is not a "BatchXSLT for InDesign" bug but seems to be a plain InDesign memory problem.
One customer has reported that he could eliminate this problem by upgrading his G5 PPC machine to 4 GB ram.

Try to manually (from the menu) create a PDF export, either for the whole document or single pages only. If InDesign crashes, a PDF might be contained (or other image) which can not be handled correctly by InDesign when exporting to document PDF.
One customer has reported, that he could create a document PDF for a special document only on an OSX Intel machine with 10 GB ram.

So, lots of RAM seems to be a core solution for all InDesign crashes.
"Running on a fast Intel Mac Pro with 8 GB of RAM is awesome. About 500% faster, and no problems." - said djb

Tuesday, January 12, 2010

PROGRAMMING: Skills to adjust BatchXSLT for InDesign?

Skills needed to be able to adjust the output of BatchXSLT for InDesign:

You don't have any programming skills? EASY! This does not seem to be your job, you have to do more important things like almost all others on this world!
No problem: ask your web guy or ask me!

IF you are a programmer or you are a member of the web team:
Depending on what you want to adjust you need programming skills in different areas.

This is a list in ascending order of level of difficulty:

To adjust the look and feel of the generated HTML web site:
- Cascading Style Sheets (CSS)

To adjust the behavior of the generated HTML web site:
- HTML
- Javascript

To modify the output data:
- XML
- XSLT (XML transformation)

And, if you want to add core functions:
- Java
- Software Packaging (plist)

Well - again: ask me if you have any concern or troubles!

FAQ: Browser shows squares instead of text!

Q: After exporting our documents with BatchXSLT for InDesign, the browser shows empty squares instead of the real text. What is wrong?

A: This is not a bug of BatchXSLT for InDesign! It happens when documents are created using non-Unicode aware fonts. Such as fonts back from the 1990s, fonts created especially for you, fonts containing a company's logos and glyphs.
Also some very popular (but old) Math fonts are not Unicode aware.

SOLUTION #1: Ask your font dealer for a newer "Unicode-aware" version.

SOLUTION #2: Ask us on how to create a font translation table.

SOLUTION #3: If a character/glyph is not contained in the Unicode UTF-8 set (check with www.unicode.org), you have to create an image and anchor it into the text.

HINT: Expensive dedicated XML output formats!

More and more, printers are asked by their customers to provide the content of print products as XML or HTML. Usually requested, besides the printed version, as an additional free service!

Printers now are in the difficult situation to fulfill the request or to loose the print job.

To achieve the desired result can be an easy one day job or can keep someone busy for weeks or even months.

Human-resource allocation always means MONEY! So, printers should be willing to allocate some money, to start a small amount only, to at least find out 'if' and 'how' the request could be fulfilled.

Ask an internal or external expert for help before saying: "Too expensive anyway!"
Asking a first question by email usually is free of charge!
What can be lost? What can be won?

FAQ: Articles spanning several pages

Q: We are exporting technical books using BatchXSLT for InDesign. Most articles are chained over multiple pages. Now the problem: The text is exported as a single block and all images are AFTER this text block. Any solution?

A: By default, BatchXSLT for InDesign does not split/break any text chains, text is exported as a whole even when running over multiple pages.

Solution #1: When calling the main export 'ExportCurrentDocument.jsx', check the radio button 'Split chained story frames per page'. This will split up the article's text at the page boundary and the images now will be aside the page's text.

Solution #2: If you need to have the article's text as an entity, then anchor the images at the proper text location.

FAQ: Adjusting software contained in BatchXSLT for InDesign: What am I allowed to change?

Q: I feel like adjusting some look and feel and also some functions in the flip book output created by BatchXSLT for InDesign. What files am I allowed to change without breaking the license agreement?

A: Behavior and look and feel of a flip page eBook in a Browser is controlled by Javascripts, XSL, CSS and images contained in the folder 'XSLCSS' within the Export folder structure. You may change anything contained in this XSLCSS folder - several thousand lines of code.

You are allowed to change ANY file which is human readable by using a plain text editor or an imaging tool. Read and do not delete any copy right or license notes.

You are not allowed to decompile/decode the main software contained in BatchXSLT.app and the file XSL/INXepaper.xse.

DO NOT FORGET to keep detailed records on what you have changed! A next version of the "BatchXSLT for InDesign" package will not contain your adjustments. So, you should be able to reproduce all changes when you switch to a new package version.

FAQ: My own dedicated output data in one step

Q: I need my own dedicated transform to deliver data to an external company and already have created the XSLT. Can I simplyfy the whole export operation (base export and my transform) by "chaining" my XSLT to BatchXSLT for InDesign's standard export?

A: Yes, you can.
SOLUTION #1:
a) Put your created XSL style sheet into BatchXSLT's MASTER XSLCSS folder. You can find it in the Applications path BatchXSLT4InDesign/BatchXSLT/XSL/XSLCSS.

b) Rename or clear your current 'Export' folder structure - or at least rename or delete the contained XSLCSS folder for the new folder content mentioned in a) can be copied.

c) Now start the InDesign main export script 'ExportCurrentDocument.jsx' and you should see your XSLT in the main dialog within the popup 'Output Mode'. Select it and start the export.

Instead of creating the HTML flip book from the standard XML output, BatchXSLT for InDesign now will process your XSLT and create your dedicated output.

SOLUTION #2:
Edit the Javascript 'ExportCurrentDocument.jsx' and chain as many dedicated outputs as you need.
I will discuss this 2nd solution in detail when someone out there needs help on this.

Monday, January 11, 2010

FAQ: HELP! on creating XML and/or HTML

Q: HELP! The web guys of my customer ask me to send them XML (or HTML) of their publications. I do not have any idea what they are asking for! Can you help?

A: Sure! Send me an email (view my profile for the email address) and describe your needs (the needs of your customer) as close as possible.
If you have a description of 'what your customer wants' and what YOU have to start with (an InDesign document) include it in the eMail. A first view into your problems is usually free of charge. Just asking ALWAYS is free of charge!
Together we'll find a solution!

HINT: HTML with embedded inline styles only

In almost all cases when exporting documents to HTML, an external and linked Cascading Style Sheete ( CSS ) is required to be able to adjust fonts and formatting for web display. This is done automatically by BatchXSLT for InDesign as default behavior.

In very rare cases however, one might look for HTML which is formatted with inline styles only - no class names - no external CSS.

We have heard, that there are some PDF generators out there which need such inline styles to generate a PDF for example of an article.

How to achieve this?
Before starting the export from InDesign all styles must be removed from the document. This easily can be done from the character and paragraph styles palette. Select all styles, click "Trash" and check the box to 'preserve formatting' when asked.
BatchXSLT for InDesign now generates the desired output using inline styles only.

HINT: Styling documents for dedicated XML

Have you ever been challenged by your customer to create a special XML format from his documents? Have you tried to dig into InDesign's "Styles to XML mapping"? Tedious!

Try this way:
Ask your customer for an example XML document AND the technical XML reference OR a complete example containing ALL possible XML elements.
Make a list of all XML elements that may appear by opening the example document with a plain text editor. Collect all the names enclosed within < and > and comment the meaning of this name (element).

If your list now contains 12 element names you also need 12 different styles in InDesign to mark the text. Style sheets are the one and only way in InDesign to also mark the MEANING (not only the look and feel) of a text part.

Let's proceed with an example (my favorite one - a fraction of a DocBook XML):
Assume you have to deliver this XML output:
<citation>
    <authorname type="first">Andreas</authorname>
    <authorname type="last">Imhof</authorname>
    <year>2010</year>
    <title>Amazing XML</title>
    <publicationname>My Blog</publicationname>
</citation>
5 different XML elements within <citation> containing text information. Each text information in the InDesign document must be marked with its own style (paragraph or character style) to be able to identify the meaning of the text and to map it into the XML element.

Now complete your XML elements list by writing the style name besides the element name. Example:
<authorname type="last"> = authName
Means: The content marked with character style 'authName' goes into XML element <authorname type="last">.
<authorname type="first"> = authFirstName
Means: The content marked with character style 'authFirstName' goes into XML element <authorname type="first">.
... and so on... the hard part is done.

Create your InDesign document and strictly mark the textual content with these styles from the list.

Two ways to get the content out of InDesign:
#1. Use InDesign's built in "Styles to XML" tagging feature and export the document.

It may happen, that InDesign's build in XML export feature does not fulfill all your needs. In that case:
#2. use a third party document exporter to bring the content out of InDesign.
If you use BatchXSLT for InDesign as the document exporter, you do not need the "Styles to XML" tagging mentioned in way #1. The dedicated XML format can be created by adding a transform after the export is done.

HINT: Print and web document in a single step

InDesign documents to print and to use its content for web purposes can be done with almost no additional work.
Compositors should follow this abbreviated list of rules:
a) Use character and paragraph styles and properly mark titles, leads, text and image captions.
b) If an article consists of several boxes like title, caption and image, group them together for they can be recognized as an article entity.
c) Do not let overlap boxes from one article to another article or they will be merged into one article.
d) If an image or marginalia must appear at a certain text position then anchor this box in the main text.

Now use BatchXSLT for InDesign to get the content out of InDesign and hand over the created output to your web team. They can handle the created XML.
It is not a compositors job to map styles to XML tags to create the very special XML format requested by the web guys.

FAQ: Testing a new version

Q: I need to test a new version of BatchXSLT for InDesign but I do not want to trash or overwrite my current production installation. What is the best procedure?

A:
First: Rename all folders of the current software installation:
a) Rename the main application: in the Applications folder rename the folder "BatchXSLT4InDesign" to "OLDBatchXSLT4InDesign".
b) Rename InDesign scripts: in InDesign's applications folder rename the folder "BatchXSLT4InDesign Scripts" to "OLDBatchXSLT4InDesign Scripts" (contained in the Scripts Panel folder).
c) Rename the communications folder: in your HOME folder rename the folder "BatchXSLT4InDesign" to "OLDBatchXSLT4InDesign".
d) Rename the current export folder structure: in your HOME folder rename the folder "Export" to "OLDExport".

Second: Install the new version.
After installation is done, you have the new program version in the folders mentioned above as items a) and b).
After having run an export, the two folders mentioned above c) and d) were created automatically.

Third: After having completed your tests, delete all new folders mentioned above a) - d) and rename back your old folders "OLD...." and your original installation is ready again.

FAQ: XML template?

Q: Do I have to create a special XML template to be able to export document content using BatchXSLT for InDesign?

A: No. BatchXSLT for InDesign exports detailed style information and a CSS (and much more). This enables the web guys to create a transform to map styles to dedicated XML elements - if they want...
So, XML mapping should be done by web folks. Compositors should be freed from the challenge to map style names to XML tags. The compositor's job simply is to bring content out of InDesign. All further processing is the web team's job.

FAQ: XML output format

Q: How does the XML output created by BatchXSLT for InDesign look like?

A: As an abbreviated summary, the main structure is:
<indd_document>
    <page page_sequence="1">
        <article id="1">
            the rich tagged article content....
        </article>
    </page>
    .... more page elements
    <page page_sequence="88">
        <article id="345">
            the rich tagged article content....
        </article>
    </page>
</indd_document>
The detailed description of elements and attributes is contained in the manual's reference section (starting around page 33): http://www.manuals.epaper-system.com/get_manual.php?f=BatchXSLT4Ind_HOWTO_en_htm

Sunday, January 10, 2010

FAQ: Article by article XML files

Q: Our web departement asks us to deliver the content of our Newspaper in XML files - each article in its own XML file. Can BatchXSLT for InDesign provide this?

A: No. A document always is exported in one single XML file. But there is a simple way to get the same effect: Articles are enclosed in <article> elements. Your web guys simply can access each article using this element.

FAQ: iPhone and similar devices

Q: Is there a way to use BatchXSLT for InDesign's export to publish Newspapers to iPhone users?

A: Sure. Today's mobile devices have a built in standard web browser and can display such eBooks. However, do not expect readers to read your publication as a flip page eBook on such a small screen (connection speed usually is too low anyway)!
Instead create a dedicated web site for mobile devices. It must be trimmed to fit on small screens. It is not a big deal to extract articles from the exported XML and to build an easy to navigate index for such mobi devices.

Saturday, January 09, 2010

FAQ: eBook Reader

Q: Can the eBook exported by BatchXSLT for InDesign also be used for the Sony eBook Reader?

A: NO - not directly. eBook readers (like Sony or Adobe's epup) need their own special output format. The screen of eBook readers is too small to let the user navigate through a flip page eBook. By the way - eBook readers text browsersers are 'kind of limited' and can not provide the functionality to navigate flip page eBooks using Javascript. They are designed to display text and some images with a page- or chapter navigation.
However, if you can not use Adobe's built in epup export you can write an own transform to build the output data format for your eBook reader.

FAQ: Marginalia position

Q: We have books with marginalia. However, the marginalia text exported by BatchXSLT for InDesign appears at top or bottom of the main text.

A: Marginalia should vertically flow with the main text. To achieve this, anchor the marginalia box at the proper text position and give it the desired position offset. Anchored boxes behave like a single character and therefore their text content is output at the anchor position. Use the same anchoring procedure for images which must be at a certain text position.