---
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    funktion.fabric8.io/kind: Connector
  name: pdf
data:
  deployment.yml: |
    ---
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      labels:
        funktion.fabric8.io/kind: Subscription
        connector: pdf
    spec:
      replicas: 1
      template:
        metadata:
          labels:
            funktion.fabric8.io/kind: Subscription
            connector: pdf
        spec:
          containers:
          - image: funktion/connector-pdf:${project.version}
            name: connector
  schema.yml: |
    ---
    component:
      kind: component
      scheme: pdf
      syntax: pdf:operation
      title: PDF
      description: The pdf components provides the ability to create modify or extract content from PDF documents.
      label: pdf,printing
      deprecated: false
      async: false
      producerOnly: true
      javaType: org.apache.camel.component.pdf.PdfComponent
      groupId: org.apache.camel
      artifactId: camel-pdf
      version: 2.18.3
    componentProperties: {}
    properties:
      operation:
        kind: path
        group: producer
        required: true
        type: string
        javaType: org.apache.camel.component.pdf.PdfOperation
        enum:
        - create
        - append
        - extractText
        deprecated: false
        secret: false
        description: Operation type
        order: 0
      font:
        kind: parameter
        group: producer
        type: object
        javaType: org.apache.pdfbox.pdmodel.font.PDFont
        deprecated: false
        secret: false
        defaultValue: Helvetica
        description: Font
        order: 1
      fontSize:
        kind: parameter
        group: producer
        type: number
        javaType: float
        deprecated: false
        secret: false
        defaultValue: "14"
        description: Font size in pixels
        order: 2
      marginBottom:
        kind: parameter
        group: producer
        type: integer
        javaType: int
        deprecated: false
        secret: false
        defaultValue: "20"
        description: Margin bottom in pixels
        order: 3
      marginLeft:
        kind: parameter
        group: producer
        type: integer
        javaType: int
        deprecated: false
        secret: false
        defaultValue: "20"
        description: Margin left in pixels
        order: 4
      marginRight:
        kind: parameter
        group: producer
        type: integer
        javaType: int
        deprecated: false
        secret: false
        defaultValue: "40"
        description: Margin right in pixels
        order: 5
      marginTop:
        kind: parameter
        group: producer
        type: integer
        javaType: int
        deprecated: false
        secret: false
        defaultValue: "20"
        description: Margin top in pixels
        order: 6
      pageSize:
        kind: parameter
        group: producer
        type: string
        javaType: org.apache.pdfbox.pdmodel.common.PDRectangle
        enum:
        - PAGE_SIZE_A0
        - PAGE_SIZE_A1
        - PAGE_SIZE_A2
        - PAGE_SIZE_A3
        - PAGE_SIZE_A4
        - PAGE_SIZE_A5
        - PAGE_SIZE_A6
        - PAGE_SIZE_LETTER
        deprecated: false
        secret: false
        defaultValue: PAGE_SIZE_A4
        description: Page size
        order: 7
      textProcessingFactory:
        kind: parameter
        group: producer
        type: string
        javaType: org.apache.camel.component.pdf.TextProcessingFactory
        enum:
        - autoFormatting
        - lineTermination
        deprecated: false
        secret: false
        defaultValue: lineTermination
        description: 'Text processing to use. autoFormatting: Text is getting sliced by
          words then max amount of words that fits in the line will be written into pdf
          document. With this strategy all words that doesn''t fit in the line will be
          moved to the new line. lineTermination: Builds set of classes for line-termination
          writing strategy. Text getting sliced by line termination symbol and then it
          will be written regardless it fits in the line or not.'
        order: 8
      synchronous:
        kind: parameter
        group: advanced
        label: advanced
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: false
        description: Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
        order: 9
  documentation.adoc: |
    [[PDF-PDF]]
    PDF
    ~~~

    **Available as of Camel 2.16.0**

    The *PDF*: components provides the ability to create, modify or extract
    content from PDF documents. This component uses
    https://pdfbox.apache.org/[Apache PDFBox] as underlying library to work
    with PDF documents.

    In order to use the PDF component, Maven users will need to add the
    following dependency to their `pom.xml`:

    *pom.xml*

    [source,xml]
    ------------------------------------------------------------
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-pdf</artifactId>
        <version>x.x.x</version>
        <!-- use the same version as your Camel core version -->
    </dependency>
    ------------------------------------------------------------

    [[PDF-URIformat]]
    URI format
    ^^^^^^^^^^

    The PDF component only supports producer endpoints.

    [source,java]
    -----------------------
    pdf:operation[?options]
    -----------------------

    [[PDF-Options]]
    Options
    ^^^^^^^

    // component options: START
    The PDF component has no options.
    // component options: END



    // endpoint options: START
    The PDF component supports 10 endpoint options which are listed below:

    {% raw %}
    [width="100%",cols="2,1,1m,1m,5",options="header"]
    |=======================================================================
    | Name | Group | Default | Java Type | Description
    | operation | producer |  | PdfOperation | *Required* Operation type
    | font | producer | Helvetica | PDFont | Font
    | fontSize | producer | 14 | float | Font size in pixels
    | marginBottom | producer | 20 | int | Margin bottom in pixels
    | marginLeft | producer | 20 | int | Margin left in pixels
    | marginRight | producer | 40 | int | Margin right in pixels
    | marginTop | producer | 20 | int | Margin top in pixels
    | pageSize | producer | PAGE_SIZE_A4 | PDRectangle | Page size
    | textProcessingFactory | producer | lineTermination | TextProcessingFactory | Text processing to use. autoFormatting: Text is getting sliced by words then max amount of words that fits in the line will be written into pdf document. With this strategy all words that doesn't fit in the line will be moved to the new line. lineTermination: Builds set of classes for line-termination writing strategy. Text getting sliced by line termination symbol and then it will be written regardless it fits in the line or not.
    | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
    |=======================================================================
    {% endraw %}
    // endpoint options: END


    [[PDF-Headers]]
    Headers
    ^^^^^^^
    [width="100%",cols="10%,90%",options="header",]
    |=======================================================================
    |Header |Description

    |`pdf-document` |*Mandatory* header for `append` operation and ignored in all other
    operations. Expected type is
    https://pdfbox.apache.org/docs/1.8.9/javadocs/org/apache/pdfbox/pdmodel/PDDocument.html[PDDocument].
    Stores PDF document which will be used for append operation.

    |`protection-policy` |Expected type
    ishttps://pdfbox.apache.org/docs/1.8.9/javadocs/org/apache/pdfbox/pdmodel/encryption/ProtectionPolicy.html[ProtectionPolicy].
    If specified then PDF document will be encrypted with it.

    |`decryption-material` |Expected type
    ishttps://pdfbox.apache.org/docs/1.8.9/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial].
    *Mandatory* header if PDF document is encrypted.
    |=======================================================================

    [[PDF-SeeAlso]]
    See Also
    ^^^^^^^^

    * link:configuring-camel.html[Configuring Camel]
    * link:component.html[Component]
    * link:endpoint.html[Endpoint]
    * link:getting-started.html[Getting Started]

    -
     
    -
