BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
Hello,
I have a large document (about 65 pages) with many sections and tables. Calling the UpdateDocumentFields call in order to have a correct Table Of Contents takes a very long time. Are there any possible tips and tricks to optimize this
Hi Natalie,
Based on the given details, we suspect that you may have called both
UpdateDocumentFields() to update fields and UpdateTableOfContents() to update
the table of contents. During these updates, internally the Word-to-PDF layout
engine is used to update the page numbers in the Word document, which can take
some time.
If you feel that the document update is taking too long, please share the
following details:
With
this information, we will check the possibility of reducing the time required
for the updating TOC.
Regards,
Dharanya.
Is it possible to get the page numbers of a section from syncfusion docio word document without converting to pdf? That way I could manually create the TOC rather than using the built in one.
Additionally, I have responded to the email for this support ticket from forum-support@syncfusion.com with a sample code project. Can you confirm that you received this via that email? Thanks.
Natalie,
Regarding “Is it possible to get the page numbers of a section from
syncfusion docio word document without converting to pdf? That way I could
manually create the TOC rather than using the built in one“:
The Word document is a flow document in which contents (paragraphs, tables,
etc.,) will not be preserved page by page; instead, the contents will be
preserved sequentially section by section. Word viewer/editor renders the
contents of the Word document page by page dynamically when opened for viewing
or editing. This page wise rendered information will not be preserved in the
file level. DocIO is a non-UI component that provides a full-fledged document
instance model based on the file level information of Word document. Therefore,
it is not feasible to get the section page number from a Word document using
DocIO.
Regarding “Additionally, I have responded to the email for this support ticket
from forum-support@syncfusion.com with a sample code project. Can you confirm
that you received this via that email? “:
We haven’t received the mail you sent. Could you please check if it was
sent to the correct address?
Regards,
Dharanya.
Yes, I sent it to forum-support@syncfusion.com which is the same email address that the ticket responses are coming from. I sent it on Tuesday at 3:41pm PST. Is that the correct address to send it to?
Natalie,
We have received and reviewed your sample. After generating the document contains 62-pages, we observed that updating it takes approximately 14 seconds. Please
see the screenshot below for reference.
We have reproduced
the reported problem “UpdateDocumentFields and UpdatetableOfContent takes a
long time when updating a document” in our end. We will validate this issue and update more
details within 2 days.
Regards,
Dharanya.
Natalia, still we are validating the reported problem in our end. We will update more details within 2 days.
Natalie,
We have found that the UpdateTableOfContents() function
takes approximately 14 seconds to execute. As we mentioned earlier, while
calling UpdateTableOfContents(), we are internally processing our Word-to-PDF
layout engine to update the page numbers in the Word document.
Upon initial investigation, the generated document contains nearly 130 tables
and 62 pages. It takes a considerable amount of time to layout these tables and
pages using our Word-to-PDF layout engine.
However, we are evaluating the feasibility of further reducing this time and
will share further details next week.
Regards,
Dharanya.
Natalie, as we mentioned in the
previous update, when calling the UpdateTableOfContents() function, we are
internally processing our Word-to-PDF layout engine to update the page numbers
in the Word document.
The
generated document contains a large number of tables (more than 130). While
invoking the Word-to-PDF layout engine, we iterate through each row of the
tables, as well as their cells, content, and formatting from the DOM, layout
them one by one. This is the architecture of our Word-to-PDF table layout
process. This is the considerable time to layout that number of tables in the
Word-to-PDF layout engine.
Regards,
Dharanya.