pdf<A> method

Future<PdfResult> pdf<A>(
  1. DocumentRender<A> point,
  2. A args, {
  3. RenderOptions options = const RenderOptions(),
})

A document entry: the guest composes the whole PDF itself.

Implementation

Future<PdfResult> pdf<A>(
  DocumentRender<A> point,
  A args, {
  RenderOptions options = const RenderOptions(),
}) async {
  var result = await _request({
    'method': 'render',
    'point': point.name,
    'as': 'pdf',
    'args': point.encodeArgs(args),
    'options': options.toJson(),
  });
  return PdfResult(
    base64Decode(result['bytes']! as String),
    _warnings(result),
  );
}