• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Exporting/Printing Character and Paragraph Styles List

Community Beginner ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

I have searched for a simple answer to this, or at least an active script to install with little success. CreativePro had an article answering this issue, but it was for much older vs. of ID in addition, the scripts are outdated, or no longer available to download. 

 

Issue: I have many styles I need to create a Style Guide/User guide for other future users. And before you say, "they can download them, import them from the cloud..." not so in my case. As these users are not Cloud/network connected. We have dedicated systems for internal use only. 

 

Can anyone please offer a solution, script... solution? Thank you my community of most talented designers. 

TOPICS
How to , Import and export , Print

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Nov 28, 2021 Nov 28, 2021

Hi @SusanL , I could not get Dave’s CS2 script to work in newer versions of InDesign. You are welcome to try this script:

 

https://shared-assets.adobe.com/link/a29d2554-8e5e-4e13-7bd1-8b3ec8e3e3ba

 

It exports a .csv spreadsheet with the document’s paragraph styles’ values to your Desktop. The file is named styletable.csv. The current version of InDesign has 330 different Paragraph Style properties, so navigating a full spread sheet can be difficult.

 

My script skips around 100 of the properti

...

Votes

Translate

Translate
Community Expert , Oct 24, 2022 Oct 24, 2022

Hi @DeanPerry,

While @rob day answers, you can use the current script and replace paragraphStyles with allParagraphStyles this should make it work hopefully. If not, then revert and one of us will spend some time to change the script. If you get errors after making this change share the exact error and line number, it will help in troubleshooting

-Manan

Votes

Translate

Translate
Community Expert ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

What is the link for the Creative Pro Network article? Do you know who wrote the script?

 

~ Jane

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

No, I'm afraid I don't know who wrote the script, but this is the original article... https://creativepro.com/print-out-style-sheet-specs/  and there were a few others I tried tracking down as well as some old forums, but I would get a 404. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

@SusanL I was able to download the .zip file based on this link TextStylesReporterCS2 from the archived site and extract it locally on my computer. There are .inds and .jsx files included but I can't attach those file formats here. The PDF that was included is attached though. I can put the other files in a Dropbox folder for direct download if you like. They might be helpful as a starting point for someone in updating the script? Let me know if that would be of any help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

Thank you, I will look this over. I can't access dropbox, on my work (pain-n-the-butt) machine. Let me see if I can figure this out though. Thank you for taking the time to reply and troubleshoot as well.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

No problem. Here is the .jsx file as a .txt file. Just change the extension back to .jsx when needed. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 18, 2021 Nov 18, 2021

Copy link to clipboard

Copied

Do you have the snippet file for the script? (the .inds) TIA.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 18, 2021 Nov 18, 2021

Copy link to clipboard

Copied

The link for TextStylesReporter no longer works. A scripter by the name of Dave Saunders wrote the script back in 2005 or 2006.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2021 Nov 23, 2021

Copy link to clipboard

Copied

I have a copy of it.

Mike Witherell

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 08, 2022 Jul 08, 2022

Copy link to clipboard

Copied

Hello. Do you have a copy oif the .inds snippet that you can post a link to here?

 

Cheers

Rob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 28, 2021 Nov 28, 2021

Copy link to clipboard

Copied

Hi @SusanL , I could not get Dave’s CS2 script to work in newer versions of InDesign. You are welcome to try this script:

 

https://shared-assets.adobe.com/link/a29d2554-8e5e-4e13-7bd1-8b3ec8e3e3ba

 

It exports a .csv spreadsheet with the document’s paragraph styles’ values to your Desktop. The file is named styletable.csv. The current version of InDesign has 330 different Paragraph Style properties, so navigating a full spread sheet can be difficult.

 

My script skips around 100 of the properties (e.g. jidori, warichuSize, etc.). The exceptions are listed at the top of the script and can be edited. It will also only report some properties if one of the styles uses them (e.g. ruleAbove, underline, etc.).

 

Here is the code from the jsx file I linked to above:

 

 

/*
* Export Paragraph Style Property List
* Version 1.0
* Rob Day 2020-2021
*/

