Html idml viewer

I am trying to implement C # idml to html converter. I managed to create one flat html file similar to the one that was created during the indesign export.

What I would like to do is create an html that will be as similar as possible to an indesign view, for example, viewing an html idml. To do this, I need to find text that can fit into a text frame, I can extract text content, but I can not find a way to divide this content into frames / pages.

Is there any way to achieve this?

+4
source share
2 answers

Just extracting text from the story is not enough. The way text is placed is controlled by TextFrames in Spread documents. Each TextFrame has a ParentStory attribute showing which story it loads the text with, and each frame has dimensions that define the layout. For unused text frames (i.e. One story <> one frame) is all you need.

For flow frames, you need to use the PreviousTextFrame and NextTextFrame to create the chain. There is nothing in IDML to tell you how much text fits into each frame in a chain with a chain, you need to do the calculation yourself based on the calculated text sizes (or using a trial version and brute force error).

You can find the spreads in the main designmap.xml file:

 <idPkg:Spread src="Spreads/Spread_udd.xml" /> 

And the spread will contain one or more TextFrame nodes:

 <Spread Self="udd" ...> <TextFrame Self="uf7" ParentStory="ue5" PreviousTextFrame="n" NextTextFrame="n" ContentType="TextType">...</> ... </Spread> 

Which, in turn, will contact a specific story:

 <Story Self="ue5" AppliedTOCStyle="n" TrackChanges="false" StoryTitle="$ID/" AppliedNamedGrid="n">...</> 

(In this example, frames are not streaming, so the values ​​are 'n' .

All this in the IDML documentation, which you can find in other InDesign developer docs: http://www.adobe.com/devnet/indesign/documentation.html

+5
source

Microsoft and Adobe have proposed a new module for css called "Regions", which allows you to stream tekst into multiple containers. Keep in mind that you can never create an html page that looks exactly like an Indesign document.

http://www.w3.org/TR/css3-regions/

So far, only IE10 and webkit support it during the night: http://caniuse.com/#feat=css-regions

+2
source

Source: https://habr.com/ru/post/1443461/


All Articles