I am getting this error when merging two pdf documents. The code works fine for many different combinations of pdf documents. But forsome reason it fails for 2 particular pdfs. This is the stack trace from the error..
Index was outside the bounds of the array.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[IndexOutOfRangeException: Index was outside the bounds of the array.]
zz93.j.a(Int32 A_0) +17
zz93.qi.a(Int32 A_0, Int32 A_1, StructureElement A_2) +15
ceTe.DynamicPDF.StructureElement.DrawPreTag(PageWriter writer, TaggablePageElement taggablePageElement) +434
ceTe.DynamicPDF.PageElements.Label.a(PageWriter A_0) +231
ceTe.DynamicPDF.PageElements.Label.DrawRotated(PageWriter writer) +159
ceTe.DynamicPDF.PageElements.RotatingPageElement.Draw(PageWriter writer) +198
ceTe.DynamicPDF.PageElements.Group.Draw(PageWriter writer) +229
ceTe.DynamicPDF.Page.c(PageWriter A_0) +35
ceTe.DynamicPDF.Merger.AppendedPage.a(DocumentWriter A_0, Int32 A_1, Int32 A_2) +328
ceTe.DynamicPDF.Merger.AppendedPage.DrawEntries(DocumentWriter writer, Int32 pageNumber, Int32 sectionPageNumber) +946
ceTe.DynamicPDF.Page.a(DocumentWriter A_0, Int32 A_1, Int32 A_2, Int32 A_3) +203
zz93.o2.d(Int32 A_0) +169
zz93.o2.s() +610
ceTe.DynamicPDF.Document.Draw(Stream stream) +1722
ceTe.DynamicPDF.Document.Draw(String filePath) +42
pdfGenerator.PageGenerator.GetServicePack(OrderInfo iServicePack, String sFilePath) +6477
pdfGenerator.PageGenerator.GenerateServicePackDocument(String DealerID, String OrderNo, String sFilePath) +50
pdfGenerator.PageGenerator.CreateServicePack(String DealerID, String OrderNo, String sFilePath) +49
Dealerpoint.ServicePack.Forms.ServicePackDetails.PrintSheets() +2017 Dealerpoint.ServicePack.Forms.ServicePackDetails.grdObj_InitializePostBack(Object sender, PostbackEventArgs e) +189
Index was outside the bounds of the array
Re: Index was outside the bounds of the array
Support · Aug 7, 2012Hello,
Can you please try using the latest version 7 DynamicPDF dll file in your application and see if it works for you? You can download latest DynamicPDF file by logging into our CustomerArea
using your version 7 product serial number. Remove reference for the old dll file and reference the latest downloaded dll file in your application.
If you are evaluating the product then you can download latest from our website
.
If you continue getting the error even after using the latest DynamicPDF dll file then please send over the following details to our [^a|mailto:support@cete.com|opennewwindow| support ^] team so that they can look into it further.
1. Exact version and build number of the DynamicPDF dll file.
2. Input PDF documents with which you are getting error.
3. Full stack trace of error message.
4. Sample code which you are using.
Thanks,
ceTe Software Support Team.
Re: Index was outside the bounds of the array
Forum member · Nov 12, 2012We had the same issue recently and found that it was to do with a bookmark that was on an image that was being imported.
Hope this helps.
Re: Index was outside the bounds of the array
Support · Nov 13, 2012Hello,
The error reported in this thread is most likely caused by the PDF document this being merged. In order for us to troubleshoot this further we would need a copy of the PDF document and the information we have requested above in our previous post.
Thanks,
ceTe Software Support Team.