Add new block in FRDocument layout

  • 2.2K Views
  • Last Post 24 July 2014
RangarDX posted this 23 July 2014

Hi,

We are using ABBYY v9.0 in our product. Currently working on to upgrade ABBYY v11. While upgrading we are facing below issues. Please guide me to correct this issue.While adding the new block with text, the page structure is getting modified. If i export this document to text file getting "The logical structure of the page with index 0 is invalid. Please, perform document synthesis" exception. So I am not able to export the document to text file without synthesize. I am also not able to synthesize the document at this time. I am getting below error “.\Src\BriefText.cpp, 165.”Please guide me to fix this issue.I am using the below code to add the new block Set oBlock = pLayout.Blocks.AddNew(BT_Text, Region) 'oBlock.Region.AddRect 50, 50, 1000, 100

oBlock.GetAsTextBlock.Text.AppendEmptyParagraph
oBlock.GetAsTextBlock.Text.AppendEmptyParagraph
oBlock.GetAsTextBlock.Text.AppendEmptyParagraph
oBlock.GetAsTextBlock.Text.Paragraphs(1).Insert 0, GetPageStamp(iPageNo), Engine.CreateCharParams Thanks,Dhivya

Natalia Karaseva posted this 24 July 2014

Hi, Dhivya!

As for the "The logical structure of the page with index 0 is invalid" message: if you are working with a multi-page document in FREngine 11, you will have to perform document synthesis for the whole document at least once (using, e.g., the IFRDocument::Synthesize method). But if after the full document synthesis you need to make some changes to one page, you can then call Synthesize for that one page.

As for the “.\Src\BriefText.cpp, 165.” issue thank you very much for detailed description. We have reproduced this behavior. We will consult with our developers and hope it will be fixed soon. If you have other questions about this issue please contact support team of your region to dev_support@abbyyusa.com.

Close