Class CreateGradientShadingPDF

java.lang.Object
org.apache.pdfbox.examples.pdmodel.CreateGradientShadingPDF

public class CreateGradientShadingPDF extends Object
This example creates a PDF with type 2 (axial) and type 3 (radial) shadings with a type 2 (exponential) function, and a type 4 (gouraud triangle shading) without function.
  • Constructor Details

    • CreateGradientShadingPDF

      public CreateGradientShadingPDF()
  • Method Details

    • create

      public void create(String file) throws IOException
      This will create the PDF and write the contents to a file.
      Parameters:
      file - The name of the file to write to.
      Throws:
      IOException - If there is an error writing the data.
    • main

      public static void main(String[] args) throws IOException
      This will create a blank document.
      Parameters:
      args - The command line arguments.
      Throws:
      IOException - If there is an error writing the document data.
    • usage

      private static void usage()
      This will print the usage of this class.