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

Free Support Forum - aspose.com

Sign converted docx to pdf

I am trying to sing a pdf obtained from converted docx document.

The sample code is this:

const string Sid = “sid”;
const string Key = “key”;
var destinationFileExtension = WordOutputFormat.Pdf;
var inputFilePath = @“C:\document.docx”;
var destinationFileName = “document-signed.pdf”;
var folder = “Conversions”;
new WordsService(Sid, Key).ConvertDocument(destinationFileExtension, Path.Combine(folder, destinationFileName), inputFilePath);
var signature = new PDFSignature { Date = DateTime.Now.ToString() };
new PDFService(Sid, Key).SignDocument(destinationFileName, folder, signature);

I get always the same error:

"Invalid Amazon S3 file path…"

Where is the error?

Thank you in advance
Hi there,

Thanks for your inquiry. Please note usually the error arises when referred file is not present on Aspose for Cloud storage. You should upload input PDF file and signature file to Aspose for Cloud storage before calling this API. And secondly the name of input PDF file and signature file should also be correct according to the files uploaded.

Please double check the availability of input PDF and Signature files at Aspose for Cloud storage, hopefully it will resolve the issue.

Best Regards,

with my code the converted document, from document.docx to document-signed.pdf is present on folder "Conversions", after apply ConvertDocument of WordService (i have check with new StorageService(Sid, Key).Folder.GetFilesList(folder) method) but the sign of document fails anyway.

Do you have tried my sample code?

Thank you

Hi there,

Thanks for your inquiry. I am afraid I am unable to test your sample code as it is incomplete, you need to set signature properties as per your certificate file. Please check SDK example on this documentation link.

Please share your complete code and sample documents (DOCX and certificate file (pfx)), so we will test your code and provide you information accordingly.

We are sorry for the inconvenience caused.

Best Regards,