Hi,
We have azure file share which is being mount to linux container. I have c# .net core api where I am writing pdf files using aspose.pdf but issues its able to create the pdf file in shared location but while writing the content to the file its throwing exception as ‘access to path is denied’.
But there is no problem with aspose.words, I am able to write word files successfully to the azure file share.
Can someone please help here asap. we have been struggling since 3 weeks.
Any quick help would be much approciated.
Thanks
@kunal.karekar
If possible, can you please share the sample code snippet that you have been trying along with other necessary information that can be helpful in replicating the issue? Please also try using Aspose.Pdf.Drawing 24.4 instead of (if you are using) Aspose.PDF for .NET 24.4. We will further proceed with the investigation accordingly.
Here is the sample code
foreach (var group in groupOfFiles)
{
Aspose.Pdf.Document mergedDocument = new Aspose.Pdf.Document();
// Iterate through each PDF byte array
foreach (var pdfByteArray in group.Value)
{
// Create a MemoryStream from the byte array
stream = new MemoryStream(pdfByteArray);
// Create a Document object from the MemoryStream
Aspose.Pdf.Document inputDocument = new Aspose.Pdf.Document(stream);
// Append pages from the input document to the merged document
mergedDocument.Pages.Add(inputDocument.Pages);
}
try
{
mergedDocument.Save(group.Key);
}
catch (Exception ex)
{
logger.LogError($"Error whhile saving pdf using aspose: {ex.Message}");
}
}
@kunal.karekar
Would you please confirm the version of the API for our reference as well?
we are using .netcore 3.1
@kunal.karekar
Thanks but we asked about the Aspose.PDF version that you are using.