When a document with NumPages field in header or footer is exported to PDF, NumPages field is evaluated wrongly - 1 for the first page, 2 for the second page, etc. The bug is regression, introduced with R3 2017 SP1 (2017_3_1018). Fix available in LIB Version 2017.3.1211.
Please fix it.