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

org.openpdf.renderer.action.UriAction Maven / Gradle / Ivy

The newest version!
package org.openpdf.renderer.action;

import java.io.IOException;

import org.openpdf.renderer.PDFObject;

/*****************************************************************************
 * URI action, containing a web link
 *
 * @author  Katja Sondermann
 * @since 07.07.2009
 ****************************************************************************/
public class UriAction extends PDFAction {

	/** The URL this action links to */
	private String uri;
	
	/*************************************************************************
	 * Constructor, reading the URL from the given action object
	 * @param type
	 * @throws IOException - in case the action can not be parsed
	 ************************************************************************/
	public UriAction(PDFObject obj, PDFObject root) throws IOException {
		super("URI");
		this.uri = PdfObjectParseUtil.parseStringFromDict("URI", obj, true);
	}
	
	/*************************************************************************
	 * Constructor
	 * @param type
	 * @throws IOException 
	 ************************************************************************/
	public UriAction(String uri) throws IOException {
		super("URI");
		this.uri = uri;
	}

	/*************************************************************************
	 * Get the URI this action directs to
	 * @return String
	 ************************************************************************/
	public String getUri() {
		return this.uri;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy