Font Embedding in PDF

A

Aqua

Group,

I am using PDF::API2 perl module to create and modify few PDF files. I
am adding few strings to the PDF. But when I run through PitStop tool
I am getting font Helvetica not embedded.

How do I embed standard core font like Helvetica in a PDF?

Regards
Dominic

================ Sample ==============
#!/usr/bin/perl

use PDF::API2;
$pdf=PDF::API2->new;

$fn = "Helvetica";
$font=$pdf->corefont($fn,1);
$page = $pdf->page;
$page->mediabox(595,842);
$txt=$page->text;
$txt->translate(100,700);
$txt->font($font, 18);
$txt->lead(18);
$txt->text('Hello World !');
$pdf->saveas("$0.pdf");

$pdf->end();
exit;

__END__
 
R

Richard Morse

Group,

I am using PDF::API2 perl module to create and modify few PDF files. I
am adding few strings to the PDF. But when I run through PitStop tool
I am getting font Helvetica not embedded.

How do I embed standard core font like Helvetica in a PDF?

I think the whole point of a "core" font is that it doesn't need to be
embedded -- it is (by spec, I believe) supposed to be available to every
PDF display device.

If you try changing the font to 'Times-Roman', does PitStop still
complain? If so, you might try looking at its preferences and see if
there is something about warning when core fonts aren't present...

Also, I believe that you can just do:

my $font = $pdf->corefont('Helvetica');

without needing to provide a size at this point.

Ricky
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top