NAME
PDF::Make::FieldPtr - Low-level XS form field pointer API
SYNOPSIS
use PDF::Make;
use PDF::Make::FieldPtr;
my $doc = PDF::Make::Document->new;
$doc->add_page;
# Create a text field (returns native field pointer object)
my $field = PDF::Make::FieldPtr::text(
$doc,
'email',
72, 700, 240, 20,
);
$field->set_value('user@example.com');
# Attach to page
my $page = $doc->get_page(0);
$field->add_to_page($page);
DESCRIPTION
PDF::Make::FieldPtr exposes low-level field construction and mutation APIs backed by libpdfmake through XS.
This module is a namespace loader only; implementation lives in xs/form.xs and src/pdfmake_form.c.
METHODS
The following constructor-style methods are provided by XS:
text($doc, $name, $x, $y, $width, $height)checkbox($doc, $name, $x, $y, $width, $height, $on_value = "Yes")radio_group($doc, $name)add_radio_option($group, $x, $y, $width, $height, $value)choice($doc, $name, $x, $y, $width, $height, $combo = 0)combo($doc, $name, $x, $y, $width, $height)listbox($doc, $name, $x, $y, $width, $height)button($doc, $name, $x, $y, $width, $height, $caption)signature($doc, $name, $x, $y, $width, $height)(if enabled)
Accessor and mutator methods are also provided on returned field pointer objects (for example set_value, readonly, required, add_to_page, and related methods).
SEE ALSO
PDF::Make::FormPtr, PDF::Make::Form, PDF::Make, PDF::Make::Builder
AUTHOR
LNATION <email@lnation.org>
COPYRIGHT AND LICENSE
Copyright (C) 2024 by LNATION
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.