> ## Documentation Index
> Fetch the complete documentation index at: https://billing-docs.platform.ai71services.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate PDF for invoice

> Generate and download a PDF version of the specified invoice.



## OpenAPI

````yaml specs/billing_api_docs.json get /api/v1/invoices/{id}/pdf
openapi: 3.0.1
info:
  title: Billing API
  description: Billing service for managing subscriptions, payments, and entitlements
  contact: {}
  version: '1.0'
servers:
  - url: https://dev-billing-api.iqraa.ai/api/v1
security: []
tags:
  - name: Customers
    description: Customers related endpoints
  - name: Subscriptions
    description: Subscription related endpoints
  - name: Plans
    description: Plans related endpoints
  - name: Entitlements
    description: Entitlements related endpoints
  - name: Payments
    description: Payments related endpoints
  - name: Emails
    description: Email related endpoints
paths:
  /api/v1/invoices/{id}/pdf:
    get:
      tags:
        - Invoices
      summary: Generate PDF for invoice
      description: Generate and download a PDF version of the specified invoice.
      operationId: InvoicesController_generatePdf
      parameters:
        - name: id
          required: true
          in: path
          description: Invoice ID
          schema:
            type: string
        - name: X-Preferred-Language
          required: true
          in: header
          description: Language for the PDF
          schema:
            enum:
              - ar
              - en
            type: string
      responses:
        '200':
          description: PDF generated successfully
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '403':
          description: Forbidden - Customer ID is missing or invalid
        '404':
          description: Invoice not found
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: opaque
      type: http

````