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

org.hcl.pdftemplate.part.PdfImage Maven / Gradle / Ivy

There is a newer version: 1.4.6
Show newest version
package org.hcl.pdftemplate.part;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPageContentStream;
import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject;
import org.hcl.pdftemplate.BiFunctionWithException;
import org.hcl.pdftemplate.IPdfPrinter;

@RequiredArgsConstructor
@EqualsAndHashCode
@Getter
@ToString
public class PdfImage implements IPdfPart {
    private final float x;
    private final float y;
    private final int pageNo;
    private final BiFunctionWithException image;

    @Override
    public void print(IPdfPrinter printer, PDPageContentStream stream, Data data) throws Exception {
        printer.printImage(stream, data, this);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy