AppendDocument without increasing total page count field

Hello, how do we append a document without increasing the total page count of the other document? consider the following code

var builder1 = new DocumentBuilder();
builder1.Writeln("doc 1");
builder1.InsertField("PAGE", default);
builder1.Write(" of ");
builder1.InsertField("NUMPAGES", default);

var builder2 = new DocumentBuilder();
builder2.Writeln("doc 2");

builder1.Document.AppendDocument(builder2.Document, default);

this will print the first page as

doc 1
1 of 2

is there any way we could have it print “1 of 1” instead?

Thank you,
Jan

@gojanpaolo,

Please refer to the following section of documentation:
Retaining Multiple Page Numbering Schemes when using the NUMPAGES Field

Hope, this will help in achieving what you are looking for.

Thanks @awais.hafeez! It looks like using SECTIONPAGES works for us. we’ll take a closer look at using PAGEREF instead for a more robust solution.

@gojanpaolo,

Sure. Please let us know if you have any troubles and we will be glad to look into this further for you.