How do I preview a document in Zoho Writer? Any sample codes?
How do I preview a document in Zoho Writer? Any sample codes?
To preview a document or open it in read-only mode, you need to make use of Zoho Writer's
Preview Document API
.
HTML Sample Code:
<form method="POST" action="
https://writer.zoho.com/writer/officeapi/v1/document/preview
" enctype="multipart/form-data" target="_self" accept-charset="UTF-8">
Upload Document for Preview: <input type="file" name="document" size="38"> <br><br>
<input type="hidden" name="apikey" value="423s*****">
<input type="hidden" name="lang" value="en">
<input type="submit" name="submit" value="Preview Document">
</form>
Curl Sample Code:
curl --request POST \
--url '
https://writer.zoho.com/writer/officeapi/v1/document/preview
' \
--header 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
--form document=@/Users/username/Documents/Sample.docx \
--form 'apikey=423s*****' \
--form lang=en
You can also build and test Preview Document requests right from your browser with Office Integrator
Postman Collection
.