Professional Web Applications Themes

[PHP] saving images into pdf file using PDFlib - PHP Development

[snip] im saving image into pdf with: $image = pdf_load_image($p, 'jpeg', $picture_path, ""); pdf_fit_image($p, $image, $x_im, $y_im, ""); pdf_close_image($p, $image); image is 150px x 100px but in genereted pdf file it looks much smaller. im viewing mentioned pdf file with 100% view ratio. i've tried it with several other images and im getting same result. any idea what's wrong ? [/snip] It is probably because of differences between print pixels (PDF) and view pixels (monitor). Create a 150 x 100 image file. Open the PDF and place the image file next to the image in the PDF. You will see ...

  1. #1

    Default RE: [PHP] saving images into pdf file using PDFlib

    [snip]
    im saving image into pdf with:

    $image = pdf_load_image($p, 'jpeg', $picture_path, "");
    pdf_fit_image($p, $image, $x_im, $y_im, "");
    pdf_close_image($p, $image);

    image is 150px x 100px but in genereted pdf file it looks much smaller.
    im viewing mentioned pdf file with 100% view ratio.

    i've tried it with several other images and im getting same result.

    any idea what's wrong ?
    [/snip]

    It is probably because of differences between print pixels (PDF) and
    view pixels (monitor). Create a 150 x 100 image file. Open the PDF and
    place the image file next to the image in the PDF. You will see
    differences. another thing to note is that you are viewing the PDF at a
    certain screen resolution which may not be the same resolution that your
    users will be viewing the PDF.
    Jay Blanchard Guest

  2. #2

    Default RE: [PHP] saving images into pdf file using PDFlib

    Yes, it looks like that's the problem (print pixels vs. view pixels).

    i've found out that PDFlib is importing images as 72dpi images no matter
    if they really are 72dpi or not :(

    so now my images are about 4-times smaller as they should be.

    any suggestions ? :

    Regards
    Jan

    On Wed, 2003-08-13 at 13:48, Jay Blanchard wrote:
    > [snip]
    > im saving image into pdf with:
    >
    > $image = pdf_load_image($p, 'jpeg', $picture_path, "");
    > pdf_fit_image($p, $image, $x_im, $y_im, "");
    > pdf_close_image($p, $image);
    >
    > image is 150px x 100px but in genereted pdf file it looks much smaller.
    > im viewing mentioned pdf file with 100% view ratio.
    >
    > i've tried it with several other images and im getting same result.
    >
    > any idea what's wrong ?
    > [/snip]
    >
    > It is probably because of differences between print pixels (PDF) and
    > view pixels (monitor). Create a 150 x 100 image file. Open the PDF and
    > place the image file next to the image in the PDF. You will see
    > differences. another thing to note is that you are viewing the PDF at a
    > certain screen resolution which may not be the same resolution that your
    > users will be viewing the PDF.

    Jan Guest

Similar Threads

  1. Saving Images?
    By tennisknight in forum Macromedia Flash Player
    Replies: 0
    Last Post: November 28th, 05:36 PM
  2. Saving Images
    By pezmorized in forum Macromedia Contribute General Discussion
    Replies: 1
    Last Post: May 11th, 09:27 PM
  3. Saving Images While Saving ASP Pages !
    By Lovely Angel For You in forum ASP
    Replies: 1
    Last Post: October 3rd, 12:03 AM
  4. #25082 [NEW]: Internal PDFlib warning: Unknown tag structure in TIFF file
    By giancarlopez at hotmail dot com in forum PHP Development
    Replies: 0
    Last Post: August 13th, 10:14 PM
  5. saving images into pdf file using PDFlib
    By Jan in forum PHP Development
    Replies: 0
    Last Post: August 13th, 10:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139