Skip to main content
Inspiring
Aug 10, 2022 7:38 PM UTC
Question

Any way to quickly find page breaks? Showing text symbols doesn't seem to help...

I don't want to remove all overrides for page breaks, and I'd rather not have to select whole groups of paragraphs looking for what the Page Break panel says is going on. Is there a simple way to find them? I thought maybe making a list of references or markers would have something, but no dice.

    This topic is closed to new replies. Start a new post to keep the conversation going.

    5 replies

    frameexpert
    Community Expert
    Community Expert
    Aug 11, 2022 2:31 PM UTC
    #target framemaker
    
    main ();
    
    function main () {
    
    	var doc;
    	
    	doc = app.ActiveDoc;
    	if (doc.ObjectValid () === 1) {
    		processDoc (doc);
    	}
    }
    
    function processDoc (doc) {
    
    	var pgf, pgfFmt;
    	
    	pgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
    	while (pgf.ObjectValid () === 1) {
    		pgfFmt = doc.GetNamedPgfFmt (pgf.Name);
    		if (pgfFmt.ObjectValid () === 1) {
    			if (pgf.Start !== pgfFmt.Start) {
    				writeBookErrorLog (pgf.id, doc.id, 0, "Page break override.");
    			}
    		}
    		pgf = pgf.NextPgfInFlow;
    	}
    }
    
    function writeBookErrorLog (objId, docId, bookId, msg) { 
        
        /// msg = writeBookErrorLog (objId, docId, bookId, msg);
        
        msg = 'log -b=' + bookId + ' -d=' + docId + ' -o=' + objId + ' --' + msg;
        CallClient ('BookErrorLog', msg);
        
        return msg; // Return for troubleshooting.
    }
    
    Translate
    www.frameexpert.com
    Community Expert
    Aug 11, 2022 3:21 PM UTC

    Hi Rick,

     

    Wow, very good! Thank you very much!

    I will test this tomorrow or next week, when I have again access to my laptop and FrameMaker. Now I am on a training.

     

    Best regards

     

    Winfried

    Translate
    Community Expert
    Aug 11, 2022 6:01 AM UTC

    I assume that you do not want to search for manual page breaks (in the Search box enter \n).

    There is no way to search for a paragraph override so that the paragraph starts at the beginning of a column or a page.

    You could write an ExtendScript script that finds such paragraphs. I am not an expert, but I would think that this is not too difficult.

    Translate
    Bob_Niland
    Community Expert
    Community Expert
    Aug 11, 2022 2:49 AM UTC

    The basic challenge is that there is no mark-up element for page break in FM. It's accomplished by the Pagination of the para that ends up starting the new page, so as CT's link suggests, you're {usually} looking for an override.

    Translate
    Dave Creamer of IDEAS
    Community Expert
    Community Expert
    Aug 10, 2022 7:57 PM UTC
    David Creamer: Community Expert (ACI and ACE 1995-2023)