Trailer object is null

Hi All,We are using Aspose.Pdf 4.0.0,when we tried to merge pdf we are getting the below exception

.FATAL ERROR: System.NullReferenceException: Trailer object is null.:v3.5.0.0 at xeb116a323308e2f7.x7759a935a2782a02.rebuildXref() atxeb116a323308e2f7.x7759a935a2782a02.readPdf() atAspose.Pdf.Kit.PdfFileEditor.x2f6504d9cec3db1e(Stream[] xbdeb1e89c00b5b84) atAspose.Pdf.Kit.PdfFileEditor.Concatenate(Stream[] inputStreams, StreamoutputStream) at v

I read earlier post http://www.aspose.com/community/forums/190955/pdf-kit-concatenate-fails-trailer-object-is-null/showthread.aspx

http://www.aspose.com/community/files/51/.net-components/aspose.pdf.kit-for-.net/entry205608.aspx

Problematic
URL: http://www.hkexnews.hk/listedco/listconews/sehk/20110314/LTN20110314021.HTM

Above
URL contains 36 pdf files, we are trying to club all these files into one
single PDF.

We have already a later version,Can you please look into this.We have already a later version,Can you please look into this.

Hi Gopi,

I have tested the issue at my end using the latest version and the files you shared, however I couldn’t reproduce any such problem. I have used the following code snippet for testing purposes.

//create file stream array

FileStream[] files = new FileStream[36];

int tempCounter = 101;

//fill in the streams array

for (int index = 0; index < 36; index++)

{

files[index] = new FileStream(“E” + tempCounter.ToString() + “.pdf”, FileMode.Open);

tempCounter++;

}

FileStream output = new FileStream(“output.pdf”,FileMode.Create);

//concatenate files

PdfFileEditor fileEditor = new PdfFileEditor();

fileEditor.Concatenate(files, output);

Please use the latest version and try at your end. If you still find any issue then please share a sample application which can help us reproduce the issue. Moreover, also provide the details like OS and .NET Framework version etc. We’ll further investigate this issue and guide you accordingly.

We’re sorry for the inconvenience and looking forward to help you out.
Regards,

Hi,

Still it was reproducing same excepiton as "
Trailer object is null.: v3.5.0.0".

I tried with the latest version 5.4.0 Aspose.pdf.kit,

we are using .net 4.0 and windows 2008 R2 64 bit OS.

problametic url is

http://www.hkexnews.hk/listedco/listconews/sehk/20110314/LTN20110314021.HTM

Thanks,

Gopi

Hi Gopi,

Thank you very much for sharing further details. We’ll test this issue using your particular scenario and update you accordingly.

We’re sorry for the inconvenience.
Regards,

Thanks for quick response

Last time, dll is not really updated to latest. So reproduced same exception

Now,I tested with 5.4.0.0 working fine,no issues,

Thansk,

Gopi

Hi Gopi,

I’m glad to know that this issue is resolved at your end. If you find any further questions, please do let us know.

Regards,