| PDF-API3 documentation | Contained in the PDF-API3 distribution. |
PDF::API3::Compat::API2::Basic::PDF::Bool - A special form of PDF::String which holds the strings true or false
Converts a string into the string which will be stored.
Converts the value to a PDF output form
| PDF-API3 documentation | Contained in the PDF-API3 distribution. |
#======================================================================= # ____ ____ _____ _ ____ ___ ____ # | _ \| _ \| ___| _ _ / \ | _ \_ _| |___ \ # | |_) | | | | |_ (_) (_) / _ \ | |_) | | __) | # | __/| |_| | _| _ _ / ___ \| __/| | / __/ # |_| |____/|_| (_) (_) /_/ \_\_| |___| |_____| # # A Perl Module Chain to faciliate the Creation and Modification # of High-Quality "Portable Document Format (PDF)" Files. # #======================================================================= # # THIS IS A REUSED PERL MODULE, FOR PROPER LICENCING TERMS SEE BELOW: # # # Copyright Martin Hosken <Martin_Hosken@sil.org> # # No warranty or expression of effectiveness, least of all regarding # anyone's safety, is implied in this software or documentation. # # This specific module is licensed under the Perl Artistic License. # # # $Id: Bool.pm,v 2.0 2005/11/16 02:16:00 areibens Exp $ # #======================================================================= package PDF::API3::Compat::API2::Basic::PDF::Bool; use strict; use vars qw(@ISA); no warnings qw[ deprecated recursion uninitialized ]; use PDF::API3::Compat::API2::Basic::PDF::String; @ISA = qw(PDF::API3::Compat::API2::Basic::PDF::String);
sub convert { return $_[1] eq "true"; }
sub as_pdf { $_[0]->{'val'} ? "true" : "false"; } sub outxmldeep { my ($self, $fh, $pdf, %opts) = @_; $opts{-xmlfh}->print("<Bool>".$self->as_pdf."</Bool>\n"); } 1;