We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Corrupt PDFs when CurrentCulture changed with Aspose.Pdf 6.4.0

We use Aspose.Pdf to concatenate PDFs. In an earlier release of our application we have worked with version 6.2, now we have upgraded to version 6.4.

The pdf concatenation is started form a web application where the users can choose the display language of the web UI. The Current Culture is set on the CurrentThread.

With release 6.4 we have the following issue: When the user chooses the UI language English (LCID 1033) everything is fine. When he changes the UI language to German (LCID 1031) (or French, Italian), the resulting PDFs are not correct. I get the following error messages when I open the generated PDF in Adobe Reader and the document could not be read:

“There was an error processing a page. There was a problem reading this document (110).”

When I make a file compare of two files that were generated from the same input pdfs, one time with LCID 1033 and one time with LCID 1031 I get such differences:

LCID 1033:


LCID 1031:


LCID 1033:

[/Separation/PANTONE#202955#20C 955 0 R<>]

LCID 1031:

[/Separation/PANTONE#202955#20C 955 0 R<>]

The files that are not working correctly are containing commas “,” instead of dots “.”.

var lcidStr = this.Request[UrlParameters.Lcid];

var lcid = 0;

if (lcidStr != null && int.TryParse(lcidStr, out lcid))


var cultureInfo = new CultureInfo(lcid);

Thread.CurrentThread.CurrentUICulture = cultureInfo;

Thread.CurrentThread.CurrentCulture = cultureInfo;


The concatenation is happening like this (code shorted):

List streams = new List();

// for each file:

streams.Add(new MemoryStream( /* file as byte [] */ ));

var mergedPresentations = ConcatenatePdfStreams(streams.ToArray());

// …

public byte[] ConcatenatePdfStreams(Stream[] fileStreams)


var pdfStream = new MemoryStream();

PdfFileEditor pdfFileEditor = new PdfFileEditor();

pdfFileEditor.Concatenate(fileStreams, pdfStream);

return pdfStream.ToArray();


-> Please escalate this issue to Priority Support

Hi Stefan,

Thank you for sharing the details.

Please share the template PDF files with us. This will help us reproduce your issue at our end and figure out soon.

Thank You & Best Regards,


I’ve opened the issue also in the priority support forum.

There I’ve attached a solution with input files to reproduce the behavior.

Best regards

Hi Stefan,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample application with template PDF files.

I am able to reproduce the issue you mentioned. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-32023. You will be notified against any update regarding your issue via this forum post.

Sorry for the inconvenience caused,

The issues you have found earlier (filed as 32023) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.