Aspose.PDF Java for Ruby
Introduction
Rjb - Ruby Java Bridge
RJB is a bridge program that connect between Ruby and Java with Java Native Interface. Rake + Rjb is the more powerful and useful build tool than both Maven and Ant. You can test your Java business logic class itself with Rjb’s mock. It helps to migrate Struts’s Model Object into your RoR application. But beware to buildSwing application, Ruby (and Rjb) doesn’t consider JVM’s native threads handling.
Aspose.PDF for Java
Aspose.PDF for Java is a PDF document creation component that enables your Java applications to read, write and manipulate PDF documents without using Adobe Acrobat.
Aspose.PDF for Java is an affordably priced component that offers an incredible wealth of features, these include: PDF compression options, table creation and manipulation, graph support, image functions, extensive hyperlink functionality, extended security controls and custom font handling.
Aspose.PDF for Java allows you to create PDF files directly through the provided API and XML templates. Using Aspose.PDF for Java will also enable you to add PDF capabilities to your applications in no time.
Aspose.PDF Java for Ruby
Project Aspose.PDF Java for Ruby shows how different tasks can be performed using Aspose.PDF Java APIs in Ruby. This project is aimed to provide useful examples for Ruby developers who want to utilize Aspose.PDF for Java in their Ruby Projects using Rjb (Ruby Java Bridge).
System Requirements and Supported Platforms
System Requirements
Following are the system requirements to use Aspose.PDF Java for Ruby:
- Rjb Gem is configured
- Downloaded Aspose.PDF component
Supported Platforms
Following are the supported platforms:
- Ruby 2.2.x or above and respective DevKit.
- Java 1.5 or above
Downloads
Download Required Libraries
Download required libraries mentioned below. These are the required for executing Aspose.PDF Java for Ruby examples.
Download Examples from Social Coding Sites
Following releases of running examples are available to download on below mentioned social coding sites:
GitHub
Installation And Usage
Installing
It is very simple and easy to install Aspose.PDF Java for Ruby gem, please follow these simple steps:
- Run following command.
$ gem install aspose-pdfjava
- Download required Aspose.PDF for Java Component from following link. https://downloads.aspose.com/pdf/java
- Create “jars” folder at root of the Aspose.PDF Java for Ruby gem and copy downloaded component into it.
Using
Include the required files for working with the helloworld example.
require File.dirname(File.dirname(File.dirname(__FILE__))) + '/lib/aspose-pdfjava'
include Asposepdfjava
include Asposepdfjava::HelloWorld
initialize_aspose_pdf
Let’s understand the above code.
- The first line makes sure that the aspose pdf is loaded and available.
- Include the files that are required to access the aspose pdf.
- Initialize the libraries. The aspose JAVA classes are loaded from the path provided in the aspose.yml file/
Support, Extend and Contribute
Support
From the very first days of Aspose, we knew that just giving our customers good products would not be enough. We also needed to deliver good service. We are developers ourselves and understand how frustrating it is when a technical issue or a quirk in the software stops you from doing what you need to do. We’re here to solve problems, not create them.
This is why we offer free support. Anyone who uses our product, whether they have bought them or are using an evaluation, deserves our full attention and respect.
You can log any issues or suggestions related to Aspose.PDF Java for Ruby using any of the following platforms:
Extend and Contribute
Aspose.PDF Java for Ruby is open source and its source code is available on the major social coding websites listed below. Developers are encouraged to download the source code and contribute by suggesting or adding new feature or improving the existing ones, so that others could also benefit from it.
Source Code
You can get the latest source code from one of the following locations:
Sample Code Examples
This section includes the following topics:
- Download and Configure Aspose.Pdf in Ruby
- Ruby Programmers Guide
- Working with Document Object in Ruby
- Adding JavaScript in Ruby
- Add Layers to PDF File in Ruby
- Add TOC to Existing PDF in Ruby
- Get Document Window and Page Display Properties in Ruby
- Get PDF File Information in Ruby
- Get XMP Metadata from PDF File in Ruby
- Optimize PDF Document for the Web in Ruby
- Optimize PDF File Size in Ruby
- Remove Metadata from PDF in Ruby
- Set Document Window and Page Display Properties in Ruby
- Set PDF Expiration in Ruby
- Set PDF File Information in Ruby
- Working with Pages in Ruby
- Concatenate PDF Files in Ruby
- Delete a Particular Page from the PDF File in Ruby
- Get a Particular Page in a PDF File in Ruby
- Get Page Count of PDF in Ruby
- Get Page Properties in Ruby
- Insert an Empty Page at End of PDF File in Ruby
- Insert an Empty Page into a PDF File in Ruby
- Split PDF File into Individual Pages in Ruby
- Update Page Dimensions in Ruby
- Working with Text in Ruby
- Working with Document Conversion in Ruby
- Working with Document Object in Ruby
- Support, Extend and Contribute to Aspose.Pdf in Ruby