Answers.Body: <p>The ePub file does not contain any information about the InDesign pagination -- that information is all left behind when the ePub file is generated. So your only possible way to do that is inside InDesign.</p>
  
  <p>Inside InDesign it will be either point-click-clic-click ...a few thousand times or you script it with an additional tool like <a href="http://www.autohotkey.com/" rel="nofollow">AutoHotkey</a> or <a href="https://www.autoitscript.com/" rel="nofollow">AutoIt</a> that can open, select the first 10 pages and then save the selection to ePub and re-do-it in the next file...</p>
  
  <p>If your files have a lot of consistency -- almost the same structure -- and you can live with separating the first chapter, for example, then you can open them up (unzip), and edit with "sed" or "awk" to have a smaller set containing only a certain specific part. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-29T03:13:24.633Z
Answers.LastActivityDate: 2014-12-30T19:11:44.547Z
Answers.LastEditDate: 2014-12-30T19:11:44.547Z
Answers.UserDisplayName: user3076
Body: <p>I have ~1500 generated <code>.epub</code> files and their indesign files</p>
  
  <p>I need a script or program to generate previews for these EPUBs. 
  Preview could be in jpeg or epub format.</p>
  
  <p>By preview I mean first 10 pages of the book as indicated by indesign's pagination system.<br>
  I use both Mac and Windows machines,</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-03-07T14:22:47.053Z
Comments.Text: What do you consider a preview (first N pages?). What platform/OS are you working on?
Comments.UserDisplayName: Anthon
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-03-07T22:06:05.040Z
Comments.Text: Is there any consistency in the formatting of the InDesign files or the epubs? If they're done with a template, it should be fairly easy to put together a script that would grab the first n sections (eg, cover, copyright page, introduction, chapter 1). If the files aren't consistent or well-tagged, then it'll be trickier.
Comments.UserDisplayName: Tom
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-03-11T12:05:43.073Z
Comments.Text: Do you have some indication (based on CSS, or the indesign files) of where page 10 ends? A normal EPUB page contents varies wildly and depends on the resolution of the device it is viewed upon, the font size, margins etc.
Comments.UserDisplayName: Anthon
Tags: <epub><indesign>
Title: Generating Previews
UserDisplayName: Talha Büyükakkaşlar
ThreadText: # Generating Previews
  
  (Asked by: username_0 on 2014-03-07)
  
  I have ~1500 generated `.epub` files and their indesign files
  
  I need a script or program to generate previews for these EPUBs.
  Preview could be in jpeg or epub format.
  
  By preview I mean first 10 pages of the book as indicated by indesign's pagination system.  
  I use both Mac and Windows machines,
  
  **Tags:** epub, indesign
  
  > **Comments:**
  > **username_1**: What do you consider a preview (first N pages?). What platform/OS are you working on?  
  > **username_2**: Is there any consistency in the formatting of the InDesign files or the epubs? If they're done with a template, it should be fairly easy to put together a script that would grab the first n sections (eg, cover, copyright page, introduction, chapter 1). If the files aren't consistent or well-tagged, then it'll be trickier.  
  > **username_1**: Do you have some indication (based on CSS, or the indesign files) of where page 10 ends? A normal EPUB page contents varies wildly and depends on the resolution of the device it is viewed upon, the font size, margins etc.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2014-12-29. Score: 1
  
  The ePub file does not contain any information about the InDesign pagination -- that information is all left behind when the ePub file is generated. So your only possible way to do that is inside InDesign.
  
  Inside InDesign it will be either point-click-clic-click ...a few thousand times or you script it with an additional tool like [AutoHotkey](http://www.autohotkey.com/) or [AutoIt](https://www.autoitscript.com/) that can open, select the first 10 pages and then save the selection to ePub and re-do-it in the next file...
  
  If your files have a lot of consistency -- almost the same structure -- and you can live with separating the first chapter, for example, then you can open them up (unzip), and edit with "sed" or "awk" to have a smaller set containing only a certain specific part.
  
  
  ---
  
  