Create or Manipulate PDF documents in Cloud

Cloud based Ruby SDK to perform PDF creation, manipulation and conversion operations.

  Start Free Trial
Aspose.PDF Cloud SDK for Ruby

Aspose.PDF Cloud SDK for Ruby

 
 

Create or Manipulate existing PDF documents in Cloud

Aspose.PDF Cloud SDK for Ruby is developed on top of REST API which allows you to create, edit and convert PDF files in the cloud. The API allows you to create PDF documents from a number of other file formats including PCL, HTML, XML and images. Moreover, you can convert PDF documents to various other formats including HTML, DOC, JPEG, XPS, TIFF, TXT, PDF/A, PDF/A_1a, PDF/A_1b and so on.

Aspose.PDF Cloud SDK for Ruby also helps on manipulating existing elements of a PDF document like Text, Annotations, Watermarks, Signatures, Bookmarks, Stamps Form Fields and so on. The SDK allows you to manage Images, Hyperlinks and Attachments. It also facilities in common operations such as manipulation of PDF document properties, Splitting, Merging & Signing of PDF documents.

 

Advanced PDF processing Features

 

 

Create new PDF documents

 

Split PDF document into single page documents

 

Convert PDF documents to different formats

 

Merge multiple PDF documents

 

Convert images to PDF

 

Convert HTML pages to PDF documents

 

Convert SVG files to PDF documents

 

Extract & update text & images in PDF documents

 

Add text, image, PDF page or page number as stamps

 

Convert XML & XSL-FO document to PDF

 

Extract annotations, signatures, bookmarks, fragments, fields

 

Update form fields

 

Move PDF pages within one PDF file

Get Started with PDF Document Processing REST API

It is easy to get started with Aspose.PDF Cloud SDK for Ruby and there is nothing to install. Simply create an account at Aspose for Cloud and get your application information. Once you have the App SID & key, you are ready to give the Aspose.PDF Cloud SDK for Ruby a try with any language - on any platform.

Split & Merge PDF files

Aspose.PDF Cloud SDK for Ruby allows you to Split all or specific pages of a PDF to a new PDF or you can merge multiple PDF files into a single PDF document. During merge process, the sequence of documents is same as its specified during concatenation process.

Concatenate PDF documents - Ruby


@pdf_api = PdfApi.new
@storage_api = StorageApi.new 
@storage_api.put_create("Sample.pdf", File.open("../../../data/" << "Sample.pdf","r") { |io| io.read } )
@storage_api.put_create("sample-input.pdf", File.open("../../../data/" <<"sample-input.pdf","r") { |io| io.read } )
merge_documents = MergeDocuments.new
merge_documents.list = ["Sample.pdf", "sample-input.pdf"]
response = @pdf_api.put_merge_documents("sample-merged.pdf", merge_documents)

PDF Creation & Conversion

Aspose.PDF Cloud SDK for Ruby offers the capabilities to to quickly and reliably create new PDF files, edit and manipulate existing PDF files or convert to and from various supported document formats with a high degree of precision. In order to create a document, you can even Convert an Image to PDF format or convert PDF pages to images like PNG, JPEG, GIF, BMP, TIFF and much more.

Convert Image to PDF format - Ruby


@pdf_api = PdfApi.new
@storage_api = StorageApi.new 
// upload file to Aspose cloud storage
@storage_api.put_create("Sample.tiff", File.open("../../../data/" << "Sample.tiff","r") { |io| io.read } )
// Invoke API to convert TIFF image to PDF format
@pdf_api.put_create_document("sample-tiff.pdf", {template_file: "Sample.tiff", template_type: "tiff"})

Digitally Sign PDF files

Aspose.PDF Cloud SDK for Ruby helps you secure PDF file using different methods. You can add encryption, set up owner and user passwords as well as sign a PDF file using signature to protect the PDF file. You can also remove the signatures and de-crypt the PDF files.

Add Signature to PDF document - Ruby


@pdf_api = PdfApi.new
@storage_api = StorageApi.new 
// upload file to Aspose cloud storage
@storage_api.put_create("sample-input.pdf", File.open("../../../data/" << "sample-input.pdf","r") { |io| io.read } )
@storage_api.put_create("pkc7-sample.pfx", File.open("../../../data/" << "pkc7-sample.pfx","r") { |io| io.read } )
signature = Signature.new
signature.authority = "Alexey"
signature.location = "London"
signature.contact = "This email address is being protected from spambots. You need JavaScript enabled to view it."
signature.date = "07/19/2018 2:46:00.000 PM"
signature.form_field_name = "Signature1"
signature.password = "aspose"
rectangle = Rectangle.new
rectangle.x = 100
rectangle.y = 100
rectangle.height = 100
rectangle.width = 200
signature.rectangle = rectangle
signature.signature_path = "pkc7-sample.pfx"
signature.signature_type = "PKCS7"
signature.visible = true
// Invoke API to digitally sign the PDF document
@pdf_api.post_sign_page(file_name, page_number, signature)

Retrieve or Replace Text using RESTful APIs

Aspose.PDF Cloud SDK for Ruby provides you the features you need to handle text in a PDF file. Most useful operation include find and replace text, remove or extract text from PDF and replace text using a regular expression and so on.

Replace Multiple Text instances in PDF file - Ruby


@pdf_api = PdfApi.new
@storage_api = StorageApi.new 
// upload file to Aspose cloud storage
@storage_api.put_create("sample-input.pdf", File.open("../../../data/" << "sample-input.pdf","r") { |io| io.read } )
page_number = 1
text_replace_list_request = TextReplaceListRequest.new 
text_request_1 = TextReplace.new
text_request_1.old_value = "Sample"
text_request_1.new_value = "Sample Aspose"
text_request_2 = TextReplace.new
text_request_2.old_value = "PDF"
text_request_2.new_value = "PDF Document"
text_replace_list_request.text_replaces = [text_request_1, text_request_2]
// Invoke API to Replace Text inside document
@pdf_api.post_page_replace_text_list("sample-input.pdf", 1, text_replace_list_request)

Manage PDF Forms & Fields in Cloud

Aspose.PDF Cloud SDK for Ruby manages PDF Forms and Fields within a document. The supported fields include Text Fields, Dropdown, Checkbox, Radio Button, Submit Button. It also offers the feature to Extracting PDF form fields.

Replace Multiple Text instances in PDF file - Ruby


@pdf_api = PdfApi.new
@storage_api = StorageApi.new 
// upload file to Aspose cloud storage
@storage_api.put_create("sample-input.pdf", File.open("../../../data/" << "sample-input.pdf","r") { |io| io.read } )
field_name = "textbox1"
field = Field.new
field.name = "textbox1"
field.values = ["Aspose"]
@pdf_api.put_update_field("sample-field.pdf", field, "textbox1")
 

Support and Learning Resources