Detecting Page Break before/after text

Is there a way to detect if there is a page break before or after a block of text through scripting?

yourSelection.characters.item(-1).contents
This will return a regular single character "\r" for a hard return at the end, but any of ID's breaks will be indicated by one of the values:
SpecialCharacters.COLUMN_BREAK
SpecialCharacters.EVEN_PAGE_BREAK
SpecialCharacters.FRAME_BREAK
SpecialCharacters.ODD_PAGE_BREAK
SpecialCharacters.PAGE_BREAK
(as you can see there is more than one 'break' character).
To check a page break before the current paragraph, you will have get a pointer the paragraph before the current one and do this same check on that.
Check also the constant
yourSelection.startParagraph
which can be
StartParagraph.NEXT_COLUMN
StartParagraph.NEXT_EVEN_PAGE
StartParagraph.NEXT_FRAME
StartParagraph.NEXT_ODD_PAGE
StartParagraph.NEXT_PAGE
indicating the Keep Options applied to the current paragraph. These also make paragraphs start at a new page.
Finally, there is the possibility that none of the above applies, but the previous paragraph ended right at the bottom of a text frame, and the current paragraph starts at the top of a new frame. No special character or code, but still a page break. (Perhaps you could test paragraph.lines for that.)

Similar Messages

  • Page Break Before / After

    Hello All,
    In MS Office word, Insert > break made to page break.
    In the Report, I have challenges in the Page Break Before / After.
    If any one help me out, it will be great.
    Thanks in advance,
    REF:
    Tool
    Property Inspector
    Object Navigator
    Report Editor
    Template Editor
    General layout
    Page Break Before
    Page Break After
    Page Protect
    Advance Layout
    Print Obeject On

    the picture worth a thousand wordsDon't you think it would be better to tell us what your problem is? So you changed the property to 1. And now? Does it work? Does it not?

  • Does Acrobat Pro 9 support "page-break-before" CSS tag? ie Pagination issues

    Hey there
    Converting a whole stack of html files to PDF and having some pagination issues.  Titles not staying with images and tables getting chopped in half by page breaks etc.
    Thought i could solve it by using carefully placed "page-break-before:always" tags where i wanted the page break.  Works as expected in Safari when i go to print but not when i "File:Create PDF: From File" in Acrobat Pro.  They get ignored.
    Here's how they should work:
    http://www.w3.org/TR/CSS21/page.html#x3
    This is a major hassle. I've got over 600 webpages to convert to PDF's and manually entering <br> to force items onto the next page is getting old.
    Here's some sample html, paste it into a file, save, open it in Safari and then go to print.  It should print 7 pages.  Open it in Acrobat Pro 9.1.0 and you get one page.
    <body>
    test0
    <p style="page-break-before: always">
    test
    <p style="page-break-before: always">
    test1
    <p style="page-break-before: always">
    test2
    <p style="page-break-before: always">
    test3
    <p style="page-break-before: always">
    test4
    <p style="page-break-before: always">
    </body>
    The really nice thing is this would be so useful.  You can attach the tag (page-break-before:avoid)  to a Caption style and always be assured that it will stay with a following graphic when you print the webpage. Or use it to make sure a table doesn't get cut in half.
    http://reference.sitepoint.com/css/page-break-after
    http://reference.sitepoint.com/css/page-break-before
    Any hints would be great
    tia
    Jeremy

    Nope.  Did the </br> thing. 
    Cost me some serious cash.  Very annoying.
    I haven't tried it with Safari 5. Acrobat allowed me set page margins, something that Safari 4 didn't allow (didn't support margin css tags).  But acrobat didn't support the pagination and Safari 4 did.
    Like i said annoying
    I'll see if Safari 5 supports the print margins css tags.
    I'll prob get asked to do this again so would like to sort it out
    Jeremy

  • CSS Page-break-before is not working in FireFox 4 but worked proper in FF3.x

    I have web app that produces ~10 page sales estimate. To make things look nice, I have added pagination to my CSS files (using page-break-before:always)... this all worked wonderfully in FireFox 3.x... I recently upgraded to FF4 and now it is not working

    Hi there,
    I seem to be having a similar problem, however, the first page break is working, but each page break after that is not.
    The page break is a div that is a dedicated page break layer and the first clearly works, but the remainder of the 12 page report doesn't have any breaks.
    Testing with other browsers shows up 12 pages with breaks which to me indicates a issue with ff4 as I have only recently upgraded to 7 and it used to print under ff3 with all the breaks no problems.

  • How to Get Page Break Before Inline TOC in EPUB?

    I'm exporting a book file to epub.  The TOC is created correctly inline, but I can't yet find a way to get a page break right before it. 
    In EPUB Export Options->Advanced, I have selected Split Document->Based on Paragraph Style Export Tags.
    The TOC Header (saying "Table of Contents") has the paragraph style "TOC Heading." In paragraph styles panel->Edit all Export Tags, I have checked the checkbox for "Split EPUB" next to the "TOC Heading" style.
    But, after export, there is no page break before the TOC Header.
    How can I correct this?
    Thanks very much in advance to all for any info.

    I think basically you're doing it correctly. I've run into the same problem. What I found is that the heading in the PLACED table of contents (placed by using the Layout > Table of Contents feature and placing it onto the page) will not work for making a page break. It's a special kind of object because it can be updated by the Update Table of Contents command.
    You have to do a workaround: You need to create "Table of Contents" in a separate frame and apply the TOC Heading paragraph style.
    In the TOC style, DON'T include content for the TOC title. Look at the screen captures below of my TOC.
    By separating the "Contents" into its own frame it works in EPUB:

  • Orage reports - page break before

    Hi
    Can any more experience devolpers help? I have a group above report that I wish the group to either page break after or page break before. If I set page break before then the group only prints on page 2 onwards. If I set page break after it prints on page 1 ok but then the report total always prints on its own on the last page.

    Hi,
    sounds like there's no child object for your object with page break before. This property has only impact of the object itself and all it's child objects. An object is a child object of another object, if the position of this objects has impact of the own position. This is only the case, if the parent object is vertical expandable and the child object is horizontally overlapping the virtual expand-region, or the child-object is anchored to the parent object.
    So if you have this layout:
    blue box fixed size
    red box fixed size
    yellow box fixed size
    and you set page break before to the red box, you will get:
    blue box
    yellow box
    -- page break
    red box
    If the red box is verical expandable you will get:
    blue box
    --page break*
    red box
    yellow box
    So in your tabluar report your field of the report should be in a frame and this frame should be child object of your new object which must be vertical expandable or anchor them together.
    Regards
    Rainer

  • Page Break Before & Repeating Frame (Reports 10G - Windows)

    Hi to all,
    I have to give page break when a condition met in a tabular report.Like it s advised I tried some layout objects with page break before property true and wrote their return code true if this criteria occurs. But whatever I tried, I couldnt get my desired output.It gives page break but repeats a blank repeating frame in the next page but only with that object I added later with page break property. Anybody have an idea ?
    Thanks...

    Hi,
    sounds like there's no child object for your object with page break before. This property has only impact of the object itself and all it's child objects. An object is a child object of another object, if the position of this objects has impact of the own position. This is only the case, if the parent object is vertical expandable and the child object is horizontally overlapping the virtual expand-region, or the child-object is anchored to the parent object.
    So if you have this layout:
    blue box fixed size
    red box fixed size
    yellow box fixed size
    and you set page break before to the red box, you will get:
    blue box
    yellow box
    -- page break
    red box
    If the red box is verical expandable you will get:
    blue box
    --page break*
    red box
    yellow box
    So in your tabluar report your field of the report should be in a frame and this frame should be child object of your new object which must be vertical expandable or anchor them together.
    Regards
    Rainer

  • Why does page-break-before get replaced with br class hcp10?

    why does <br style="page-break-before: always;"> get replaced with <br class="hcp10">
    This issue only occurs when generating an HTML Help CHM file.

    An alternative method can be found in Item 23 at http://www.grainge.org/pages/snippets/snippets.htm#content.
    Are you saying the code in the source file gets changed? I suspect you mean target files but how are you identifying the change in a CHM? Is the change causing a problem?
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Page Break symbol in Text print

    When I print a report to text it prints a page break symbol.  Is there anyway to get rid of that?  The report was created in Crystal Reports XI Release 2.

    Hi John,
    Did you type the text in or did you Copy and Paste?  A page break or non-printable character should not be there if you are typing it in on your own. 
    I've only run into this when copying and pasting. 
    Good luck,
    Brian

  • Adobe Form : detect page break using java script

    Hi,
    How can we detect a page break at a runtime using java script? I need to display a data in internal table at header and unique for a document number. i've 10 order list which has multiple items, each of the orders are printed in a new page and i wanted to know this event using a java script which could help me to add some additional logic at header.....pls can someone help on this?

    Hello Prabhu,
         From your doubt, what I understand is that, You have designed a header in Master Page. You need to fill this header using the Item table which is already designed in the design view(body page). Means you want to fill the Item details(which are in body page) into the header(which is in the master page).
    To read the contents from body page into master page, you need to write Javascript code on the header fields(which is in the master page) in the Layout Ready Event.
    For example, if you want to fill the field Order_description in header(master page) from the column Order_Description which is in the Item table(body page)
    In the form layout, select the order_description field and in the event READY LAYOUT write the below JavaScript code.
    var currpage = xfa.layout.page(this);------> Get the current page
    var fields = 0;------> Variable to store the number of fields in that page.
    fields = xfa.layout.pageContent(currpage-1, "field", 0); ------> Get the number of fields
    for ( i=0; i<= fields.length-1; i++ ) ------> Loop on each field on the page
        if ( fields.name == "ORDER_DESCRIPTION" ) ------> Check if the corresponding field is in the Item table
             this.rawValue = fields.item(i).rawValue; ------> Assign that value in the Header field
    Repeat the same steps for other fields in the Header. This will work for all Purchase Orders spanned across multiple pages.

  • Fireworks generated HTML page breaking apart when text resized

    What's the best way to prevent the Fireworks generated slice
    gifs from breaking apart when a browser increases the text size in
    IE?

    #nav li {
    list-style:none; }
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "AndyBute" <[email protected]> wrote in
    message
    news:ef5jb5$8hc$[email protected]..
    > Hi,
    > Thanks for the suggestions. I've rewritten the site
    using a DIV layout in
    > CSS.
    > On small tjing that has cropped up is that I can't
    remove the bullet
    > images on
    > my menu. Take a look at the site at
    http://www.360iview.co.uk
    > The bullet images are crampimg the already tight space
    on the menu.
    > Can you see where the problem is
    >
    > Thanks
    >
    > Andy
    >
    > Here's the CSS and XHTML code:
    >
    >
    > #nav {
    > list-style-image:none;
    > position: absolute;
    > top: 295px;
    > left: 679px;
    > width: 120px;
    > }
    > .menu a:link, .menu a:visited, .menu a:active {
    > color: #FFFFFF;
    > text-decoration: none;
    > font-family: Verdana, Arial, Helvetica, sans-serif;
    > font-variant: none;
    > font-size: 12px;
    > font-weight: bold;
    > }
    > .menu a:hover {
    > color: #FF6600;
    > text-decoration: none;
    > }
    >
    >
    > <div id="nav" class="menu">
    > <?php page_menu(); ?></div>
    >

  • Trouble with format of files exported from pages as .doc - when opened on a pc they have extra spaces and pages breaks inserted after each line?  Can be manually deleted, but defeats sharing purpose. advice?

    Hi all, I have trouble with the format of files exported by email as .doc from pages - when opened in MS word on a PC or other device, they have extra spaces and pages inserted after each line - can be deleted manually, but defeats sharing purpose.  Any advice?  Not the most sophisticated user.

    Got it. I tried booting with MOD_AUTOLOAD set to yes, and it was working fine. Looks like I needed to specify some more modules in my list.

  • How to remove the page break for CSV report

    Hi,
    I'm working on a rdf report and have an issue with page break.
    As usual there exits a page break in the report output. how do I remove it.
    work around: set Page break before/after : NO
    worked on margin re-size, how ever could not resolve the issue.
    Can any one help me on this.
    Thanks in advance.
    Thanks,
    Santhosh

    There are two ways to do this:
    1) If you want to remove and individual dimension from a presentation, you can hide the dimension. This can be performed directly from within QueryBuilder. Within the first section of Query Builder that shows the selected measures selected and associated dimensions, simply remove the required dimensions from the right dialog panel.
    2) To hide all page items within a presentation, simply add the following the property, pagingControlVisible="False", to the presentation tag in your JSP. For example:
    <orabi:Presentation location="Local Computer Sales/Products/KPI Sales Prior Period and Prior Year" id="BIProductKPIs_pres2" pagingControlVisible="False"/>
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • Multi page report in design view and page breaks

    Hey,
    I have designed a report that spans more then a single 8X11 page in design view. The report has one parent frame and 2 child frames. The parent data prints first and then there is a page break before each child's data. The trouble I am having is that where the report is designed over 2 pages in design view the first child's data prints on the 3rd page because of the page break, and then if there is another child it will start to print on the 5th page, etc. Another problem is with the actual page numbering and that page 1 according to the print out actually is 2 pages because of the 2 page design view. I am looking for a way to design a report on 2 pages in design view but have it to print on only 1 page per parent and child depending on how much data there is. If I could fit all of the data elements on a single page in design view it would be easy, but using 2 pages is making it difficult.
    Does this make sense? Any suggestions?
    Thanks

    Try doing the page break by setting the Page Protect property to Yes, not by Page Break before/after.

  • Before Part Page Break Does Not Work

    In my database I've defined a sum-summary part. When I check the "Page break before part" checkbox, no page break appears. When I check the "Page break after part" checkbox a page break does appear but of course this is not where I need the page break.
    Is this a known bug? If so, is there a workaround? If not, what might I be doing wrong?
    TIA
    -eileen

    It is there but you don't see page breaks within the Outline View.
    Outline View is not a way of looking at the layout but at the order of the content and its hierarchy ie its 'Outline'. This is the view that lets you fold up subsiduary sections and grab titles with all the underlying text and drag them from one location to another.
    Save inserting the breaks to the normal view.
    Peter

Maybe you are looking for

  • Substitute at line item level for F-32 (or FB1D) to change profit center

    Hi I'm Liz, I started to write a substitution for F-32 transaction code for clearing with write off reason codes.  I trying to substitute if Profit center = 14xxx then substitute profit center 141xx for only P&L GL accounts.  If I simulate the substi

  • [JS, CS2] Find Text - Change Paragraph Style

    I have text supplied to me formated with <g>,< b>,<k> or <r> at the start of paragraphs, this represents different paragraph styles that need to be applied. <br /><br />I started a script below, but it comes up with an error at "app.findTextPreferenc

  • Disc skipping in tray and won't eject

    I have put a disc in the tray of my MACbook pro that was sent to me with photos on. It is making a skipping sound in the tray, will not load and more importantly wont eject. HELP! Would really appreciate any suggestions how to ejct the disc. I have t

  • Safari keeps freezing / crashing

    2012/04/11 9:27:28 PM ReportCrash[198] Saved crash report for WebProcess[195] version 6534.55 (6534.55.3) to /Users/DonnaP/Library/Logs/DiagnosticReports/WebProcess_2012-04-11-212728_donna -potgieters-macbook.crash Process:         WebProcess [195] P

  • First Time Network/Server Set Up Questions

    Hi, I need help setting up my new Mac Pro including installing and configuring OS X Server (10.5) and setting up the appropriate IP and DNS settings. From reading various posts on this board, it seems like it can be quite complicated. I have no exper