RE: Page poperties?????

"Mark Fowle" <mfowle-uVnJ9s0aRV+BUy7/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.pdfapi2
Message-ID <[email protected]>
I'm not an expert in this area and usually get the right image by trial and
error so this is my understanding and may not be exactly correct.

PDF uses 72 points per inch so printing out a 72DPI image will result in no
change is size, more or less.

PDF's can be viewed in a number of mediums, lest say Print and Screen.

Your average monitor is either 72 or 90 DPI (or that range) so images should
look reasonable.

Print on the other hand is at least 300 DPI the extra resolution makes 72DPI
images look bad.

Say you have an image on screen that looks right at 100x150 pixels, in PDF
you might want a 300x450 pixel image, for real print you would want even
higher 600 - 1200 DPI.

Fonts and other vector parts of the PDF look fine anywhere as they scale to
the resolution of the display device.

 

If the image looks good in what ever viewer but bad in the pdf on screen, uh
hum don't know.

 

  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Ben
Sent: Wednesday, September 05, 2007 12:02 PM
To: [email protected]
Subject: RE: [perl-text-pdf-modules] Page poperties?????

 

crap I knew that, I am getting ahead of myself , thanks for the explaination
it helps.

I do have one more question,
i have a images that is 72dpi, 150x100
everytime I use the image_png method to place the image it comes out blurry,
and I am trying to figure out why.

help me out I am trying to understand this, what unit of measure does PDF
use
and if different than pixels doe the image_png convert said pixels to native
pdf measure?

cause I am not coming up with a reason why its blurry

I am using it like so:
sub setImage{
    my $photo_file=$pdf->image_png($_[0] ,-lossless => 1);
    my $photo = $page->gfx;

    ## add photo to pdf include cordinates and size - image($photo, x, y,
width, hieght);
    $photo->image($photo_file, $_[1], $_[2], $_[3], $_[4]);

}

pdf object is declared at top of the script


thanks



-----Original Message----- 
From: Mark Fowle 
Sent: Sep 5, 2007 11:24 AM 
To: [email protected] 
Subject: RE: [perl-text-pdf-modules] Page poperties????? 




As stated your question does not make much sense.

If you created the PDF you kind of know the height.

 

As you can write content at any arbitrary location on the page the idea of
coming to the end does not mean much.

 

If you are trying to write out a large block of text that may go over the
end of a page you need to figure out how to deal with that, given your
circumstances.

If you write out individual lines less that a page width long then just
track the Y value of the page position and something along the lines of if
CurrentY < 0 + bottomMargin new page

 

If you are writing out blocks of text you need to do something similar but
on a block level (I don't use this method) if CurrentY - block height < 0 +
bottomMargin new page

 

And or If I've totally misunderstood you the positioning (x,y) starts at the
bottom left so a y of 0 is the bottom of the page.

 

 


  _____  


From: [email protected]
[mailto:[email protected]] On Behalf Of Ben
Sent: Wednesday, September 05, 2007 11:03 AM
To: [email protected]
Subject: [perl-text-pdf-modules] Page poperties?????

 

I am trying to find a way to get  the height of the page, so I know when it
end and I can create a new page dynamically.

anyone done something like this or know how to?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.