PageCount getting error

Technical support for Spire.Doc

Moderator: iceblue support

PageCount getting error

Postby sserra » Mon Jul 10, 2017 2:13 pm

Hi,
Some times when I create new document , I try get PageCount and getting error

!!!!!Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

7/8/2017 2:15:28 PM :
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.List`1.System.Collections.IList.get_Item(Int32 index)
at Spire.Doc.Collections.RowCollection.get_Item(Int32 index)
at sprбёњ.бњЃ()
at sprбёњ..ctor(Paragraph A_0)
at Spire.Doc.Documents.Paragraph.CreateLayoutInfo()
at Spire.Doc.DocumentBase.Spire.Doc.Layout.IDocumentBase.get_LayoutInfo()
at sprвљ·.бњ‚(Paragraph A_0)
at spr⚷.ᜅ(spr♇ A_0)
at spr⚷.ᜊ(spr♇ A_0)
at sprвљ·.бњЂ(RectangleF A_0)
at spr⚷.ᜄ(spr♇ A_0)
at sprвљ·.бњЂ(RectangleF A_0)
at sprбё™.бњЂ(sprбџІ A_0, sprв•Ђ A_1, sprбЁ¬ A_2)
at sprбЄё.бњ’()
at sprбЄё.бњЂ(Document A_0)
at Spire.Doc.Document.бњ»()
at Spire.Doc.Document.get_PageCount()
sserra
 
Posts: 10
Joined: Tue Jun 13, 2017 4:03 pm

Re: PageCount getting error

Postby Betsy.jiang » Tue Jul 11, 2017 1:31 am

Dear sserra,

Thanks for your inquiry.
Please offer us the input document to help us investigate this issue.

Thanks,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1527
Joined: Tue Sep 06, 2016 8:30 am

Re: PageCount getting error

Postby sserra » Tue Jul 11, 2017 8:40 pm

I can, but it does not make sense, because PageCount works when i save document and after open it again.
It does not when I create a file user MergeFields and get PageCount before save document.
sserra
 
Posts: 10
Joined: Tue Jun 13, 2017 4:03 pm

Re: PageCount getting error

Postby Betsy.jiang » Wed Jul 12, 2017 3:10 am

Dear sserra,

Thanks for your response.
Sorry that I am not quite clear about the meaning of "I create a file user MergeFields and get PageCount before save document."
Could you please offer us the code you were using for testing ?

Many thanks,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1527
Joined: Tue Sep 06, 2016 8:30 am

Re: PageCount getting error

Postby sserra » Thu Jul 13, 2017 2:37 pm

Hi,
i can't because it part of my service.
newer mind, it's not critical now.

thank you
sserra
 
Posts: 10
Joined: Tue Jun 13, 2017 4:03 pm

Re: PageCount getting error

Postby Betsy.jiang » Fri Jul 14, 2017 1:23 am

Dear sserra,

Thanks for your feedback.
You could send the code to us(support@e-iceblue.com) via email, we promise to keep it confidential and won’t use it for any other purpose. After receiving the code, we will look into it and give you reply.

Many thanks,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1527
Joined: Tue Sep 06, 2016 8:30 am


Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 0 guests