Class PageImageParams

java.lang.Object
com.datalogics.PDFL.PageImageParams

public class PageImageParams extends Object
Used to manage converting a PDF page to an image. The Page Image Parameters are a set of parameters used to control converting a PDF page to an image, such as a PNG, JPG, or BMP. The parameters include pixel height invalid input: '&' width, color space, resolution, so on.
  • Constructor Details

    • PageImageParams

      public PageImageParams()
    • PageImageParams

      public PageImageParams(ColorSpace ColorSpace, EnumSet<SmoothFlags> Smoothing, int PixelWidth, int PixelHeight, double HorizontalResolution, double VerticalResolution, EnumSet<DrawFlags> PageDrawFlags)
      Set up the parameters for rendering a PDF page to an image. Horizontal and Vertical Resolution have to be either both zero or both non-zero.

      Parameters:
      ColorSpace - The desired color space for the image, DEVICERGB, DEVICECMYK or DEVICEGRAY only.
      Smoothing - Indicates what parts of PDF Page (text, image, art, none) are to be smoothed in rendering to an image. Note these flags can be or'd together
      PixelWidth - The desired witdth in pixels of the output image.
      PixelHeight - The desired height in pixels of the output image.
      HorizontalResolution - The desired horizontal resolution in pixels/inch of the output image. If you pass in 0.0, 300.0 dpi is used.
      VerticalResolution - The desired vertical resolution in pixels/inch of the output image. If you pass in 0.0, 300.0 dpi is used.
      PageDrawFlags - An OR of the flags from DrawFlags which control how the PDF page is to be drawn.
  • Method Details

    • delete

      public void delete()
    • getImageColorSpace

      public ColorSpace getImageColorSpace()
      The ColorSpace used in exporting a PDF page to an image
    • setImageColorSpace

      public void setImageColorSpace(ColorSpace cs)
    • getSmoothing

      public EnumSet<SmoothFlags> getSmoothing()
      The SmoothFlags used in exporting a PDF page to an image
    • setSmoothing

      public void setSmoothing(EnumSet<SmoothFlags> smoothflag)
    • getPixelWidth

      public int getPixelWidth()
      The width in pixels of the image to be created from a PDF page.
    • setPixelWidth

      public void setPixelWidth(int arg0)
    • getPixelHeight

      public int getPixelHeight()
      The height in pixels of the image to be created from a PDF page.
    • setPixelHeight

      public void setPixelHeight(int arg0)
    • getHorizontalResolution

      public double getHorizontalResolution()
      The desired horizontal resolution in pixels/inch of the output image.
    • setHorizontalResolution

      public void setHorizontalResolution(double arg0)
    • getVerticalResolution

      public double getVerticalResolution()
      The desired vertical resolution in pixels/inch of the output image.
    • setVerticalResolution

      public void setVerticalResolution(double arg0)
    • getPageDrawFlags

      public EnumSet<DrawFlags> getPageDrawFlags()
      the DrawFlags used or rendering a PDF page to an image.
    • setPageDrawFlags

      public void setPageDrawFlags(EnumSet<DrawFlags> arg0)
    • getRenderIntent

      public RenderIntent getRenderIntent()
      The RenderIntent used to specify color translation for colors outside gamut of the color profile used.
    • setRenderIntent

      public void setRenderIntent(RenderIntent arg0)
    • getBlackPointCompensation

      public boolean getBlackPointCompensation()
      The BlackPointCompensation desired (default is true if not explicitly set)
    • setBlackPointCompensation

      public void setBlackPointCompensation(boolean arg0)
    • getThinLineHeuristics

      public boolean getThinLineHeuristics()
      The ThinLineHeuristics used to determine whether thin lines will be fattened non-linearly or the stroke adjust will be applied to thin rectangles. return true if thin line heuristics are applied, false otherwise.
    • setThinLineHeuristics

      public void setThinLineHeuristics(boolean arg0)
    • getBypassCopyPerm

      public boolean getBypassCopyPerm()
      The BypassCopyPerm allows to bypass copy permitions.
      Returns:
      true if this option is turned on.
    • setBypassCopyPerm

      public void setBypassCopyPerm(boolean value)
    • getCalibrateDeviceSpacesWhenPrinting

      public boolean getCalibrateDeviceSpacesWhenPrinting()
      Sets if Device spaces should be treated as calibrated to the associated working profile (when true), otherwise it treats them as uncalibrated (when false) when printing.
      Returns:
      true if this option is turned on.
    • setCalibrateDeviceSpacesWhenPrinting

      public void setCalibrateDeviceSpacesWhenPrinting(boolean value)
    • getICCProfile

      public ColorProfile getICCProfile()
      Gets the ICC Profile of the colorspace to be used for rendering from a known value.

      NOTE: The ICCProfileCustomPath must not be set for this property to be used. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

    • setICCProfile

      public void setICCProfile(ColorProfile colorProfile)
      Sets the ICC Profile of the colorspace to be used for rendering to a known value.

      NOTE: The ICCProfileCustomPath must not be set for this property to be used. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

    • getICCProfileCustomPath

      public String getICCProfileCustomPath()
      Gets the ICC Profile of the colorspace to be used for rendering from a custom file path.

      NOTE: The ICCProfile is ignored when this property is a non-empty string. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

    • setICCProfileCustomPath

      public void setICCProfileCustomPath(String colorProfilePath)
      Sets the ICC Profile of the colorspace to be used for rendering from a custom file path.

      NOTE: The ICCProfile is ignored when this property is a non-empty string. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

    • getUseDeviceNForImageSeparations

      public boolean getUseDeviceNForImageSeparations()
      Gets the UseDeviceNForImageSeparations setting, which indicates when the GetImageSeparations() method is called if a DeviceN colorspace will be used for rasterization. When false, if only Process colorants are provided to GetImageSeparations() then it's rendered using DeviceCMYK. When true, then it's rendered using DeviceN.
      Returns:
      true if this option is turned on. NOTE: This member is only applicable when calling the GetImageSeparations() method, only when Colorants used are only Process.
    • setUseDeviceNForImageSeparations

      public void setUseDeviceNForImageSeparations(boolean value)
      Sets the UseDeviceNForImageSeparations setting, which indicates when GetImageSeparations() is called if a DeviceN colorspace will be used for rasterization. When false, if only Process colorants are provided to GetImageSeparations() then it's rendered using DeviceCMYK. When true, then it's rendered using DeviceN. NOTE: This member is only applicable when calling the GetImageSeparations() method, only when Colorants used are only Process.