All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dynamicpdf.api.PdfInput Maven / Gradle / Ivy

Go to download

A Java Client API that uses the DynamicPDF API to create, merge, split, form fill, stamp, secure/encrypt PDF documents.

There is a newer version: 1.10.1
Show newest version
package com.dynamicpdf.api;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Represents a pdf input.
 */
@JsonInclude(Include.NON_DEFAULT)
@JsonAutoDetect(fieldVisibility = Visibility.ANY)
public class PdfInput extends Input {

	private MergeOptions mergeOptions = null;
	private int startPage;
	private int pageCount;

	/**
	 * Initializes a new instance of the PdfInput class.
	 * @param resource The resource of type PdfResource.
	 * @param options The merge options for the pdf.
	 */
	public PdfInput(PdfResource resource, MergeOptions options) {
		super(resource);
		mergeOptions = options;
	}

	/**
	 * Initializes a new instance of the PdfInput class.
	 * @param resource The resource of type PdfResource.
	 */
	public PdfInput(PdfResource resource) {
		super(resource);
	}

	/**
	 * Returns a PdfInput object containing the input pdf.
	 * @param cloudResourcePath The resource path in cloud resource manager.
	 * @param options The merge options for the pdf.
	 */
	public PdfInput(String cloudResourcePath, MergeOptions options) {
		super(cloudResourcePath);
		mergeOptions = options;
	}

	/**
	 * 
	 * @param cloudResourcePath The resource path in cloud resource manager.
	 */
	public PdfInput(String cloudResourcePath) {
		super(cloudResourcePath);
	}

	@JsonProperty("type")
	InputType getType() {
		return InputType.PDF;
	}

	/**
	 * Gets the merge options MergeOptions.
	 * @return The merge options MergeOptions.
	 */
	public MergeOptions getMergeOptions() {
		return mergeOptions;
	}

	/**
	 * Sets the merge options MergeOptions.
	 * @param value The merge options MergeOptions.
	 */
	public void setMergeOptions(MergeOptions value) {
		mergeOptions = value;
	}

	/**
	 * Gets the start page.
	 * @return The start page.
	 */
	public int getStartPage() {
		return startPage;
	}

	/**
	 * Sets the start page.
	 * @param value The start page.
	 */
	public void setStartPage(int value) {
		startPage = value;
	}

	/**
	 * Gets the page count.
	 * @return The page count.
	 */
	public int getPageCount() {
		return pageCount;
	}

	/**
	 * Sets the page count.
	 * @param value The page count.
	 */
	public void setPageCount(int value) {
		pageCount = value;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy