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

Free Support Forum - aspose.com

Error Converting Word Document to PDF

Hi,


From yesterday we have started getting an error on our production environment, every time we are trying to convert a word document to PDF. We can see the actual PDF document but an error is getting logged in our error log. Below is the stack trace for the error, can you please have a look and let me know if it is some error on your side.

Resume not added for :bf81afa3b24e57e4a91cf934ec8f331c, for candidate : 120107307–{“Message”:“Error ‘The specified file does not exist.’, Bucket ‘afc-filestorage’, FilePath ‘10632/2a16e5f6-b9ca-4900-9128-c9db041a9859/candidateconvertedpdfs/06f39c55-51de-46c0-9345-6335807c969b.pdf’”}-- at Aspose.Cloud.Common.ServiceController.GetResultStream(String apiUrl, String appSid, String appKey, String requestType, Byte[] byteArray) at Aspose.Cloud.Common.ServiceController.GetResultString(String apiUrl, String appSid, String appKey, String requestType, Byte[] byteArray) at Aspose.Cloud.StorageService.FileClass.UploadCopyFile(String path, String newdest, String destStorage, Int32 versionID, String storage) at LiveCareer.Utility.Base.Enterprise.PdfGenerator.PdfGenerator.CreateNewPDFDocumentForOtherFormat(String convertFromFile, String convertFromFolder, String PathToFileConverted, String asposeStorageName) at LiveCareer.Utility.Base.Enterprise.PdfGenerator.PdfGenerator.ConvertFileToPDF(String convertFromFile, String convertFromFolder, String convertToFolder, String targetfilename, String format, String asposeStorageName) at JobTap.Seeker.Process.DocumentProcess.ImplementAsposeStorage(CandidateResume candidateResume, String blobname) in c:\Mercurial\Jobtap\seeker\JobTap.Seeker\JobTap.Seeker.Process\DocumentProcess.cs:line 283 at JobTap.Seeker.Process.DocumentProcess.AddCandidateResume(CandidateResume candidateResume) in c:\Mercurial\Jobtap\seeker\JobTap.Seeker\JobTap.Seeker.Process\DocumentProcess.cs:line 234 at JobTap.Seeker.Process.ApplicationProcess.AddCandidateResume(Application application) in c:\Mercurial\Jobtap\seeker\JobTap.Seeker\JobTap.Seeker.Process\ApplicationProcess.cs:line 826 at JobTap.Seeker.Process.ApplicationProcess.<>c__DisplayClass7.b__5() in c:\Mercurial\Jobtap\seeker\JobTap.Seeker\JobTap.Seeker.Process\ApplicationProcess.cs:line 443

Thanks,
Ratan

Hi Ratan,

Can you please confirm the following points?

1. Are you getting the correct output PDF?

2. Are you not calling any code other than Word to PDF and still the errors are logged?

Please also share your App SID and Key for further investigation. You can follow http://www.aspose.com/corporate/purchase/faqs/send-license-to-aspose-staff.aspx to send your keys.

Best Regards,

Yes we are getting the correct output file.

We are not calling any other code apart from converting from word to pdf. From the stack trace it’s evident that the error is being generated by ASPOSE.

Hi Ratan,

The issue is under investigation. We will update you soon.

Best Regards,

Hi,


Just to give you more information, we had following 2 lines of code

wordsService.ConvertDocument(convertFromFile, WordOutputFormat.Pdf, convertFromFolder, PathToFileConverted, asposeStorageName);

storageService.File.CopyFile(PathToFileConverted, PathToFileConverted, asposeStorageName);

The error was getting generated by the CopyFile method and we realized that this is not required for us any more. However would still be interested in knowing as why will it suddenly start failing. We have been using this code from a long time and never had this issue.

for now, we have commented out the code for CopyFile and everything is working as expected.

Thanks,
Ratan

Hi Ratan,

The source and destination parameters in CopyFile method point to same location and name so copying the file to same name and location does not make sense as the file is already present there. Using CopyFile in this case is not recommended as it is wasting resources.

Regarding the exception in your logs, can you please share which values you passed to ConvertDocument method when CopyFile produced error?

Best Regards,