PDF-Haru

 view release on metacpan or  search on metacpan

lib/PDF/Haru.pm  view on Meta::CPAN

Sets the current encoder for the document.

=head2 B<$pdf-E<gt>UseJPEncodings()>

Enables Japanese encodings. After UseJPEncodings() is involed, an application can use the following Japanese encodings.

    * 90ms-RKSJ-H
    * 90ms-RKSJ-V
    * 90msp-RKSJ-H
    * EUC-H
    * EUC-V

=head2 B<$pdf-E<gt>UseKREncodings()>

Enables Korean encodings. After UseKREncodings() is involed, an application can use the following Korean encodings.

    * KSC-EUC-H
    * KSC-EUC-V
    * KSCms-UHC-H
    * KSCms-UHC-HW-H
    * KSCms-UHC-HW-V

=head2 B<$pdf-E<gt>UseCNSEncodings()>

Enables simplified Chinese encodings. After UseCNSEncodings() is involed, an application can use the following simplified Chinese encodings.

    * GB-EUC-H
    * GB-EUC-V
    * GBK-EUC-H
    * GBK-EUC-V

=head2 B<$pdf-E<gt>UseCNTEncodings()>

Enables traditional Chinese encodings. After UseCNTEncodings() is involed, an application can use the following traditional Chinese encodings.

    * GB-EUC-H
    * GB-EUC-V
    * GBK-EUC-H
    * GBK-EUC-V

=head2 B<my $outline = $pdf-E<gt>CreateOutline($parent,$title,$encoder)>

Creates a new outline object. 

=over

=item $parent

The handle of an outline object which comes to the parent of the created outline object. If undef, the outline is created as a root outline.

=item $title

The caption of the outline object.

=item $encoder

The handle of an encoding object applied to the title. If undef, PDFDocEncoding is used. 

=back

=head2 B<my $image = $pdf-E<gt>LoadPngImageFromFile($filename)>

Loads an external png image file and returns image object.

=head2 B<my $image = $pdf-E<gt>LoadPngImageFromFile2($filename)>

Loads an external png image file and returns image object.
Unlike  LoadPngImageFromFile(),  LoadPngImageFromFile2() does not load whole data immediately. (only size and color properties is loaded).
The main data is loaded just before the image object is written to PDF, and the loaded data is deleted immediately. 

=head2 B<my $image = $pdf-E<gt>LoadJpegImageFromFile($filename)>

Loads an external Jpeg image file and returns image object.

=head2 B<$pdf-E<gt>SetInfoAttr (type, $value)>

SetInfoAttr() sets the text of the info dictionary. SetInfoAttr() uses the current encoding of the document.

=over

=item type

The following values are available.

    HPDF_INFO_AUTHOR
    HPDF_INFO_CREATOR
    HPDF_INFO_TITLE
    HPDF_INFO_SUBJECT
    HPDF_INFO_KEYWORDS

=item $value

A text to set the infomation. 

=back

=head2 B<$pdf-E<gt>GetInfoAttr (type)>

Gets an attribute value from info dictionary. 

=over

=item type

The following values are available.

    HPDF_INFO_CREATION_DATE
    HPDF_INFO_MOD_DATE
    HPDF_INFO_AUTHOR
    HPDF_INFO_CREATOR
    HPDF_INFO_TITLE
    HPDF_INFO_SUBJECT
    HPDF_INFO_KEYWORDS 

=back

=head2 B<$pdf-E<gt>SetInfoDateAttr(type,$year,$month,$day,$hour,$minutes,$seconds,$ind,$off_hour,$off_minutes)>

Sets a datetime attribute in the info dictionary. 

=over

=item type

One of the following attributes:

    HPDF_INFO_CREATION_DATE
    HPDF_INFO_MOD_DATE 



( run in 0.560 second using v1.01-cache-2.11-cpan-0d23b851a93 )