package cairo2
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
The PDF surface is used to render cairo graphics to Adobe PDF files and is a multi-page vector surface backend.
To create a cairo context cr
that will write the the PDF file fname
with dimensions w
×h
points, do let cr =
Cairo.create(Cairo.PDF.create fname w h)
. Do not forget to call Surface.finish(get_target cr)
when you are done drawing because the file may not be fully written before.
val create : fname:string -> width:float -> height:float -> Surface.t
Creates a PDF surface of the specified size in points to be written to fname
.
val create_for_stream :
output:(string -> unit) ->
width:float ->
height:float ->
Surface.t
Creates a PDF surface of the specified size in points to be written incrementally to the stream represented by output
. Any exception that output
raises is considered as a write error.
val set_size : Surface.t -> width:float -> height:float -> unit
Changes the size of a PDF surface for the current (and subsequent) pages.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>