5 Replies Latest reply on Mar 28, 2018 8:44 AM by 4everJang

    Insert paragraph on empty page and add text

    tomp91 Level 1

      Hey guys,

       

      I just got the task to insert a certain text on empty pages inside a .fm file (the empty page is always the last page of each file).

      I already took a look at how to insert a paragraph (How to insert a new paragraph? ). But that only adds a paragraph right behind the last one. Since I do not have a paragraph on the page that I want to insert the text to, I wonder which element I could use to insert the paragraph right at the beginning of that page. Does anyone have a clue how that could be done?

       

      Kind regards, Tom

        • 1. Re: Insert paragraph on empty page and add text
          frameexpert Level 4

          Hi Tom,

           

          It depends :-). Is the last page part of the main text flow? Or is it a disconnected page?

           

          Rick

          • 2. Re: Insert paragraph on empty page and add text
            tomp91 Level 1

            Hi Rick,

             

            that last empty page is part of the main text flow, I think.

             

            Tom

            • 3. Re: Insert paragraph on empty page and add text
              4everJang Level 3

              Hello Tom,

               

              I am assuming the text reads something like "this page is intentionally left blank". You do not need any scripting for this. Let me know if you are using single-sided or double-sided documents, plus whether you are working in structured Frame or not and I will reveal the solution here. It is simple once you see it.

               

              Kind regards

               

              Jang

              • 4. Re: Insert paragraph on empty page and add text
                tomp91 Level 1

                Hi Jang,

                 

                yes, that is round about what shall be inserted. The documents are double-sided and structure.

                Thank you in advance!

                 

                P.S.: I am also still interested in a solution via scripting since I want to learn about that as well.

                 

                tom

                • 5. Re: Insert paragraph on empty page and add text
                  4everJang Level 3

                  Hi Tom,

                   

                  You can learn about scripting doing other stuff, I am sure. For this problem, no scripting is required (and it would be really hard to make it work in structured content, anyway).

                   

                  I am assuming that chapters are always starting on the right page, but if that is not the case for you, the solution is still the same. You open the master pages and copy the Left page to a new one an call it Left_NotEmpty. Then you place a text line with the required message on the Left master page.

                   

                  Save the doc and return to the body page view. You will now see the "page blank" message appearing on every Left page (which is not really what you wanted for all pages but that is OK - we will fix it). Now you need to run the Apply Master Pages command at least once. This creates a StructMasterPageMaps table on one of the Reference pages. In that table, you insert one or more new lines that cause the Left_NotEmpty page to be applied whenever an element is present on the left page. You need to catch all block elements or at least one that will always be there. You can also use paragraph tags. The idea is that whatever content appears on the page, it will call out the Left_NotEmpty page. When there is nothing on the page, the Left page will automagically show the message that the page was intentionally left blank (or something else to your liking).

                  MasterPageMapping.png

                  Kind regards from the "Frame Tamer"

                   

                  Jang

                  1 person found this helpful