Exporting to filename from paragraph style

I have a 80 page indesign file.  I would like to export to single page pdfs, with filenames based off a paragraph style on each page.
Is this possible?  I have no background or experience with scripting.  Any help would be much appreciated.
Thanks
Derek

The link you sent me was about Applescript. But I looked it up in the Javascript reference and this seems to work.
You need to make three changes:
Line 6: Change test to the name of your paragraph style.
Line 15: Change [Smallest File Size] to the export preference you like to use, so you get resolution, bleed etc correct.
Line 19: Change export path, I exported mine to my root, my harddrive, if you are on a pc "/c/cookbook/" + pdf_name + ".pdf" might be a better path.
for(var p = 0; p < app.documents[0].pages.length; p++) {
     var frames = app.documents[0].pages[p].textFrames;
     var pdf_name = null;
     for(var i = 0; i < frames.length; i++) {
          if(frames[i].paragraphs[0].appliedParagraphStyle.name == 'test') {
               pdf_name = frames[i].paragraphs[0].contents;
               break;
     if(pdf_name != null) {
          app.pdfExportPreferences.pageRange = app.documents[0].pages[p].name;
          var export_preset = app.pdfExportPresets.item("[Smallest File Size]");
          app.documents[0].exportFile(
               ExportFormat.pdfType,
               File("/" + pdf_name + ".pdf"),
               false,
               export_preset

Similar Messages

  • Export to Fixed_Layout EPUB: Paragraph Styles not exporting to CSS class tags

    Hi,
    As it says, my Paragraph Styles aren't exporting to CSS class tags with a Fixed Layout EPUB.
    ...But Object Styles are working ok.
    Seems to work ok when exporting to HTML or Reflowable EPUB... just not Fixed Layout.
    Any ideas?
    Cheers
    Forgot to say: Mac OSX 10.8(?) Adobe Indesign CC 2014

    Hi... it was 10.0.7
    Updated to 10.1 & wahoo - it works now.
    Will mark your answer correct as it prompted me to update.
    Cheers

  • CS4 creating hyperlinks in TOC from paragraph style sheet

    Hi all
    Does anyone know if it's possible for a script to find all instances of text in a named paragraph style  and then link each instance to the corresponding entry in a modified TOC?
    The workflow is for a 800-item catalogue created in CS4. At the moment, the title for each entry is set in a dedicated paragraph style; once all entries are signed off, I generate a TOC listing all the items. All very straightforward.
    My client now wants an interactive PDF so that clicking on any item in the TOC will take him automatically to the relevant page in the catalogue. I want to avoid having to generate those hyperlinks manually… I know very little about scripting but I do know this is exactly the sort of thing that should be possible:
    – find first instance of text in Para Style 1
    – create hyperlink named with that text
    – link this to corresponding text in Para Style 2
    – repeat for all instances of text in Para Style 1.
    But I also know that the hyperlink/cross-reference function can be a little counter-intuitive and I don't know whether I'm asking for the moon on a stick.
    Thanks!

    There's an excellent script* called LiveTOC which does exactly what you're asking for. It allows you to turn all your TOC entries into hyperlinks for PDF export.
    Check it out: http://www.freelancebookdesign.com/scripts/live-toc
    Ariel
    * which happens to have been written by me

  • [JS IDCS5] Create tags from paragraph styles

    Hello,
    I would like to iterating through al the paragraph styles within a document to create there tags from. The tags should have the same name as the paragraph styles. Is that possible and how?
    Regards, Sjoerd

    Hi Phil,
    Absolute beginer here. The script creates tags for the styles outside groups, but for some reason it doesn't create the tags out of the Paragraph Styles in folders.
    I enabled the line below and tried to change the "myPStyle"  for "myAllPStyle" in the following lines, but still nothing. Gives error when reaches the line myDoc.changeText();
    Any hint?
    var myAllPStyle = myDoc.allParagraphStyles; //if you want this enable a line all the folder paragraph styles also consider
    for (i=2; i<myAllPStyle.length; i++){
         var myAllPStyleName = myAllPStyle[i];
         //alert(myPStyleName.name);
         try{
              var myXml = myDoc.xmlTags.add(String(myAllPStyleName.name));
              }catch(e){}
         app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
         app.findTextPreferences.appliedParagraphStyle = myAllPStyleName;
         app.changeTextPreferences.markupTag=myAllPStyle[i].name;
         myDoc.changeText();
         app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    Also, how can I make it Map the tags with the PStyles by name after with the script?
    Thanks so much
    Hector

  • Find start text index from paragraph style?

    hi,
        In my project,i have paragraph style name,i need to find out that paragraph start and end index positon ?
    pls,anyone help me?
    thanks,
    screen410099

    Hi Saud,
    Try the below script.
    var activeDoc = app.activeDocument;
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = "XXXX";//Give your paragraph Style name here
    var foundRefList = activeDoc.findGrep();
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    var myCount =0;
    var foundListLength = foundRefList.length;
    for (var j = 0; j<foundListLength; j++){
        var myParas = foundRefList[j].paragraphs;
        var myParaLength = myParas.length;
        for (var i = 0; i<myParaLength; i++){
            var myText  = myParas[i].texts[0];
            app.select(myText);
            var myId = j+"_"+(i+1);
            var myHyperlinkCitDestination = activeDoc.hyperlinkTextDestinations.add(myText, {name: myId});
            myCount++;
        app.select(NothingEnum.nothing);
        alert("Process Completed\n"+myCount+" destinations added");
    p.s: I've not tested it, please check this at your end and let me know.
    ~Green4ever

  • From paragraph Style to "New Hyperlink Destination"

    Dear InDesign Experts
    Please help me to find a way or Script to add all headings of specific paragraph style to "New Hyperlink Destination....(Text Anchor)"
    and ... is there any automation for such a task?
    Thank you in advance

    Hi Saud,
    Try the below script.
    var activeDoc = app.activeDocument;
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = "XXXX";//Give your paragraph Style name here
    var foundRefList = activeDoc.findGrep();
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    var myCount =0;
    var foundListLength = foundRefList.length;
    for (var j = 0; j<foundListLength; j++){
        var myParas = foundRefList[j].paragraphs;
        var myParaLength = myParas.length;
        for (var i = 0; i<myParaLength; i++){
            var myText  = myParas[i].texts[0];
            app.select(myText);
            var myId = j+"_"+(i+1);
            var myHyperlinkCitDestination = activeDoc.hyperlinkTextDestinations.add(myText, {name: myId});
            myCount++;
        app.select(NothingEnum.nothing);
        alert("Process Completed\n"+myCount+" destinations added");
    p.s: I've not tested it, please check this at your end and let me know.
    ~Green4ever

  • How to delte empty Style Group from paragraph style palette

    Hi Guys,
    I want to delete my empty paragraphStyleGroups folder that are Style Group 1and Style Group 3 (see pic) from my palette.
    I need a js code for this task.
    I have created script but it deletes all the Style group from my panel.
    Here is the script:
    myDoc=app.activeDocument;
    myStyleGroup=myDoc.paragraphStyleGroups;
    for(p=0;p<myStyleGroup.length;p++)
    myStyleGroup[p].remove();
    Please suggest!
    Chang

    You are awesome man.
    It is working as I need. Thanks again Kasyan.
    Regards,
    Chang

  • How to find paragraphs by using paragraph style name?

        How to get the Paragraph style UIDRef from paragraph style name.
    To find the paragraphs using Paragraph style i want UIDRef of paragraph style.Can some one help me..,

    IDocument *doc = GetExecutionContextSession()->GetActiveContext()->GetContextDocument();
    UIDRef ws = doc->GetDocWorkSpace();
    InterfacePtr<IStyleGroupManager> paraStyleNameTable(ws, IID_IPARASTYLEGROUPMANAGER);
    PMString styleName("someStyle");
    UID paraStyleUID = paraStyleNameTable->FindByName(styleName);
    if(paraStyleUID != kInvalidUID)
         //We found the style
         UIDRef styleRef(doc->GetDataBase(), paraStyleUID);

  • Exporting text only from specific paragraph style

    Hi,
    Is there a way to export text from Indesign to txt or preferably Excel from specific paragraph style ? I am trying to export only item numbers and prices to excel spread sheet so I can compare against original excel spreadsheet.
    Thank you !

    Not built in, no. But you could do this:
    Create a new paragraph style called "Delete Me". In the paragraph styles
    palette, select all the paragraph styles you're NOT interested in.
    Delete them in one go, and replace them with "Delete Me."
    Now, in the find/replace box, search for "Delete Me" and replace with
    nothing. This will cause all the paragraphs that have the "Delete Me"
    style to be deleted.
    Now what remains in your document is only the text that you're
    interested in.
    Ariel

  • Exporting Paragraph Styles as CSS in AICS5

    Why can't paragraph style be exported in CSS3, but character styles can? 
    I have a number of paragraph styles that I'd like to export.  I'm looking for a fast way to export all the paragraph styles, rather than having to convert them to character styles.  Any ideas?
    Working on a Mac, CS5 v 15.0.2 of AI with the HTML5/CSS3 pack installed. 
    Christian

    thephillykid wrote:
    > exporting mulit-pages as css/image in one step?
    >
    > It does not allow me to click off the current page
    option when exporting on of
    > my many pages. So I seem to have to export every page
    individually, thus
    > creating a .css doc for each html page...??
    >
    > Furthermore.. ON my master template I have Divs
    assigned, but they are not
    > appearing in subsequent pages created from the master
    when exported..???
    >
    >
    >
    > any help would be great. thanks
    >
    Fireworks does not allow multi-page CSS export, the thought
    being (I
    believe) that you would create the design for your main page,
    export it
    as CSS and images, edit CSS and HTML as needed in DW (and it
    will be
    needed) and then generate your site within DW or your
    preferred web
    design application.
    Take a few minutes to read these articles on the Adobe Dev
    Center:
    http://www.adobe.com/devnet/fireworks/articles/export_css_images.html
    http://www.adobe.com/devnet/fireworks/articles/standards_compliant_design.html
    HTH
    Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    http://www.communityMX.com/
    .:Adobe Community Expert for Fireworks:.
    http://www.adobe.com/communities/experts/members/206.html

  • How do I prevent unwanted paragraph style overrides when exporting an epub

    I am having trouble controlling the size of a  logo in an e-pub. Actually, it's only a problem with Amazon's Kindle which seems to insist on enlarging the image to the full screen width. So, I need a robust command in my CSS to override Kindle's preference. Seems easy. I placed the logo into my In Design layout in a picture box with the object style "frontmatterlogo" which should export into a div of the same name. Which it does. So far so good. However, In Design insists on creating a paragraph style override (see bold in the code below) which disregards the  frontmatterlogo settings I've written in to my CSS in favour of it's own image settings which correspond to the size of the placed image. Currently, I've just put together a hacked solution by writing a class for para-style-override into my CSS. It's an inelegant solution but seems to work for all the other e-readers. But, as mentioned, it doesn't work on the Kindle.
    Anyone have any idea what is causing these overrides and how I might prevent them so my div class can take over?
    Alan
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <title>Titlepage2-1.html</title>
            <link href="template.css" rel="stylesheet" type="text/css"/>
        </head>
        <body>
            <div id="Titlepage2-1.html" xml:lang="en-US">
                <div class="story">
                    <p class="Pagebreak"/>
                    <h1 class="fulltitle">Far North</h1>
                    <h2 class="author">MARCEL THEROUX</h2>
                </div>
                <div class="frontmatterlogo">
                    <p class="para-style-override-1">
                        <img width="191" height="19" src="images/HarperPerennialClassic_fmt.jpeg" alt="HarperPerennialClassicsLogo.jpg"/>
                    </p>
                </div>
            </div>
        </body>
    </html>

    Thanks for getting back so quickly, Bob.
    I'm using Version 5.5. I have basically the same problem when the object is anchored. In the case below, I created a new paragraph style for the line on which the logo would be anchored, also mapping to the frontmatterlogo entry in my CSS. This time, no paragraph-style-override is added but In Design still adds it's own image dimensions corresponding to the size at which the image was placed in the layout. This overrides the settings in my CSS and, I suspect, might be what's allowing the Kindle settings to take over as well. I had kind of resigned myself to fixing this in the code  on a book by book basis, which is fine if the only images the book contains is a cover and a title page logo. But I'm worried about what happens when I have to create an e-pub from a photo-heavy book. You can see how it would be ideal to create a few specific object styles for different image situations in In Design and have them map them to specific div styles in my CSS. Basically it's a workflow issue. This would minimize the amount of after-the-fact coding our already swamped designers would have to do.
    It's so obvious in the code where the problem lies, and so I just have a feeling that there may be a simple fix. If only I knew why In Design felt obliged to specify the image size.
    A.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <title>Titlepage2-1.html</title>
            <link href="template.css" rel="stylesheet" type="text/css"/>
        </head>
        <body>
            <div id="Titlepage2-1.html" xml:lang="en-US">
                <div class="story">
                    <p class="Pagebreak"/>
                    <h1 class="fulltitle">Far North</h1>
                    <h2 class="author">MARCEL THEROUX</h2>
                    <p class="frontmatterlogo"><img class="frontmatterlogo" width="196" height="20" src="images/HarperPerennialClassic_fmt.jpeg" alt="HarperPerennialClassicsLogo.jpg"/></p>
                </div>
            </div>
        </body>
    </html>

  • CS4 PDF Export: Paragraph Styles to Bookmarks

    Hi,
    Is there a way of mapping bookmarks to paragraph styles for PDF export? I have a hunch there is, but I'm only finding the option to insert bookmarks manually. I want to structure the pdf by heading level for an interactive version
    i.e.,:
    Chapter Title
    -Heading 2
    --Heading 3
    ---Heading 4
    Thanks in advance!

    You must export to Acrobat 5 or higher, and check the boxes inthe export dialog to include the bookmarks, hyperlinks, and interactive content (the second too may no longer be necessary in CS4, but od habits die hard).
    I've had some trouble, and I think others report it too, with including bookmarks from more than one TOC.
    Peter

  • How do I access *load paragraph styles* from the styles pallet menu?

    Adobe help informs me that I can bring styles from other documents into an existing document by doing this:
    "To copy paragraph styles from one publication to another choose Load Paragraph Styles from the Paragraph Styles panel menu."
    I do not see any menu in the paragraph style menu. I am in CS5. What am I missing?

    I'm sorry, I found it. I had to go back to my G4 and the CS version to see what to do. I did not recognize the small feature on the window yielding the menu.

  • I copy text, paragraph styles, character styles & images from 1 document to another only text copies

    I have a few documents that have text and images that is frequently repeated through many chapters of an In Design book. (Printing, exporting etc.) I used to select all in the source document, Command + C to copy it, change to the target document, Command + V to paste it. It worked well for six months.
    About two weeks ago it stopped working (shortly after an update to In Design). I have text, paragraph styles, chacter styles and images in each document. Only the plain text copies over. This is the same for any document.
    I haven't changed Preferences in six months.
    I'm on a Mac 10.8.2, In Design CS6 version 8.0.1.
    It's driving me crazy! It's a lot of work to reformat each 2  to 10 pages after copying it in.
    Steven Hussey

    Source:
    Target:
    Here you go.
    Steve

  • InDesign CC is bringing in style sheets from Word and other places that I copy type from, like email, Acrobat. In InDesign CS4, whenever I brought in text from outside it assumed the paragraph style applied to the waiting text box. The loss of this functi

    I used to be able to get text from a Word doc (copy it), and then go into my CS4 InDesign file and paste it into a waiting box that had a paragraph style assigned to it and boom, it would take on the assigned paragraph style of that text box. Now it brings in the style from wherever the text came from. If the font looks similar to what was there it can be too hard to tell that it's different. When you are working on a book with 200 pages and copying text from Word docs and dropping it in here and there in InDesign, it causes alot of extra work and problems.
    In fact I have lost alot of security functions I used to have in CS4 in CC2014 in InDesign, Photoshop, Illustrator and Acrobat and it is making me want to go back to CS4 in a hurry.

    I actually FINALLY found the answer!!!! In the preferences area you choose Clipboard Handling and then you choose "Text Only" under When Pasting Text and Tables from Other Applications (see photo).

Maybe you are looking for

  • White screen issue on iPhone 4S?

    Recently when I tried to use my iPhone the screen just turned completely white. I have no idea why. The screen is still functional in that if I receive a call, I'm still able to swipe to pick it up. I even tried a hard reset by holding the power and

  • Significant difference in response times for same query running on Windows client vs database server

    I have a query which is taking a long time to return the results using the Oracle client. When I run this query on our database server (Unix/Solaris) it completes in 80 seconds. When I run the same query on a Windows client it completes in 47 minutes

  • App store does not 'see' Aperture (no update)

    After updating to Mavericks, the App Store does not recognize Aperture as an installed/bought app. Updates from 3.2 up to and including 3.4.5 have worked flawlessly. Now the App Store update page tells me there are no updates for Aperture while I'm s

  • Best method for copying database

    I am building a new production database and was mulling over the 'best' (read: easiest) way to move / copy the database onto the new production server. I have exports and full RMAN backups from the production database. TIA.

  • Can't share iMovie. Getting the following error: Video rendering error: -50

    Created a movie in iMovie and it won't let me share it (no matter how I try to share it). I'm getting the following error each time: Video rendering error: -50