Here's a simple example, essentially using printnl() to put
the lines of your text on the page without any kind of advanced layouting:
#!/usr/bin/perl
use strict;
use warnings;
use PDF::Create;
my $text = <<'EOT';
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliqui
+p
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
EOT
my $pdf = new PDF::Create('filename' => 'mydoc.pdf',
'Title' => 'Simple Demo',
);
my $root = $pdf->new_page('MediaBox' => $pdf->get_page_size('A4'));
my $font = $pdf->font(); # using defaults
my $page = $root->new_page();
$page->printnl($text, $font, 14, 50, 750); # text, font, size, x, y
$pdf->close;
For anything non-trivial, though, I'd personally use
LaTeX (there exists a variant which
directly outputs PDF), in which case you'd have to markup your text
(paragraphs, headlines, etc.), and specify the style (column widths, fonts, etc.) using a well-established
syntax. LaTeX would then do the layouting in a much more professional
way than you could code with PDF::Create in the same time it takes to write the
markup... (although there's of course a learning curve, if you're
using it for the first time). But it all depends on what exactly you want to achieve.