/* * FrameGurus permit you to use, modify, extrend and distribute this script * so long as credit is given to the original creator of the work. * * Description: * The script pulls out information on Paragraph, Character & Table tags * from the active document and displays it in a HTML report. * * Author: * FrameGurus * email: framegurus@gmail.com */ var metric = 65536; document=app.ActiveDoc; HTMLReportName=new Array(); HTMLReportName=document.Name.split(".") /* HTML Report for this utility */ HTMLReportfile=new File (HTMLReportName[0]+".html"); HTMLReportfile.open("w+", "TEXT"); HTMLReportfile.write(""); HTMLReportfile.write("\nParagraph, Character and Table Designer Descriptives"); HTMLReportfile.write("\n"); HTMLReportfile.write("\n

Paragraph, Character and Table Designer Descriptives

"); HTMLReportfile.write("\n

Report generated for : \t "+document.Name+"

"); HTMLReportfile.write("\n
"); /*Defining repetitive close tag.*/ HTMLCloseTag=""; HTMLReportfile.write("
Paragraph Formats

"); /* Pgf Format Handling*/ pgffmt=document.FirstPgfFmtInDoc; nextFmt = pgffmt; while(nextFmt.ObjectValid()) { HTMLReportfile.write("
"+nextFmt.Name+HTMLCloseTag); /*Take care of AsIs*/ /*Do Something for nextFmt*/ HTMLReportfile.write("
FontPlatformName"+nextFmt.FontPlatformName+HTMLCloseTag); HTMLReportfile.write("
Font Color"+nextFmt.Color.Name+HTMLCloseTag); HTMLReportfile.write("
Font Size"+(nextFmt.FontSize/metric)+HTMLCloseTag); HTMLReportfile.write("
Hyphenation"+nextFmt.Hyphenate+HTMLCloseTag); HTMLReportfile.write("
"); nextFmt = nextFmt.NextPgfFmtInDoc; } /* Character Format Handling. */ charfmt=document.FirstCharFmtInDoc; nextFmt = charfmt; HTMLReportfile.write("
Character Formats

"); while(nextFmt.ObjectValid()) { HTMLReportfile.write("
"+nextFmt.Name+HTMLCloseTag); HTMLReportfile.write("
FontPlatformName"+nextFmt.FontPlatformName+HTMLCloseTag); HTMLReportfile.write("
Font Color"+nextFmt.Color.Name+HTMLCloseTag); HTMLReportfile.write("
Font Size"+(nextFmt.FontSize/metric)+HTMLCloseTag); HTMLReportfile.write("
Underlining"+nextFmt.Underlining+HTMLCloseTag); HTMLReportfile.write("
"); nextFmt = nextFmt.NextCharFmtInDoc; } /* Table Format Handling. */ tblfmt=document.FirstTblFmtInDoc; nextFmt = tblfmt; HTMLReportfile.write("
Table Formats

"); while(nextFmt.ObjectValid()) { HTMLReportfile.write("
"+nextFmt.TblTag+HTMLCloseTag); HTMLReportfile.write("
FontPlatformName"+nextFmt.TblInitNumCols+HTMLCloseTag); HTMLReportfile.write("
Font Color"+nextFmt.TblInitNumBodyRows+HTMLCloseTag); HTMLReportfile.write("
Hyphenation"+nextFmt.TblBodyRowRuling.Name+HTMLCloseTag); HTMLReportfile.write("
"); nextFmt = nextFmt.NextTblFmtInDoc; } HTMLReportfile.write("\n") HTMLReportfile.close(); HTMLReportfile.execute();