Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Jun 30, 2017 6:15 am

Hi
I have a system that allow you to upload PDF and PDF/A files. Upon uploading, if the file is PDF it will convert it to PDF/A then upload to FTP server and if the file is PDF/A already it will just upload to the FTP Server. It works great on my local machine. But when I deploy my system to our repository, converting PDF to PDF/A will result to Access is Denied also, uploading PDF/A works OK.

Here are the version of files that i'm using
Spire.License : Version 1.3.2.40
Spire.Pdf : Version 3.2.52.56040



Here is my Code

PdfDocument originalDoc = new PdfDocument();
originalDoc.LoadFromFile(localFile);

PdfNewDocument newDoc = new PdfNewDocument();
newDoc.Conformance = PdfConformanceLevel.Pdf_A1B;

foreach (PdfPageBase page in originalDoc.Pages)
{
SizeF size = page.Size;
PdfPageBase p = newDoc.Pages.Add(size, new PdfMargins(0));
page.CreateTemplate().Draw(p, 0, 0);
}

newDoc.Save(completeFilePath);
Process.Start(completeFilePath);

return completeFilePath;

Looking for you fast response ..

oracle000
 
Posts: 3
Joined: Fri Jun 30, 2017 1:58 am

Fri Jun 30, 2017 7:41 am

Hello,

Thanks for your inquiry.
Please make sure you have the the right to access the path that the file saves to.
If I misundertand your requirement, please share more detials and write back.

Sincerely,
Jane
E-iceblue supprt team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Fri Jun 30, 2017 8:14 am

This solve my issue regarding on Access is Denied ..

Could solve the problem by simply calling Process.Start("explorer.exe", pathToFolder); instead of Process.Start(pathToFolder);

check link for resources :
https://stackoverflow.com/questions/346 ... ess-denied


Thanks

oracle000
 
Posts: 3
Joined: Fri Jun 30, 2017 1:58 am

Fri Jun 30, 2017 8:57 am

Hello,

Glad to hear you have resolved the issue and many thanks for sharing the solution.
Please do not hesitate to contact us if you need any help.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.PDF