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

com.adobe.pdfservices.operation.pdfjobs.params.pdfproperties.PDFPropertiesParams Maven / Gradle / Ivy

Go to download

Adobe PDF Services SDK allows you to access RESTful APIs to create, convert, and manipulate PDFs within your applications. Older versions can be found under groupId: com.adobe.documentservices, artifactId: pdftools-sdk

There is a newer version: 4.2.0
Show newest version
/*
 * Copyright 2024 Adobe
 * All Rights Reserved.
 *
 * NOTICE: Adobe permits you to use, modify, and distribute this file in
 * accordance with the terms of the Adobe license agreement accompanying
 * it. If you have received this file from a source other than Adobe,
 * then your use, modification, or distribution of it requires the prior
 * written permission of Adobe.
 */
package com.adobe.pdfservices.operation.pdfjobs.params.pdfproperties;

import com.adobe.pdfservices.operation.pdfjobs.jobs.PDFPropertiesJob;
import com.adobe.pdfservices.operation.pdfjobs.params.PDFServicesJobParams;


/**
 * Parameters for getting properties of a PDF using {@link PDFPropertiesJob}.
 */
public class PDFPropertiesParams implements PDFServicesJobParams {
    private boolean includePageLevelProperties;


    private PDFPropertiesParams(Builder builder) {
        this.includePageLevelProperties = builder.includePageLevelProperties;
    }

    /**
     * Returns {@code true} if page level properties are set to be included in the resulting PDF properties.
     * Default value is {@code false}
     *
     * @return {@code true} if page level properties are set to be included in the resulting PDF properties.
     */
    public Boolean includePageLevelProperties() {
        return includePageLevelProperties;
    }

    /**
     * Creates a new {@link Builder}.
     *
     * @return a {@link Builder} instance
     */
    public static Builder pdfPropertiesParamsBuilder() {
        return new Builder();
    }

    /**
     * Builds a {@link PDFPropertiesParams} instance.
     */
    public static class Builder {
        private boolean includePageLevelProperties;

        /**
         * Constructs a {@code Builder} instance.
         */
        private Builder() {
        }


        /**
         * Sets the includePageLevelProperties parameter.
         * If true, the page level properties of the input PDF will be included in the resulting JSON file or JSON
         * Object.
         * Default value is {@code false}
         *
         * @return this Builder instance to add any additional parameters
         */
        public Builder includePageLevelProperties() {
            this.includePageLevelProperties = true;
            return this;
        }

        /**
         * Returns a new {@link PDFPropertiesParams} instance built from the current state of this builder.
         *
         * @return a new {@link PDFPropertiesParams} instance
         */
        public PDFPropertiesParams build() {
            return new PDFPropertiesParams(this);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy