github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

markusb / pdf-create

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 3
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Perl module to create PDF files — Read more

  cancel

http://search.cpan.org/perldoc?PDF::Create

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

fixed corrupt xref 
markusb (author)
Wed Jan 20 16:07:22 -0800 2010
commit  c9a83123833247a5aa46147354d3a2ecaaab1691
tree    8298f2c65b933689bb3bb64e4ca54e3a8a9b175e
parent  2fdf9593b911879a3a7b0b0340bc11b29ef3e058
pdf-create /
name age
history
message
file CHANGES Sat May 31 10:18:35 -0700 2008 Updated build system to generate Changes file d... [markusb]
file Changes.PL Sun Nov 01 14:29:28 -0800 2009 Fixed Changes.PL [markusb]
file MANIFEST Sun Nov 01 14:38:49 -0800 2009 Fix the MANIFEST file with all test updates [markusb]
file MANIFEST.SKIP Mon Sep 03 09:05:29 -0700 2007 Initial import. [markusb]
file Makefile.PL Wed Jan 20 15:18:50 -0800 2010 Set version to 'perl' for Fedora [markusb]
file PDF-Create-0.06a.tar.gz Mon Sep 03 09:05:29 -0700 2007 Initial import. [markusb]
file PDF-Create-0.07.tar.gz Mon Sep 03 09:05:29 -0700 2007 Initial import. [markusb]
file PDF-Create-0.07a.tar.gz Mon Sep 03 09:05:29 -0700 2007 Initial import. [markusb]
file PDF-Create-0.08.tar.gz Mon Sep 03 09:05:29 -0700 2007 Initial import. [markusb]
file README Tue Jun 03 01:53:56 -0700 2008 Updates Michael's email, added reference to git... [markusb]
file TODO Tue May 20 08:07:10 -0700 2008 Added better testing [markusb]
directory lib/ Wed Jan 20 16:07:22 -0800 2010 fixed corrupt xref [markusb]
file pdf-logo.gif Sun Sep 30 10:00:42 -0700 2007 Re-added pdf-logo files [markusb]
file pdf-logo.jpg Sun Sep 30 10:00:42 -0700 2007 Re-added pdf-logo files [markusb]
file pdf-logo.svg Sun Sep 30 10:00:42 -0700 2007 Re-added pdf-logo files [markusb]
file sample-cgi.pl Tue May 20 09:00:13 -0700 2008 Added small cgi sample [markusb]
file sample.pl Tue May 20 08:18:40 -0700 2008 Cleaned up samples and comments [markusb]
directory t/ Fri Oct 30 11:22:52 -0700 2009 Cleanup test files Add 'real' test using 'pdfto... [markusb]
README
  NAME

    PDF::Create - create PDF files

  DESCRIPTION

    PDF::Create allows you to create PDF documents using a large
    number of primitives, and emit the result as a PDF file or
    stream. PDF stands for Portable Document Format.

    Documents can have several pages, a table of content, an
    information section and many other PDF elements. More
    functionnalities will be added as needs arise.

    Documents are constructed on the fly so the memory footprint is
    not tied to the size of the pages but only to their number.

    It's main advantage over the other PDF modules is that it does
    not depend on other modules and is perl only (no compiler needed).
    If you want a quick and dirty way of creating pdf's, PDF::Create
    is for you. If you need a complete Framework to create complex
    PDF stuff, you better dive into the PDF::API2 based modules.
    
    More information about this module is included in this package.

  SYNOPSIS

        use PDF::Create;

        my $pdf = new PDF::Create('filename' => 'mypdf.pdf',
                                  'Version'  => 1.2,
                                  'PageMode' => 'UseOutlines',
                                  'Author'   => 'Fabien Tassin',
                                  'Title'    => 'My title',
                             );
        my $root = $pdf->new_page('MediaBox' => [ 0, 0, 612, 792 ]);

        # Add a page which inherits its attributes from $root
        my $page = $root->new_page;

        # Prepare 2 fonts
        my $f1 = $pdf->font('Subtype'  => 'Type1',
                            'Encoding' => 'WinAnsiEncoding',
                            'BaseFont' => 'Helvetica');
        my $f2 = $pdf->font('Subtype'  => 'Type1',
                            'Encoding' => 'WinAnsiEncoding',
                            'BaseFont' => 'Helvetica-Bold');

        # Prepare a Table of Content
        my $toc = $pdf->new_outline('Title' => 'Document',
                                    'Destination' => $page);
        $toc->new_outline('Title' => 'Section 1');
        my $s2 = $toc->new_outline('Title' => 'Section 2');
        $s2->new_outline('Title' => 'Subsection 1');

        $page->stringc($f2, 40, 306, 426, "PDF::Create");
        $page->stringc($f1, 20, 306, 396, "version $PDF::Create::VERSION");

        # Add another page
        my $page2 = $root->new_page;
        $page2->line(0, 0, 612, 792);
        $page2->line(0, 792, 612, 0);

        $toc->new_outline('Title' => 'Section 3');
        $pdf->new_outline('Title' => 'Summary');

        # Add something to the first page
        $page->stringc($f1, 20, 306, 300,
                       'by Fabien Tassin <fta@oleane.net>');

        # Add the missing PDF objects and a the footer then close the file
        $pdf->close;


  INSTALLATION

    Quick answer:

        perl -MCPAN -e 'install PDF::Create'

    Long answer:

    To install manually, cd to the directory containing the unpacked
    distribution and do one of the following:

    a.  Create a makefile by running Makefile.PL using the perl
        program into whose library you want to install and then run
        make three times:

            perl Makefile.PL
            make
            make test
            make install

    b.  To install into a private library, for example your home
        directory:

            perl Makefile.PL INSTALLSITELIB=$HOME/lib INSTALLMAN3DIR=$HOME/man
            make
            make test
            make pure_install

  AUTHORS

    - Fabien Tassin

    Original Author of PDF::Create

    - Markus Baertschi, markus@markus.org

    I have taken over maintenence of PDF::Create as Fabien has disappeared
    and did no longer maintain it in the last years.
    The last version of PDF::Create from Fabien is 0.06. All never versions
    have been modified by me.

    I maintain PDF::Create in git. You can access the repository directly
    at http://github.com/markusb/pdf-create.


Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server