Import pdf - how to ensure imported image's print size equals pdf-file's page size? - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: Import pdf - how to ensure imported image's print size equals pdf-file's page size? (/Thread-Import-pdf-how-to-ensure-imported-image-s-print-size-equals-pdf-file-s-page-size) |
Import pdf - how to ensure imported image's print size equals pdf-file's page size? - Cattleya - 08-17-2023 Questions are:
Long story: I created a pdf-file with pdfLaTeX, packages TikZ/pgfplots/standalone. A graph of a function, ticks of x- and y-axis are 1 cm apart from each other when displaying at a zoom factor of 100%. According to document properties in Adobe Reader 9 and in KDE Okular 1.3.2, page size is 12,495 cm x 12,343 cm. I.e., width of the pdf's page is 12,495 cm and height of the pdf's page is 12,343 cm. When viewing the pdf-file at a zoom factor of 100% in Adobe Reader 9 or in KDE Okular 1.3.2, then the area on the screen taken for displaying the pdf's page in fact is 12,495 cm x 12,343 cm. (I used a caliper for measuring the area on the screen. ;-) ). Resolution of my monitor is 94 dpi both in horizontal and in vertical direction. Edit/Preferences/Interface/Display in GIMP 2.10.8 also says that the monitor resolution detected automatically is 94 dpi. When importing the pdf-file into GIMP (Gnu Image Manipulation Program, 2.10.8), I am asked to give a resolution in pixel/inch. I expect the following behavior in GIMP:
[imported image's width in pixels]/[resolution given in pixel/inch]*2.54cm/inch = [width of pdf's page in cm] <-> [imported image's width in pixels] = [width of pdf's page in cm] * [resolution given in pixel/inch] * inch/2.54cm and [imported image's height in pixels]/[resolution given in pixel/inch]*2.54cm/inch = [height of pdf's page in cm] <-> [imported image's height in pixels] = [height of pdf's page in cm] * [resolution given in pixel/inch] * inch/2.54cm . E.g., when choosing resolution 100 dpi x 100 dpi, then with the pdf-file in question I expect [imported image's width in pixels] = 12,495 cm * [100 pixel/inch] * inch/2.54cm = 492 pixel and [imported image's height in pixels] = 12,443 cm * [100 pixel/inch] * inch/2.54cm = 489 pixel. E.g., when choosing monitor's resolution, 94 dpi x 94 dpi, then with the pdf-file in question I expect [imported image's width in pixels] = 12,495 cm * [94 pixel/inch] * inch/2.54cm = 462 pixel and [imported image's height in pixels] = 12,443 cm * [94 in pixel/inch] * inch/2.54cm = 460 pixel. But not only the size in pixels varies, but also the print size and the area used for displaying on screen at a zoom-factor of 100% both deviate from the pdf-file's page-size and vary depending on what resolution in pixel/inch you give. E.g., when at the time of importing the pdf-file I chose resolution 100 dpi x 100 dpi, then according to Image - Image properties size in pixels is 490 x 486 pixels and print size is 12,45 cm x 12,3 4cm. Displaying with a zoom-factor of 100% takes an area on the screen of size 13,24 cm x 13,21 cm. Notice that height and width of the imported image in pixels differs from what I expect. Notice the difference between the print size of the imported image and the pdf's page size. Notice the difference between the print size of the imported image and the area taken for displaying on screen at a zoom factor of 100%. E.g., when at the time of importing the pdf-file I chose the monitor's resolution, 94 dpi x 94 dpi, then according to Image - Image properties size in pixels is 461 x 456 pixels and print size is 12,46 cm x 12,32 cm. Displaying with a zoom-factor of 100% takes an area on the screen of size 12,64 cm x 12,36 cm. Notice that height and width of the imported image in pixels differs from what I expect. Seems, when giving the monitor's resolution for the pixels/inch-resolution, then both the print size of the imported image and the area taken for displaying the imported image on screen at a zoom factor of 100% are very close to the pdf's page size. The differences in print sizes with the imported images and the deviating of print sizes of imported images from the pdf's page size show that importing the pdf into GIMP goes along with stretching the image horizontally and vertically. That stretching seems to depend on the resolution in pixel/inch specified at the time of importing the pdf-file into GIMP. That stretching causes with the exported jpg distance of the ticks on the x- and y-axis of the graph of the function not being 1 cm any more. Also, the print size of the imported image does not reflect the measurements of the area taken for displaying the imported image at a zoom-factor of 100%, although GIMP seems to have proper information about the monitor's resolution. RE: Import pdf - how to ensure imported image's print size equals pdf-file's page size? - rich2005 - 08-17-2023 Oh... That is verbose The bottom line is Gimp is a bitmap (raster) editor that works in pixels. 1. When you import a PDF the default ppi is 100 ppi That governs the print size. All depends on how the original PDF was created but setting 300 ppi is a good starting point. See the size (in inches) remains the same but Gimp Image size in pixels increases. [attachment=10211] 2. If you want to see how an Image is printed. Set the zoom to 100% then untick View -> Dot for Dot which assuming your monitor / display setup is correct shows as the print size. RE: Import pdf - how to ensure imported image's print size equals pdf-file's page size? - Cattleya - 08-17-2023 Thank you - unticking "Dot for dot" did the trick. RE: Import pdf - how to ensure imported image's print size equals pdf-file's page size? - rich2005 - 08-17-2023 (08-17-2023, 06:32 PM)Cattleya Wrote: Thank you - unticking "Dot for dot" did the trick. ...but for editing, put it back on so that one image pixel = one display/monitor pixel RE: Import pdf - how to ensure imported image's print size equals pdf-file's page size? - Ofnuts - 08-17-2023 (08-17-2023, 03:37 PM)Cattleya Wrote: Questions are: See Image size in Gimp and in particular the section "The display resolution is not the printer resolution". |