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

Free Support Forum - aspose.com

Error PDF to Docx - c# NET core

API .Net Core 3.1 - Docker

Trying PDF to Docx:


// Aspose Pdf document to save into word
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(memoryStreamPDFFile);

// output Memorystream
MemoryStream outputMs = new MemoryStream();

// memorystream PDF to WORD
pdfDocument.Save(outputMs, Aspose.Pdf.SaveFormat.DocX);

byte[] b = outputMs.ToArray();

return b;

Exception:

Error:
Value cannot be null. (Parameter ‘key’)

Inner Exception:

at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)

at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)

at #=zNawrcDrnSEee$MjqH3JyuoW2OWHiXby$QA==.#=zMuYqLfU=(#=zgBaXOuo= #=zhGxDZT0=)

at #=z9DiL2QZ0kYIGZ6COT76ebT4DMLjzSWV4hA==.#=zQXXu9OUp_drb`2.#=zTfhZsfm9_Vwt(#=zgBaXOuo= #=zhGxDZT0=, #=zBHP90$U=& #=zK0PB78E=)

at #=zhfFzHyoLjgGM8gSKVriSUTIGGhpcJUm6FHOAbkE=.#=z0tiU5y52MDry(#=zVFJ2an3uzvnf8npQrQteGbcskn8L #=zuMWPc9wntIxQ)

at #=zvaP52qSylGBC3Nbwnn5COmPUpR4wbn0Nubpw$AL_dBZb.#=zFEBNoM_QlKIt()

at #=zvaP52qSylGBC3Nbwnn5COmPUpR4wbn0Nubpw$AL_dBZb.#=zt8HR8rY=()

at #=zQ1QRfnYGY_Cf6TD93PUWH$ywpSJCHHAX6VHK60NvO0CI.#=ztFDpuUo=(#=zLddFn9Q2DICjd859gbl8nwmP8mvQ #=zWSWMwpI=, #=zELMwkqufAmt6AlqpGYl3U96Ze5J8rVt7VQ== #=zrKM3PGU=, #=zIiLJFlmpyWhFpRxTGDlVzgjD$q0YZ_iIoFA_ygw1OswO #=zm3eKfM0=)

at #=zHE0hpllHKmxdg7IfhSSuNVtcFIS0wmiEBg==.#=z9eyn$ls=(Int32 #=zVB1rgdk=, IList`1 #=ztUv4fQKA$K5gWEGxgg==, #=zgu2311$AmpO2 #=zMcH9ap0=)

at #=zHE0hpllHKmxdg7IfhSSuNVtcFIS0wmiEBg==.#=ztFDpuUo=()

at #=zIQshx$k1WL1J5YDCvS_Lkwn0kV4e.#=zvR9KMq4aEDHn(Document #=zWSWMwpI=, #=zIiLJFlmpyWhFpRxTGDlVzgjD$q0YZ_iIoFA_ygw1OswO& #=zrpHMiH8dF7sWN4Ojkg==, UnifiedSaveOptions #=z48c_1lM=, Int32& #=z4CoMxxO3EEJD, Boolean #=zxe8hevM=)

at #=zIQshx$k1WL1J5YDCvS_Lkwn0kV4e.#=zLu0vit7_hyx5s4K_Kg==(Document #=zEf3DAEXah6Y7, #=zIiLJFlmpyWhFpRxTGDlVzgjD$q0YZ_iIoFA_ygw1OswO& #=zm3eKfM0=, UnifiedSaveOptions #=z48c_1lM=, Int32& #=zdrvoQ9Lw2IfX, Boolean #=zxe8hevM=)

at #=zBPyAG7Fx6bTHkkHdmJHwVng=.#=zmuvS0so=(Document #=zWSWMwpI=, Stream #=zzLWoftMiV2$R, DocSaveOptions #=z48c_1lM=)

at Aspose.Pdf.Document.#=zxUcMrARBMU09(Stream #=zzLWoftMiV2$R, SaveOptions #=z48c_1lM=)

at Aspose.Pdf.Document.#=zxUcMrARBMU09(Stream #=zzLWoftMiV2$R, SaveFormat #=zP07Vl5E=)

at Aspose.Pdf.Document.Save(Stream outputStream, SaveFormat format)

at EAVM.Report.BLL.ReportService.GetWORDFromPDF(MemoryStream memoryStreamPDFFile) in C:_work\Projects\EAVM_MSA\EAVM.Report\EAVM.Report\BLL\ReportService.cs:line 338


Any idea??

@alejandroaspose

It seems to be an issue with PDF file while saving to Docx. Can you please share the source file reproducing the issue on your end.

Hello, thank you for your quick reponse.

Here is the pdf I am trying to transform into docx:

report_futuro.pdf (930.9 KB)

(There is no problem using ASPOSE Online PDF converter.)

Thanks and regards

@alejandroaspose

I can not reproduce the issue with latest version of API. I request you to upgrade and share your feedback.