Perl Pdf Create

Perl or Practical Extraction and Report Language is described by Larry Wall, Perl's author, as follows: 'Perl is an interpreted language optimized for scanning arbitrary text files, extracting information from those text files.

  1. Perl Script Create Pdf
  2. Perl Create Pdf From Html
Perl programmer for hire: download my resume (PDF).
  • Create or modify PDF with a Perl script. Many web sites use Perl for creating dynamic content. You can also use Perl to script Acrobat on your local machine Hack #95. Given the great number of packages that extend Perl, it is no surprise that packages exist for creating and manipulating PDF. Let's take a look.
  • Teach Yourself Perl 5 in 21 days David Till Table of Contents: Introduction Who Should Read This Book? Special Features of This Book Programming Examples End-of-Day Q& A and Workshop Conventions Used in This Book What You'll Learn in 21 Days Week 1 Week at a Glance Where You're Going Day 1 Getting Started What Is Perl?

Earlier this month I downloaded several episodes of the comic 'Suske en Wiske' (Spike and Suzy), as cbr files. I own the original dead tree copies, but they are still in the Netherlands, and I own too many to ask my mom to take them with her when she visits us. Besides, we're running out of storage space in our little apartment.

A cbr file is a collection of image files, scans of the actual comic book pages, archived using the RAR format, hence the last letter. And cb stands for comic book. I already read two 'Suske en Wiske' comic books during our short vacation in Puerto Escondido earlier this month using 'XnView Pocket' on my PDA, a Dell Axim X51v, by opening each image file (JPEG). But reading using XnView was not an easy task.

Just before we left I considered creating a PDF file with one page (JPEG) per page, and use PocketXpdf to read it. But there was no time left to code a small Perl solution to achieve this.

And tonight I had some spare time, and decided to give it a try. Below follows a simple Perl program that reads all JPEG images from a directory named 'test' and creates a PDF file 'test.pdf' with one image per page.

The dimension in pixels of each page is taken from the dimension of each JPEG image. Next, the image object is added to the left top of each page. The image files are read and added sorted in standard string comparison order, the default of the sort function.

Pdf

The above Perl code is a simple example. Extending this example and adding additional error handling is left as an excercise to the reader. I might soon post a Perl program that has more functionality, but this example is already a good start to code your own solution.

Perl Script Create Pdf

As for now being able to read comic books on my Dell Axim using PocketXpdf, no such luck yet. Maybe PocketXpdf needs too much memory in order to display the comic. I will test later with a smaller pdf file. If that works, I just create for each comic book several pdf files, each file containing several pages of the book.

Perl and PDF related

Also today

Perl Create Pdf From Html

  • Some Perl hacking (overview)
Please post a comment | read 2 comments, latest by Ray | RSS feed