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