Hi everyone
I want integrate my system with LogicalDoc. I want get the documents use the REST API, I use example the getContent service an only return the document in application/octet-stream,but I want download the document in the specific format, example .pdf. The other service getDocument , return JSON or XML but only with the document information.
The solution I found is created a interface with java , call the getContent and transform the content to pdf
My applicaction > interface > LogicalDoc
pdf < convert < application/octet-stream
LogicalDoc dont have this utility and I dont need created a interface to convert ?
Best Regards
Diego
REST API - Get Document PDF
Moderator: car031
- admin
- Site Admin
Post
Re: REST API - Get Document PDF
Hi Diego,
currently through REST methods you can not convert a document from one format to another,
but using the SOAP web services you can request the conversion of a document to PDF and then download it.
The methods to invoke are 2:
createPdf -> performs the creation of a PDF resource if it doesn't exist yet (conversion)
getResource -> returns the requested content resource (if it exists)
See also the documentation online http://docs.logicaldoc.com/en/web-services-api
Please note that conversion to PDF is only available in commercial versions of LogicalDOC, not in the Community edition.
We may eventually bring these 2 methods to the REST API, but we are planning to introduce a new Enterprise Web Service that will include a generic method to convert a document from one format to another
Cristian
currently through REST methods you can not convert a document from one format to another,
but using the SOAP web services you can request the conversion of a document to PDF and then download it.
The methods to invoke are 2:
createPdf -> performs the creation of a PDF resource if it doesn't exist yet (conversion)
getResource -> returns the requested content resource (if it exists)
See also the documentation online http://docs.logicaldoc.com/en/web-services-api
Please note that conversion to PDF is only available in commercial versions of LogicalDOC, not in the Community edition.
We may eventually bring these 2 methods to the REST API, but we are planning to introduce a new Enterprise Web Service that will include a generic method to convert a document from one format to another
Cristian
Post
Re: REST API - Get Document PDF
Hi Cristian,
Thanks for you quickly reply. In this moment a do it some analysis and test with different DMS solutions for a project in my company. I have done a some pdf documents in the Logical Doc database and only want download. How I can test the Enterprise version ?
About the prices Logical Doc in enterprise, can you help about this?
Best Regards
Diego
Thanks for you quickly reply. In this moment a do it some analysis and test with different DMS solutions for a project in my company. I have done a some pdf documents in the Logical Doc database and only want download. How I can test the Enterprise version ?
About the prices Logical Doc in enterprise, can you help about this?
Best Regards
Diego
- admin
- Site Admin
Post
Re: REST API - Get Document PDF
Hi Diego,
you may request to download the trial version by filling out the form on the official website https://www.logicaldoc.com/try
As for the prices you can request a quotation to the following address https://www.logicaldoc.com/quote
Br.
Cristian
you may request to download the trial version by filling out the form on the official website https://www.logicaldoc.com/try
As for the prices you can request a quotation to the following address https://www.logicaldoc.com/quote
Br.
Cristian
Post
Re: REST API - Get Document PDF
Hi Again Christian,
I read again your answer and I dont want convert the document one format to other format, only I want download the document in the same format I already saved. Example I have pdf documents in the DMS and I want only download ( off course with the format), it is possible with a web services?
Best Regards
Diego
I read again your answer and I dont want convert the document one format to other format, only I want download the document in the same format I already saved. Example I have pdf documents in the DMS and I want only download ( off course with the format), it is possible with a web services?
Best Regards
Diego
Post
Re: REST API - Get Document PDF
Hi Diego,
with the rest method getContent you can download the content of a document (file)
For more details
http://wiki.logicaldoc.com/wiki/RESTful_Guide_with_curl
Basically using curl from cmd line
Output to a file on the FS
Note if you don't know the filename you will have first to read the document metdata using method getDocument
Br.
Alex
with the rest method getContent you can download the content of a document (file)
For more details
http://wiki.logicaldoc.com/wiki/RESTful_Guide_with_curl
Basically using curl from cmd line
Code: Select all
curl -u admin:admin http://localhost:8080/services/rest/document/getContent?docId=456456456
Code: Select all
curl -u admin:admin http://localhost:8080/services/rest/document/getContent?docId=456456456 > myFile.pdf
Code: Select all
curl -u admin:admin -H "Accept: application/json" http://localhost:8080/services/rest/document/getDocument?docId=114884608
Alex
Post
Re: REST API - Get Document PDF
Hi Alex,
I saw before the command line use the curl, but i search a solution with normal web services call ( example from Explorer or Firefox) and download the file with the format is storage in the DMS. But I saw the API don't have this possibility, Only get Content in binary file.
Regards
Diego
I saw before the command line use the curl, but i search a solution with normal web services call ( example from Explorer or Firefox) and download the file with the format is storage in the DMS. But I saw the API don't have this possibility, Only get Content in binary file.
Regards
Diego
Post
Re: REST API - Get Document PDF
Hi Diego,
from the browser you can use the download servlet,
but you will have to pass the session ID (sid) as well the docId params
eg.:
Note: if you're already logged in the system will read a cookie and doesn't need the sid
from the browser you can use the download servlet,
but you will have to pass the session ID (sid) as well the docId params
eg.:
Code: Select all
http://localhost:8080/download?docId=2219&sid=213456241564251
Who is online
Users browsing this forum: No registered users and 89 guests