Highlighted

Get the paragraph in page by page from framemaker using script ?

Community Beginner ,
Oct 16, 2019

Copy link to clipboard

Copied

hi,

    I have used below code for count the paragraph from  framemaker.

function CountPgfs(doc) {
var pgf, paragraphCount = 0;
pgf = doc.FirstPgfInDoc;
while (pgf.ObjectValid() === 1) {
paragraphCount += 1;
pgf = pgf.NextPgfInDoc;
}
return paragraphCount;
}

 

This code display paragraph count for whole framemaker document  including masterpage ,referencepage and bodypage.But i need to display the paragraph  count in page by page like only bodypage paragraph using framemaker script.Please suggests if any ideas.

TOPICS
Scripting

Views

700

Likes

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

Get the paragraph in page by page from framemaker using script ?

Community Beginner ,
Oct 16, 2019

Copy link to clipboard

Copied

hi,

    I have used below code for count the paragraph from  framemaker.

function CountPgfs(doc) {
var pgf, paragraphCount = 0;
pgf = doc.FirstPgfInDoc;
while (pgf.ObjectValid() === 1) {
paragraphCount += 1;
pgf = pgf.NextPgfInDoc;
}
return paragraphCount;
}

 

This code display paragraph count for whole framemaker document  including masterpage ,referencepage and bodypage.But i need to display the paragraph  count in page by page like only bodypage paragraph using framemaker script.Please suggests if any ideas.

TOPICS
Scripting

Views

701

Likes

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
Oct 16, 2019 0
Adobe Community Professional ,
Oct 17, 2019

Copy link to clipboard

Copied

Moving to the FrameMaker forum from Get Started

Likes

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
Reply
Loading...
Oct 17, 2019 0
Mentor ,
Oct 17, 2019

Copy link to clipboard

Copied

Hi,

 Here is a quick little function to get the page type for a paragraph. It returns a string, one of "BodyPage", "MasterPage", "RefPage", or "HiddenPage". It's not the way I would put the code together, but it should at least give you an idea how to do it. Hope this helps.

 

function getPgfPageType(doc, pgf)
{
  var pageType = "";
  var frame = pgf.InTextFrame;
  var pageFrame = null;
   
  while(frame.ObjectValid())
  {
     pageFrame = frame;
     frame = frame.FrameParent;
  }
  if(pageFrame)
  {
     var page = pageFrame.PageFramePage;
     var pageType = page.constructor.name;
  }
    
  return pageType;    
}

 

Russ

Likes

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
Reply
Loading...
Oct 17, 2019 1
Community Beginner ,
Oct 18, 2019

Copy link to clipboard

Copied

I have used this code. Thank You.

Likes

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
Reply
Loading...
Oct 18, 2019 0
Community Beginner ,
Oct 28, 2019

Copy link to clipboard

Copied

How to split Framemaker document? If 10 pages of framemaker document split  like 1-5 pages in  first document and 6-10 pages in second document using framemaker scripting.Please Suggests if any ideas.

Likes

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
Reply
Loading...
Oct 28, 2019 0
Mentor ,
Oct 29, 2019

Copy link to clipboard

Copied

I think you would just delete pages 6-10, then do a Save() with parameters to make it a "save as". Then reopen the original document and do the same for pages 1-5. There are a number of variables involved here and your requirements are somewhat vague... so that's the most I can suggest for now.

Likes

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
Reply
Loading...
Oct 29, 2019 1
Community Beginner ,
Oct 30, 2019

Copy link to clipboard

Copied

Is it possible to read pgadmin (PostgreSQL) database table using extendscript? Please suggests if any ideas.

Likes

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
Reply
Loading...
Oct 30, 2019 0
Mentor ,
Oct 30, 2019

Copy link to clipboard

Copied

I certainly cannot answer that question with any precise answer. I am sure that if the database has an API, then it is possible. Especially if it is an HTTP rest API. But I don't know anything about that database.

Likes

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
Reply
Loading...
Oct 30, 2019 0
Adobe Community Professional ,
Oct 30, 2019

Copy link to clipboard

Copied

The way I am handling databases now is getting xml dumps and then processing the xml with ExtendScript. It is an extra step in the process, but most database admins are able to easily supply me with xml from their database.

Likes

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
Reply
Loading...
Oct 30, 2019 0
Enthusiast ,
Oct 29, 2019

Copy link to clipboard

Copied

Take care of your xrefs, if there are any!

Likes

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
Reply
Loading...
Oct 29, 2019 0