Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Sign PDF REST API

$
0
0
Hello, I am evaluating your REST API for use in our application.  Our workflow is pretty simple:  upload a document, sign the document, download the signed document and delete the document.  So far, things are looking promising.  

I am having some trouble, however, when I attempt to sign.  I have uploaded a test document named "Sample.pdf" into a folder named "test".  My routine then builds the signed URL for the sign document request:

http://api.aspose.com/v1.1/pdf/test/Sample.pdf/sign?appSID=****&signature=****

The request body is:

{
    "SignaturePath": "test.pfx",
    "SignatureType": 1,
    "Password": "****",
    "Appearance": "joe-client.png",
    "Reason": "Success",
    "Contact": "joe@test.com",
    "Location": "Texas",
    "Visible": true,
    "Rectangle": {
        "X": 100,
        "Y": 100,
        "Width": 400,
        "Height": 100
    },
    "FormFieldName": "Signature1",
    "Authority": "Joe Client",
    "Date": {
        "Links": null
    }
}

When I test this in Java, I receive the following stack trace:

java.io.FileNotFoundException: http://api.aspose.com/v1.1/pdf/test/Sample.pdf/sign?appSID=****&signature=****
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.****.****.aspose.DocumentController.sign(DocumentController.java:53)
at com.****.****.aspose.Program.main(Program.java:10)


When I test it through a browser, I receive the following message:

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.


From what I can tell of the documentation, I have formed the URL correctly based on the location of the PDF file but perhaps it has something to do with the values for the "SignaturePath" or "Appearance" properties.  There is no documentation showing that these files are sent as part of the request so I have uploaded them to Aspose in the root of my storage.  Do you have any ideas on what I am doing incorrectly?

One final and unrelated question:  is there a REST API to delete a document?  I didn't find any documentation.

Thanks much,
Erich Heard

Viewing all articles
Browse latest Browse all 3131

Trending Articles