Edit Word or PDF file in cURL SDK

Use REST API to edit files in cURL programmatically

Edit Word or PDF files using cURL command line tool. Edit text, modify tables, add images in documents with cURL.

View code snippet

Edit document in cURL using REST API

Our cURL library gives developers the ability to modify a document directly by editing its Document Object Model (DOM), which means no additional software needs to be installed.

It is important to know that using this cURL solution, you can edit a document in any supported format. For example, it is possible to load a file in PDF, DOCX, DOC, RTF, ODT, EPUB, HTML and other formats, and then modify this file and save it in the same format or in any other supported format.

Edit text in cURL

The most popular case to edit Word, PDF or any other document is text editing. With the given software solution, you can add, modify or delete text using cURL within the document.

Edit table in cURL

Another popular document editing option is table editing. Our cURL SDK allows you to work with tables and text in table cells.

cURL developers can add or remove table and table cells, as well as add, edit and remove text within them.

Add an image to a document using cURL

Besides editing text and tables, there is another common option: adding images to a document in cURL. cURL developers can also add an image into a file using DOM.

Edit a document online

Try this powerful cURL SDK and evaluate some options in document editing. Using the following example, load your document and make some changes: add text, add a table and a table cell with text or insert an image into the document:

Upload a document you want to modify
Run code
Upload an image you want insert
Select the target format from the list
curl -v "https://api.aspose.cloud/v4.0/words/online/post/{nodePath}/paragraphs" \
     -X PUT \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ####################" \
     -F Document="@Input.docx"

curl -v "https://api.aspose.cloud/v4.0/words/convert?format=docx" \
     -X PUT \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ####################" \
     -F Document="@EditText.docx"
curl -v "https://api.aspose.cloud/v4.0/words/online/post/tables" \
     -X PUT \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ####################" \
     -F Document="@Input.docx"

curl -v "https://api.aspose.cloud/v4.0/words/convert?format=docx" \
     -X PUT \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ####################" \
     -F Document="@EditTable.docx"
curl -v "https://api.aspose.cloud/v4.0/words/online/post/sections/0/drawingObjects" \
     -X PUT \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ####################" \
     -F Document="@Input1.docx" \
     -F ImageFile="@Input2.docx"
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer ####################" \

curl -v "https://api.aspose.cloud/v4.0/words/convert?format=docx" \
     -X PUT \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ####################" \
     -F Document="@EditImage.docx"
Run code
  
Copy cURL code to the clipboard

How to Edit a file in cURL

  1. Install cURL
  2. Get your app keys to use Aspose.Words Cloud for cURL
  3. Pass the Bearer token in the Authorization header
  4. Load a document to edit in cURL
  5. Insert content at the beginning of the document
  6. Download the result document from the cloud storage

cURL library to use document editing

Download and install the curl utility. Please follow these Instructions to quickly get the necessary security credentials and access our REST API.

System Requirements

There are no special requirements for using this tool.

Most popular formats for edit operations

5%

Subscribe to Aspose Product Updates

Get monthly newsletters and offers directly delivered to your mailbox.

© Aspose Pty Ltd 2001-2024. All Rights Reserved.