PdfVectorOutput()

Syntax

Result = PdfVectorOutput(Filename$, Width.d, Height.d [, Unit])
Description
Creates a PDF file and returns the OutputID to perform vector drawing operations. The actual drawing operations must be enclosed in a StartVectorDrawing() / StopVectorDrawing() block. The PDF file can have multiple pages using the NewVectorPage() command.

Note: This function is only available on Linux and Mac OSX.

Parameters

FileName$ Specifies the filename of the PDF to create. If the file exists, it will be overwritten.
Width.d, Height.d Specifies the dimensions of a page in the PDF in units of the vector drawing output.
Unit (optional) Specifies the units for the vector drawing output. The default unit for PDF files is #PB_Unit_Point.
  #PB_Unit_Pixel     : Values are measured in pixels (or dots in case of a printer)
  #PB_Unit_Point     : Values are measured in points (1/72 inch)
  #PB_Unit_Inch      : Values are measured in inches
  #PB_Unit_Millimeter: Values are measured in millimeters

Return value

The OutputID of the given file to perform 2D rendering operation on it using StartVectorDrawing().

Example

  LoadFont(0, "Times New Roman", 20)
    
  If StartVectorDrawing(PdfVectorOutput("test.pdf", 595, 842))  
    VectorFont(FontID(0), 25)
    
    MovePathCursor(20, 20)
    DrawVectorText("This is page 1...")
    
    NewVectorPage()
    
    MovePathCursor(20, 20)
    DrawVectorText("This is page 2...")      

    StopVectorDrawing()
  EndIf

See Also

SvgVectorOutput(), ImageVectorOutput(), PrinterVectorOutput(), WindowVectorOutput(), CanvasVectorOutput()

Supported OS

Linux, MacOS X

<- PathSegments() - VectorDrawing Index - ResetCoordinates() ->