Jump to content

Split PDF into separate pages by SubSummary while in Preview Mode

Recommended Posts

I have a multi-page printout which is split with a page break for each sub summary part.  


Imagine for example a room inventory list where each room gets its own page.  I'd like to save these as separate PDF files, so each room has it's own file, e.g.





One way to do this is simply loop through the room numbers, and for each room do a Find / Sort / Preview Mode / Save as PDF.


But I'm curious if this can be done a different way - what if I already am in Preview mode with a report showing all rooms (where there's a sub summary page break).

Is there any way at this point to loop through in Preview mode and save each page into it's own PDF file?


I can almost get it working like this:

Find Record


Enter Preview Mode
  set variable $roomNumber = Rooms::RoomNumber
  set variable $startPage = Get(PageNumber) 
  set variable $endPage = $startPage + 1 
  set variable $file = "Room Number" & $roomNumber
  Save Records as PDF (output file=$file,  options/include specific page: from $startPage to $startPage+1
  go to next page, exit after last
End Loop


Two problems:

1. unfortunately, since I'm in Preview mode, Rooms::RoomNumber never changes, it's always showing the value on the first record in the found set, regardless of what page I'm on.

2. if the report is more than one page long for a given room, I need to figure out what $endPage should be.




Share this post

Link to post
Share on other sites

Thanks - it looks like that solution switches between Preview and Browse mode, which may be the only way to do it.

I ended up scripting something somewhat similar:  in Browse mode go record-by-record until I find that the RoomNumber has changed.  Then make a new window, Constrain the found set to that single room number, save as PDF then close the window.   

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Who Viewed the Topic

    1 member has viewed this topic:
    Nico Kobes 
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.