Page 1 of 1

How could I get the page count of a document?

Posted: Mon Sep 23, 2019 8:58 pm
by aristeo
I'm trying get the page count with this code, but the message returns 0

with TDOCXReadWrite.Create(nil) do
try
LoadFromFile(Path);
ShowMessage(IntToStr(Editor.Pages.Count));
finally
Free;
end;

How could I get the page count of a document? Thanks.

Re: How could I get the page count of a document?

Posted: Thu Sep 26, 2019 8:35 am
by larsa
Hello

You must preview the document in order to get the page count. Pages don't exists until the document is paginated.

Re: How could I get the page count of a document?

Posted: Fri Mar 05, 2021 8:09 am
by eteoklis
Hello

Is it possible to <<preview>> the document in order to get the pagination working with out showing the actual preview form?

Thanks in advance

Re: How could I get the page count of a document?

Posted: Sat Mar 06, 2021 5:56 pm
by larsa
Hello

Open the file AXWPreviewVcl.pas and take a look at the procedure UpdateUI.

Re: How could I get the page count of a document?

Posted: Mon Mar 08, 2021 4:21 pm
by eteoklis
Hello

You have to direct us more. Or send us the code .

Thanks in advance