com.ironsoftware.ironpdf.stamp.BarcodeStamper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ironpdf Show documentation
Show all versions of ironpdf Show documentation
IronPDF Java library offers an extensive compatibility range, making it a go-to solution for a wide array of developers. It fully supports JVM languages like Java, Scala, and Kotlin, making it incredibly versatile. This Java PDF library is also compatible with Java 8 and above, providing optimum performance across multiple platforms. It's been designed with a wide range of users in mind Here's a look at what it supports: JVM Languages: Java, Scala, Kotlin.Platforms: Java 8 and above.Operating Systems: Microsoft Windows, Linux, Docker, Azure, AWS.IDEs: Jetbrains IntelliJ IDEA, Eclipse. You can deploy IronPDF Java across various platforms, including Microsoft Windows, Linux, Docker, Azure, and AWS. It is also fully compatible with popular IDEs like Jetbrains IntelliJ IDEA and Eclipse, facilitating smooth project development and management. Your pom.xml file is essentially the backbone of your project when you're using Maven. It's here where you introduce new dependencies that you wish to include. To make IronPDF Java package a part of your Maven project, you simply need to add the following snippets to your pom.xml: Remember to replace '20xx.xx.xxxx' with the latest version of IronPDF. IronPDF Java simplifies the process of creating PDF files. Convert HTML files, HTML strings, or URLs directly to new PDF documents in a few lines of code. The variety of file formats it handles is vast, as it can even transform images into PDF documents and vice versa. Need to use base 64 encoding, base URLs, or custom file paths? No problem! IronPDF Java has got you coveredFor more detail about installing and using IronPDF Java. When you run your project for the first time post-integration, IronPDF's engine binaries will automatically be downloaded. The engine starts its journey when you call any IronPDF function for the first time and takes a breather when your application is either closed or enters an idle state. It is not an open source java PDF library but here's the best part - IronPDF Java is offering a 30-day free trial. So, why wait? Give it a go and boost your PDF operations today.
package com.ironsoftware.ironpdf.stamp;
/**
* Allows the developers to add Barcode(s) and QR code(s) to PDF documents elegantly and easily.
* An implementation of {@link Stamper}.
* See: {@link com.ironsoftware.ironpdf.PdfDocument#applyStamp(Stamper)}
*/
public class BarcodeStamper extends Stamper {
/**
* The value of the barcode as a string.
*/
private String value;
/**
* Barcode encoding type to use for this Stamper. Supported encoding types include: QRCode,
* Code128, and Code39. Please see:
* {@link com.ironsoftware.ironpdf.stamp.BarcodeEncoding}.
* Default is QRCode
*/
private BarcodeEncoding barcodeType = BarcodeEncoding.QRCode;
/**
* The width of the rendered barcode in pixels. Default is 250px
*/
private int width = 250;
/**
* The height of the rendered barcode in pixels. Default is 250px
*/
private int height = 250;
/**
* Initializes a new instance of the {@link BarcodeStamper} class.
* Width and Height are 250px each by default unless explicitly set.
*
* @param Value The value of the barcode as a string.
* @param BarcodeType Barcode encoding type to use for this Stamper. Supported encoding types include: QRCode, Code128, and Code39. {@link BarcodeEncoding} .
*/
public BarcodeStamper(String Value, BarcodeEncoding BarcodeType) {
this.setValue(Value);
this.setBarcodeType(BarcodeType);
}
/**
* Initializes a new instance of the {@link BarcodeStamper} class.
*
* @param Value The value of the barcode as a string.
* @param BarcodeType Barcode encoding type to use for this Stamper. Supported encoding types include: QRCode, Code128, and Code39. {@link BarcodeEncoding} .
* @param Width The width of the rendered barcode in pixels.
* @param Height The height of the rendered barcode in pixels.
*/
public BarcodeStamper(String Value, BarcodeEncoding BarcodeType, int Width, int Height) {
this.setValue(Value);
this.setBarcodeType(BarcodeType);
this.setWidth(Width);
this.setHeight(Height);
}
/**
* Gets value. The value of the barcode as a string.
*
* @return the value
*/
public final String getValue() {
return value;
}
/**
* Sets value. The value of the barcode as a string.
*
* @param value the value
*/
public final void setValue(String value) {
this.value = value;
}
/**
* Gets barcode type. Barcode encoding type to use for this Stamper. Supported encoding types include: QRCode,
* Code128, and Code39. Please see:
* {@link com.ironsoftware.ironpdf.stamp.BarcodeEncoding}.
* Default is QRCode
*
* @return the barcode type
*/
public final BarcodeEncoding getBarcodeType() {
return barcodeType;
}
/**
* Sets barcode type. Barcode encoding type to use for this Stamper. Supported encoding types include: QRCode,
* Code128, and Code39. Please see:
* {@link com.ironsoftware.ironpdf.stamp.BarcodeEncoding}.
* Default is QRCode
*
* @param value the value
*/
public final void setBarcodeType(BarcodeEncoding value) {
barcodeType = value;
}
/**
* Gets width. The width of the rendered barcode in pixels. Default is 250px
*
* @return the width
*/
public final int getWidth() {
return width;
}
/**
* Sets width. The width of the rendered barcode in pixels. Default is 250px
*
* @param value the value
*/
public final void setWidth(int value) {
width = value;
}
/**
* Gets height. The height of the rendered barcode in pixels. Default is 250px
*
* @return the height
*/
public final int getHeight() {
return height;
}
/**
* Sets height. The height of the rendered barcode in pixels. Default is 250px
*
* @param value the value
*/
public final void setHeight(int value) {
height = value;
}
}