//Properties to skip
var exceptions = ["styleUniqueId","emitCss","includeClass","paragraphKashidaWidth",
                 "designAxes","previewColor","rotateSingleByteCharacters","leadingModel",
                 "id","isValid","index","label","properties","styleExportTagMaps","parent","tabList",
                 "bulletChar","gridGyoudori","otfHVKana","leadingAki","tsume","kashidas","trailingAki",
                 "jidori","shataiMagnification","shataiDegreeAngle","shataiAdjustRotation",
                 "shataiAdjustTsume","tatechuyoko","tatechuyokoXOffset","tatechuyokoYOffset",
                 "kentenFillColor","kentenFont","kentenStrokeColor","kentenTint","kentenStrokeTint",
                 "kentenWeight","kentenOverprintFill","kentenOverprintStroke","kentenKind",
                 "kentenPlacement","kentenAlignment","kentenPosition","kentenFontStyle",
                 "kentenFontSize","kentenXScale","kentenYScale","kentenCustomCharacter",
                 "kentenCharacterSet","rubyFill","rubyFont","rubyStroke","rubyTint","rubyWeight",
                 "rubyOverprintFill","rubyOverprintStroke","rubyStrokeTint","rubyFontStyle",
                 "rubyFontSize","rubyOpenTypePro","rubyXScale","rubyYScale","rubyType","rubyAlignment",
                 "rubyPosition","rubyXOffset","rubyYOffset","rubyParentSpacing","rubyAutoAlign",
                 "rubyOverhang","rubyAutoScaling","rubyParentScalingPercent","rubyParentOverhangAmount",
                 "warichu","warichuSize","warichuLines","warichuLineSpacing","warichuAlignment",
                 "warichuCharsAfterBreak","warichuCharsBeforeBreak","cjkGridTracking","glyphForm",
                 "gridAlignFirstLineOnly","gridAlignment","autoTcy","autoTcyIncludeRoman","kinsokuSet",
                 "kinsokuType","kinsokuHangType","bunriKinshi","mojikumi","rensuuji","rubyAutoTcyDigits",
                 "rubyAutoTcyIncludeRoman","rubyAutoTcyAutoScale","treatIdeographicSpaceAsSpace",
                 "allowArbitraryHyphenation","paragraphGyoudori"]
                 
            

//Skip these properties if all of the document’s properties are set to false
var ruleabove = false;
var rulebelow = false;
var uline = false;
var strike = false;
var parborder = false;
var parshade = false;

//the spreadsheet is saved to the dsktop
var path = Folder.desktop + "/styletable.csv";

//the document paragraph styles
var ps = app.activeDocument.paragraphStyles

//get the properties of basic paragraph style
var bps = ps[1];
var props = bps.reflect.properties;

//set the exception group 
flagExceptions();

//add exceptions
var exceptionsList = addExceptions(props);

//the table head (style properties)
var tbl = getProperties(props)
tbl += "\r";

//add the value lines
for (var i = 1; i < ps.length; i++){
    var vLine = getValues(props, ps[i]);
    tbl += vLine;
    tbl += "\r";
};   

//write the .cvs file
writeText(path, tbl)

/**
* get the property values as a tab delimited string
* @param array of properties
* @param the para style to get 
* @return tab delimited string of values for the table 
*/
function getValues(props, ps){
var ot, val, pn;
var vArray = [];

    for (var i = 0; i < props.length-5; i++){
        //the property as a string
        pn = props[i].name;
        //skip the exceptions
        if (!checkItem(exceptionsList, pn)) {
            //the value list
            ot = ps[props[i]]
            try {
                //if the value returns as an object get its name (e.g, a character style) else get it as a string
                if (typeof ot == "object") {
                    try {
                        if (ps[props[i]].name == undefined) {
                            val = ot.toString();
                        } else {
                            val = ps[props[i]].name;
                        }
                    }catch(e) {
                        val = ot.toString();
                    }
                } 
                //if it’s not an object get it as a string
                if (typeof ot != "object") {
                    val = ps[props[i]].toString();
                }
                //string fixes:
                //get a string list of tab stops
                if (pn == "tabStops") {
                   val = getTabs(ps.tabStops);
                } 
                //gets the number of nested styles
                if (pn == "nestedStyles") {
                    val = getNested(ps.nestedStyles.length);
                } 
                if (pn == "nestedLineStyles") {
                    val = getNested(ps.nestedLineStyles.length);
                } 
                if (pn == "nestedGrepStyles") {
                    val = getNested(ps.nestedGrepStyles.length);
                } 
                if (pn == "numberingRestartPolicies") {
                   val = ps.numberingRestartPolicies.numberingPolicy.toString();
                }
            
                //change -1 to 100% Tint
                if ((pn.substring(pn.length-4) == "Tint") && (val == "-1")){
                    val = "100"
                } 
                //remove tabs and commas from the value strings
                //for when the array is converted to a tab delimited string
                //replaces tabs in font names with hyphens
                val = val.replace(/(\t)/, '-');
                //replaces commas with spaces
                val = val.replace(/,/g, '')
                vArray.push(val)
            }catch(e) {} 
        }
    }
$.writeln(vArray.length)
    return vArray.toString().replace(/,/g, '\t');
}

/**
* Gets all of the basic paragraph’s properties that are not in the exception list 
* @param an array of all properties 
* @return an tab delimited string of properties
*/
function getProperties(props){
    var propArray = [];
    for (var i = 0; i < props.length-5; i++){
        if (!checkItem(exceptionsList, props[i].name)) {
            propArray.push(props[i].name)
        }
    }
    return propArray.toString().replace(/,/g, '\t') 
}

/**
* Set flags for additional style exceptions
* @return void 
*/
function flagExceptions(){
    var ps = app.activeDocument.paragraphStyles
    for (var i = 0; i < ps.length; i++){
        if (ps[i].ruleAbove == true) {
            ruleabove = true
        } 
        if (ps[i].ruleBelow == true) {
            rulebelow = true
        } 
        if (ps[i].underline == true) {
            uline = true
        } 
        if (ps[i].strikeThru == true) {
            strike = true
        }
        if (ps[i].paragraphBorderOn == true) {
            parborder = true
        }    
        if (ps[i].paragraphShadingOn == true) {
            parshade = true
        }           
    };   
}


/**
* Add exceptions to the global list 
* @param a array of properties
* @return new array of exceptions
* 
*/
function addExceptions(a){
    var pn;
    for (var i = 0; i < a.length-5; i++) {
        pn = a[i].name;
        
        if ((!ruleabove) && (pn != "ruleAbove") && (pn.substring(0,9) == "ruleAbove")) {
            exceptions.push(pn)
        }
        if ((!rulebelow) && (pn != "ruleBelow") && (pn.substring(0,9) == "ruleBelow")) {
            exceptions.push(pn)
        }    
        if ((!uline) && (pn != "underline") && (pn.substring(0,9) == "underline")) {
            exceptions.push(pn)
        } 
        if ((!strike) && (pn != "strikeThru") && (pn.substring(0,9) == "strikeThr")) {
            exceptions.push(pn)
        }  
        if ((!parborder) && (pn != "paragraphBorderOn") && (pn.substring(0,10) == "paragraphB")) {
            exceptions.push(pn)
            exceptions.push("mergeConsecutiveParaBorders")
        }  
        if ((!parshade) && (pn != "paragraphShadingOn") && (pn.substring(0,10) == "paragraphS")) {
            exceptions.push(pn)
        }    
    }
    return exceptions
}

/**
* Gets a string listing of tabs 
* @param the tabs array 
* @return tab string
*/
function getTabs(o){
    var s="";
    for (var i = 0; i < o.length; i++){
        s += o[i].position.toFixed(3) + "  "
    };   
    return s
}

/**
* Gets the number of nested styles in use
* @param the nested array length 
* @return value 
*/
function getNested(l){
    var s;
    if (l == 0) {
        s = "None"
    } else {s = l.toString()}
    return s
}

/**
* Checks if an item is in an array
* @param the array to check 
* @param the item to look for 
* @return true if the item is in the array 
*/
function checkItem(a, obj) {
    for (var i = 0; i < a.length; i++) {
        if (a[i] === obj) {
            return true;
        }
    }
    return false;
}

/**
* Write a text file 
* @param the file path 
* @param the text 
*/
function writeText(p,s){
    var file = new File(p);
    file.encoding = 'UTF-8';
    file.open('w');
    file.write(s);
    file.close();
}

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 24, 2022 Oct 24, 2022

Copy link to clipboard

Copied

Hi David

Sorry to tack on to an existing discussion, but I think my question will make more sense here than separate! Do you have a version of this script that will iterate through styles in style groups (folders) as well?

Thanks!
Dean

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 24, 2022 Oct 24, 2022

Copy link to clipboard

Copied

Sorry, I mean @rob day  - not David.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 24, 2022 Oct 24, 2022

Copy link to clipboard

Copied

Hi @DeanPerry,

While @rob day answers, you can use the current script and replace paragraphStyles with allParagraphStyles this should make it work hopefully. If not, then revert and one of us will spend some time to change the script. If you get errors after making this change share the exact error and line number, it will help in troubleshooting

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 25, 2022 Oct 25, 2022

Copy link to clipboard

Copied

That's exactly what I needed Manan. (I must go check the documentation for styles in scripting!)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 07, 2024 Mar 07, 2024

Copy link to clipboard

Copied

Hi @Manan Joshi
The script would be very helpful for me too. 😇
I just tried to run it in the latest InDesign version (19.2) – but unfortunately it doesn’t work. I don’t get an error message either. It would be a dream if someone could update it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2024 Mar 07, 2024

Copy link to clipboard

Copied

but unfortunately it doesn’t work. I don’t get an error message either

 

Hi @rgrund , the script should write a .CSV file to your Desktop folder. By doesn’t work, do you mean the .CSV file is not created on your desktop? If that‘s the case it might be a permissions problem.

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 07, 2024 Mar 07, 2024

Copy link to clipboard

Copied

Yeah, that’s brillant!

It works very well.

Many thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2024 Mar 07, 2024

Copy link to clipboard

Copied

I changed the save directory to the InDesign File‘s parent directory and also included grouped styles, see if that helps. Same link:

 

https://assets.adobe.com/public/a29d2554-8e5e-4e13-7bd1-8b3ec8e3e3ba

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 13, 2024 Mar 13, 2024

Copy link to clipboard

Copied

how do i change this to be just a list of style sheet names and no format information?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 14, 2024 Mar 14, 2024

Copy link to clipboard

Copied

It would be a different script. See my 2nd post in this thread:

 

https://community.adobe.com/t5/indesign-discussions/script-utility-to-build-a-list-of-styles-in-docu...

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 14, 2024 Mar 14, 2024

Copy link to clipboard

Copied

This script gives me a ton of information about the formats. I took the file and opened it in word and did the following search and replace to remove the unwanted information and it worked awesome. The search and replace is as follows:

 

Turn wild cards on

Search field is:

^t(*{1,})^13

Replace field is:

^p

 

Now i have a file that has only the style names and I can convert it to a tags file in Dreamweaver. 

Then i used the tags file to import tags in InDesign instead of spending the time creating each tag. Saves tons of times on files with lots of styles going from InDesign to XML.

 

Super solution,

Linda

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 14, 2024 Mar 14, 2024

Copy link to clipboard

Copied

quote

[...]Saves tons of times on files with lots of styles going from InDesign to XML.

 

By @Linda24415233u1d0

 

Do you need custom XML export?

 

▒► ID-Tasker / ID-Tasker Server - work smart not hard ◄▒

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 14, 2024 Mar 14, 2024

Copy link to clipboard

Copied

I need a list of styles so i can compare files. And, I don't like creating the tags from scratch. The company we send our files to needed a list too. I don't want all the extra the script you sent me added. What did you have for XML. Right now I am exporting them from InDesign. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 14, 2024 Mar 14, 2024

Copy link to clipboard

Copied

If you want my wish list. i would like a list that looks exactly like the panel. I use folders and it would certainly be nice to have the panel print off instead of the formats. Would that be possible? What I want to really use it for is to compare style names from file to file. For example. I put everything in a certain order for easy access. I have my paragraph styles for front matters in one folder and inside the front matter folder is another folder for each type of page in a front matter. i.e. title page, copyright page, preface, and so on. It helps keep things organized. I have over a thousand books we work on an they all have to have the same styles names with different formats because of the way we do XML. Not sure if that makes any sense. 

So my wish list is to just export the entire panel with it in the order i have it in InDesign where the folders are included, and it is just a list. Nothing more. 

Honestly, this would have come in handing many many times in my career. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines