WPCubed Product Support

Page breaks while merging

I am handling a mail merge by loading a template into one wprichtext, merging, then appending that to a second wprichtext. After the first page, in the first textbox, I am moving to position(0,0,0,0) and adding inputstring(#12). This works for page breaks, but it appears to move the text down one line. So, the first page is set, all other pages look identical but are pushed one line down. What is the best way to handle this?

Thanks

#1 ♥ 0
8.9k Views 2 users read 2 min

I found a way to make it work. I added the #12 to top of the original template after the first page was merged and appended.

#2 ♥ 0

That worked on one example, but not another. I tried the fastsetpagebreak, but with my templates, it takes the last line and starts that on the new page instead of starting the new page after that last bit of text.

#3 ♥ 0

Lastly, this is code that I am converting from WPTools 4 to 7. It worked in 4 by breaking without the top of the text moving down on subsequent pages. I had to make some changes to handle 7, but this bit is pretty close to the same.

#4 ♥ 0
support

Yes, InputString(#12) will insert a page break.

BTW: Since WPTools 5 the WPReporter does not measure the page and so it does not create page breaks according to contents.

But it will use hard page breaks, #12, from the template.

#5 ♥ 0

Yes, it is inserting the page break fine. The problem is that whenever I use #12, it not only inserts a page break, but it also causes the next page to begin further from the top than the first page. So pages 2-the end start about 1 line further down the page than the original first page.

#6 ♥ 0

InputString(#12) adds line breaks, fastsetpagebreak places the pagebreak before the last line. What worked for me was the fastappendtext with the [wpCreateNewPage] option. Thanks for your time.

#7 ♥ 0
This category is archived. No new posts are possible.