Hello FrameMaker users and Friends,
Too much of travelling kept us busy last fortnight. Was taking a look on the Framers list and found an interesting problem to solve- Link.
This script pulls out information on Paragraph, Character & Table tags from the active document and displays it in a HTML report.
Tag Descriptives Report
The report has three sections:
- Paragraph Formats
- Character Formats
- Table Formats
Each listing down different tag definitions and some associated properties for each tag in the document.
You can modify the script to add fields that are important to be captured in the report.
Overall a nice report to keep track of all tags and the related info in one report. We found it very useful while designing templates for a project. Hopefully anyone using this script will derive some benefit using this report.
Download the extendscript here (Right click and Save as) and rename pdf to jsx- TagDescriptives.jsx
Feel free to share your thoughts on it.
I was going through a query on the Adobe FrameMaker user to user forums, found this interesting problem statement:
And I thought, why not try and solve this problem statement. Had fun solving it.
Sharing it for the benefit of the FrameMaker Extendscript community.
var doc = app.ActiveDoc
var variable = doc.FirstVarInDoc
var tr1 = variable.TextRange; //text range of the variable
/*text range for next possible char*/
var tl1 = new TextLoc(tr1.end.obj, tr1.end.offset + 1);
var tl2 = new TextLoc(tr1.end.obj, tr1.end.offset + 2);
var tr2 = new TextRange (tl1, tl2)
var textitems = doc.GetTextForRange (tr2, Constants.FTI_String);
if (textitems.length > 0)
var str = textitems.sdata;
if(str != " ") //if space then add text
doc.AddText (tr2.beg, " ");
variable = variable.NextVarInDoc;
Hope this solution nails the problem statement. It might also lead you to attack similar problems under different contexts.
Introduction to Scripting in FrameMaker