Is there a way to search for (and remove) all manual page breaks?

Please post all questions relating to Help & Manual 6 here!

Moderators: Alexander Halser, Tim Green

Post Reply
Posts: 1
Joined: Mon Feb 12, 2024 11:26 pm

Is there a way to search for (and remove) all manual page breaks?

Unread post by Stefanie_N »

I'm working with Help & Manual projects that are generated as PDF user guides, and past writers have inserted MANY manual page breaks that often become inappropriately placed when content is edited. Is there a quick way to locate all manual page breaks in all topics--and possibly also to remove them? I thought maybe I could type a code for a special character in the Find/Replace box, but I've no idea what the code for a manual page break might be.
User avatar
Tim Green
Site Admin
Posts: 23174
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Is there a way to search for (and remove) all manual page breaks?

Unread post by Tim Green »

Hi Stefanie,

You can't do this from within Help+Manual itself, but it's very easy to do on the XML topic files using any editor that can search and replace in multiple files, like the excellent free Notepad++. To do this, your project has to be saved in the uncompressed HMXP format, and if you are still using single-file HMXZ projects this would be a great time to switch. Uncompressed projects are much more efficient, support more features and unlike single-file compressed a Windows crash can't damage your entire project.

So if you haven't already, first select Save As in the File menu, choose the uncompressed format and save to an empty folder. In the new uncompressed version, go to Configuration > Common > Project Search Path and change the path references to your image file folders so that Help+Manual can still find them. This would also be a good time to move your image files to subfolders of your project folder, because then you can move the entire project around without changing the project path references, which are relative internally.

To locate the page breaks, you then need to perform a multi-file search on the XML topic files in the \Topics subfolder of your project folder and look for:

Code: Select all

If you want to remove all the breaks, you just need to delete that everywhere it occurs. There is a small gotcha, however; It is possible that this may have been combined with some manual paragraph formatting in some places. So after performing your first search, you then need to search for:

Code: Select all

on its own, because it may be included in a statement like

Code: Select all

style="margin-top:10px; page-break-before:always;"
So you need to check for those manually. Don't be tempted to just search and replace page-break-before:always; on its own first, however, because that would leave orphaned empty style statements, which would not be corrected until Help+Manual re-saves each of the affected topics.
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply