Aspose PDF 10.0.0.0 component errors

Hi,

we are using several ASPOSE components for our project but we have an issue with

Aspose PDF 10.0.0.0 component. We are getting following errors:

"The process cannot access the file ‘2015_Preisanpassung_117781_266393_2015-11-06-14-21.pdf’ because it is being used by another process."

and

"Error in save single document. Filepath with name: \ServerName\Vertrieb\Kundenzentrum\Aktionen\Preisaktion 2015_2016\Kampagnendokumente\T_S313KWKY\2015_Preisanpassung_117781_266393_2015-11-06-14-21.pdf"

this error happens when component tries to merge and create single pdf document.

Thanks for your help in advance!

Hi Patrick,


Thanks for your inquiry. Please share your sample code and document here, so we will test the scenario and will guide you accordingly.

Moreover, are you merging PDF documents in a multi-threaded environment? as the issue can be happened in multithreading. Aspose APIs support multithreading but these are multi-thread safe as long as only one thread works on a document at a time. If you manipulate a single document in different threads, the results would be unstable.

We are sorry for the inconvenience caused.

Best Regards,

Hi Ahmed,

thanks for your response. We did some more analysis and came to the following conclusion. This locking issue happens after Component creates merged PDF document in the file system and Ghostscript is called to pickup the document for changing all the different fonts into one common font.

The whole process works like this; we get multiple documents with different fonts, Aspose PDF component merges these documents into one. But the final merged PDF contains multiple fonts, so we use Ghostscript to convert all the fonts into to one common font. Before we were just closing the stream used by the component and handing over file to Ghostscript and that is where often locking exception was raised. Now we changed it to explicitly disposing filestream before calling Ghostscript. It is still in testing so cant confirm now if it is fixed.

I have following question: Is it possible to convert all the fonts to one common font in the Aspose PDF component? If yes then please let me know how to do it? This way we will not need Ghostscript anymore.

Thanks a lot for your support and time.

Hi Patrick,

ITVT GmbH:

thanks for your response. We did some more analysis and came to the following conclusion. This locking issue happens after Component creates merged PDF document in the file system and Ghostscript is called to pickup the document for changing all the different fonts into one common font.

The whole process works like this; we get multiple documents with different fonts, Aspose PDF component merges these documents into one. But the final merged PDF contains multiple fonts, so we use Ghostscript to convert all the fonts into to one common font. Before we were just closing the stream used by the component and handing over file to Ghostscript and that is where often locking exception was raised. Now we changed it to explicitly disposing filestream before calling Ghostscript. It is still in testing so cant confirm now if it is fixed.

Thanks for sharing your finding. Hopefully changes will help you to resolve the issue. However if the issue persist then please share some sample code for testing, so we will look into it and guide you accordingly.

ITVT GmbH:

I have following question: Is it possible to convert all the fonts to one common font in the Aspose PDF component? If yes then please let me know how to do it? This way we will not need Ghostscript anymore.


Yes you can replace PDF document fonts in existing PDF document using Aspose.Pdf. Please check following documentation link for the purpose, it will help you to accomplish the task.


Please feel free to contact us for any further assistance.

Best Regards,