I remember fighting this one. In reality 4D write pro does a pretty good job of 
working around this depending on how to create the document. You can set a few 
flags on your text to stop Write pro from doing this.

https://doc.4d.com/4Dv16/4D/16/Using-a-4D-Write-Pro-area.200-3048088.en.html 
<https://doc.4d.com/4Dv16/4D/16/Using-a-4D-Write-Pro-area.200-3048088.en.html>

Windows and Orphan control. 

To get your page count you can use WP Get Page Count if you want a total page 
count.

I use this to generate  the page x of y in my Write Pro documents in the 
footer. This appends a page X of Y to the footer of my document object. Then I 
let Write Pro Pagination handle the count.

  // Create my page number text
$pageNumber:="-  of  -"
ST INSERT EXPRESSION($pageNumber;"String($wp_pageCount)";7;7)
ST INSERT EXPRESSION($pageNumber;"String($wp_pageNumber)";3;3)
  // $pageNumber:=Char(Line feed)+$pageNumber

$pageNumberWP:=WP New
ST SET TEXT($pageNumberWP;$pageNumber)
WP SET ATTRIBUTES($pageNumberWP;wk text align;wk center)
WP SET ATTRIBUTES($pageNumberWP;wk font;"Times")
WP SET ATTRIBUTES($pageNumberWP;wk font size;9)
$pageNumberRange:=WP Text range(protocolFooter;wk end text;wk end text)
WP INSERT DOCUMENT($pageNumberRange;$pageNumberWP;wk append)


> On Sep 3, 2019, at 5:07 PM, Charles Miller via 4D_Tech <[email protected]> 
> wrote:
> 
> Hi All,
> 
> we use 4D write extensively and have many issue trying to convert.
> 
> For example, we need to know the total number of pages to be printed
> so that we can have page 1 of x etc on each page
> 
> We change the style based upon the data
> 
> We need to see what fits on a page and if not enough insert page break
> so that there is never Header with no detail at bottom of page
> 
> We sometimes need to insert text and particular styles in the the
> middle of the document. The list goes on.
> 
> FYI there are many pictures printed as well
> 
> Any ideas how we might proceed? Does anyone know 4D's plans re
> implementing all 4D write features in 4D write pro and if so when that
> might occur.
> 
> -- 
> -----------------------------------------------------------------------------------------
> Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
> Informed Solutions, Inc.
> Brookline, MA 02446 USA Registered 4D Developer
>       Providers of 4D, Sybase & SQL Server connectivity
>          https://www.informed-solutions.com
> -----------------------------------------------------------------------------------------
> This message and any attached documents contain information which may
> be confidential, subject to privilege or exempt from disclosure under
> applicable law.  These materials are intended only for the use of the
> intended recipient. If you are not the intended recipient of this
> transmission, you are hereby notified that any distribution,
> disclosure, printing, copying, storage, modification or the taking of
> any action in reliance upon this transmission is strictly prohibited.
> Delivery of this message to any person other than the intended
> recipient shall not compromise or waive such confidentiality,
> privilege or exemption from disclosure as to this communication.
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to