pdf_fit_image,与DPI pdflib的关系

PDF LIB

i want to know if pdf_fit_image internally does some resizing based on DPI of the image

// image dimenstions of the 150_dpi and 300_dpi is same 900px , 558 px
$imgFile = "image/150_dpi.jpg";
$imgFile2 ="image/300_dpi.jpg";
$imgFile3 ="image/96_dpi.jpg";

$image = pdf_load_image($pdfdoc, "auto", $imgFile, "");
$image2 = pdf_load_image($pdfdoc, "auto", $imgFile2, "");
$image3 = pdf_load_image($pdfdoc, "auto", $imgFile3, "");


pdf_begin_page($pdfdoc, 595, 842);
pdf_fit_image($pdfdoc, $image2, 10, 300, "");
pdf_end_page($pdfdoc);

pdf_begin_page($pdfdoc, 595, 842);
pdf_fit_image($pdfdoc, $image2, 10, 300, "");
pdf_end_page($pdfdoc);

pdf_begin_page($pdfdoc, 595, 842); 
pdf_fit_image($pdfdoc, $image3, 10, 300, "");
pdf_end_page($pdfdoc);

Even though the 150 DPI image and 300 DPI image are of same dimension , they are of varied size in the pdf.

Is function pdf_fit_image DPI specific? Shouldn't two images of different DPI but same dimension, print similarly in PDF?

Basically i want to use a higher DPI image in the PDF , but with width and height less than 1000px and 600px respectively.

Even though the 150 DPI image and 300 DPI image are of same dimension , they are of varied size in the pdf.

this is expected.

Is function pdf_fit_image DPI specific? Shouldn't two images of different DPI but same dimension, print similarly in PDF?

yest to the first question, no to the second. PDF_fit_image() honor the DPI of an loaded image. From the PDFlib 9 API Reference, chapter 9.1 within the details of fit_image():

By default, an image will be scaled according to its resolution value(s). 
This behavior can be modified with the dpi, scale, and fitmethod options