unable to download document using JAVA APIs

Do you want to create a native client or integrate with third party applications: webservices are the solution.

Moderator: car031

ajutate
Posts: 3
Joined: Wed Jul 03, 2019 2:40 pm

unable to download document using JAVA APIs

Mon Jul 15, 2019 7:46 am

im using getcontent() method to get document content based on docId.
but unable to download doc format like .docx,.xls,.jpg,png,pdf.
i recieved the content in binary format but cannot able to convert it into there actual format using JAVa apis.
want help for above issue.
agaspa
Posts: 714
Joined: Tue Apr 20, 2010 8:24 am

Re: unable to download document using JAVA APIs

Thu Jul 18, 2019 2:42 pm

Using the method getContent() you will get the digital content (in bytes) of a document.
You should only write the stream on a file.
https://docs.logicaldoc.com/resources/w ... getContent

Of course in order to successfully save the document with the right filename and extension you should first request the system to get the metadata information of the document (file-name). the method to invoke is getDocument()
https://docs.logicaldoc.com/resources/w ... etDocument

Note: you can get code snippets from here: https://wiki.logicaldoc.com/wiki/Bindings_And_Samples

Return to “Web Services”

Who is online

Users browsing this forum: No registered users and 4 guests