Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set something in Pixels if have chosen inches for layout?

Status
Not open for further replies.

clerz

Technical User
Oct 4, 2007
19
0
0
US
Hi, I am creating a new page layout and have my preferences for units in inches.....but for this layout, to be exact, I am creating this in pixels, can I change this on the fly for this document? In the preferences, I don't even see "pixels" but picas, points, etc.

Thanks.


Clerz
 
A size in pixels only has meaning for bitmapped images, which an InDesign document is not. Presumably if you know the resolution that is going to be used to display the document (not usually something you have control over), you could calculate a conversion.
 
Well start by clearing some facts up. A pixel is not a unit of physical measurement. You cannot compare pixel (smallest size on a computer screen) to any measurement, as they are device dependant, as in that they differ from on each monitor, 14', 15', 17', 19', 24', 32' and bigger. So there's no value for this that is accurate.

Here are some sizes relative to InDesign though, and thought it might be interesting to include these on this post.

1 point (Truchet) = 0.188 mm (obsolete today)
1 point (Didot) = 0.376 mm = 1/72 of a French royal inch (27.07 mm)
1 point (ATA) = 0.3514598 mm = 0.013837 inch
1 point (TeX) = 0.3514598035 mm = 1/72.27 inch
1 point (Postscript) = 0.3527777778 mm = 1/72 inch
1 point (l’Imprimerie nationale, IN) = 0.4 mm
1 pica (ATA) = 4.2175176 mm = 12 points (ATA)
1 pica (TeX) = 4.217517642 mm = 12 points (TeX)
1 pica (Postscript) = 4.233333333 mm = 12 points (Postscript)
1 cicero = 4.531 mm = 12 points (Didot)

Output devices are frequently specified in DPI, dots per inch. Which is the reciprocal value of the pixel size multiplied by 25.4mm.

The following table shows a few commonly used typesetting resolutions in both µm and dpi:

µm 10.0 20.0 21.2 40.0 42.3 80.0 84.7 100.0 250.0 254.0
dpi 2540 1270 1200 635 600 317 300 254 102 100

If you are dandy with JavaScripting or anything here is some code

(The code uses the API function GetDeviceCaps to get the metrics you need.)


procedure PixelsPerMM(
canvas: TCanvas;
var x, y: single) ;
var
H:HDC;
hres,vres,
hsiz,vsiz:integer;
begin
H:=canvas.handle;
hres := GetDeviceCaps(H,HORZRES) ; {display width in pixels}
vres := GetDeviceCaps(H,VERTRES) ; {display height in pixels}
hsiz := GetDeviceCaps(H,HORZSIZE) ; {display width in mm}
vsiz := GetDeviceCaps(H,VERTSIZE) ; {display height in mm}
x := hres/hsiz;
y := vres/vsiz;
end;

How would you convert 468 pixels to mm?

1. Call the conversion function only once to get the pixel/mm ratio for the required device.

2. Transform an amount of pixels to mm, depending on the orientation (horizontal, vertical)

var
cx, cy : single;
mmx, mmy : integer;

begin
PixelsPerInch(Handle,cx,cy) ;

mmx := Trunc(468 / PixelsInMM.y) ;
mmy := Trunc(60 / PixelsInMM.y) ;

end;

Or you can use this website


Enjoy,
Euge
:)
 
InDesign can be used for screen design. This is why interactive PDFs can be produced.

There are 72 points in an inch. You could choose 'points' as your unit of measure to approximate 72 dpi/ppi (even though 72 ppi is a bogus measure since no screen I have ever worked on had a true 72 ppi pitch).

Menu: Edit->Preferences->Units & Increments

If you use points as your unit of measure, it is no challenge to create a new document that is sized to 800x600 points or 1024x768 points to mimic VGA and SVGA displays.

 
800x600 points would give you a pixel width of

1066 x 800

The point size to create a 800 x 600 pixel width would have to be

211.6 x 158.75

 
How do you get that measure? Are you measuring for your specific monitor? Are you measuring based on scaling in Adobe Reader?

When exporting from InDesign CS3 as a JPG file @ 72 ppi, it comes out to exactly 800x600 pixels.

The use of points as an approximation for pixel measurement was used because it is the closest unit. One could also try to design a layout that was 800x600 inches - - but then your ruler would display sub-pixel measurements since inches are broken up in to 1/2, 1/4, 1/8, etc.
 
Well I work it out using the factor of 1.33 pixel per point, or .75 in reverse.

It's more 1064, but the actual pixel break down rounds it off to 1066.

It's never going to be exact, there's no magic formula for this.

800 x 600 pixels in photoshop = 282.2 mm x 211.7 mm @ 72 dpi

If I change this to 72.2 dpi then it is now 281.4 x 211.1.



Ok my initial calculation was off a bit but it wasn't bad.

 
For printing there are 72 points in an inch, but a user defines the pixels per inch for his screen, so ut's completely irrelative what I measured off.

Best idea is to not enforce exact font sizes in pixels or points, but to use style sheets and relative sizes (em, %) based on what the visitor has set for his default body size.
 
Basically you wouldn't use InDesign to design to pixels.

However, if you alter the dpcm to 10, it means every millimetre is a pixel.

I don't know why you'd want to do that for print though. But that's all I have to offer on this particular subject.
 
If one would not use InDesign to design in pixels, then why can one create a 800 pt x 600 pt layout, export to JPG, and get a 800 px x 600 px image?

You may want to contact Adobe to tell them to take out the interactive PDF capabilities that allow you to place SWF and videos. Surely there is no reason to print a video.
 
Hmmm... interesting.

You can also create a 282.2 x 211.7 mm document and export to jpeg and get a 800 x 600 pixel image.


The original question was

>>>>>preferences for units in inches.....but for this layout, to be exact, I am creating this in pixels, can I change this on the fly for this document?<<<<

We both answered it, in different ways. I think there's more than enough info to go on for the original postee to get what is needed.

As for contacting Adobe regarding svg and video placement... there's no need to be a smart alec.
 
Oh and by the way, .tiff images are pixel based, but you don't need to set the width of the container in InDesign to pts to scale the ppi up and down or anything, you can see it live in the info panel. Infact, the PDF is measured in mm, inches, cm, pts, picas etc and not Pixels, as are the containers that hold SWF and Video, all mm, inches, pts, whatever you choose. But this doesn't influence the effective ppi of the image, unless you scale them in InDesign, or an external program, like photoshop or whatever.

Infact you would make the Video to a specific screen size before placing the video as you would with SWF, and as you would with tiffs etc.

So I don't know what your point is. Pun intended.
 
And last but not least, there is a lot of great information and help here, let's not spoil it by sniping at each other, that would defeat the purpose of how good it is here.

Have a good day sir.
 
Wow...flood of information to ponder over!!

Thank you everyone!

Clerez
 
I believe I owe jimoblak (Instructor) an apology, and I completely over thought this problem. I was puzzled as to why 800pt would equal 800 pixels

The kind folks at indesignsecrets.com cleared it up for me:

One point equals 1/72 of an inch. So, for a 72 dpi image, 1 point = 1 pixel.When I make slides in InDesign, I make 1024 x 768 pt documents, then export jpg at 72 dpi.
 
No apology is needed. I realized we were having two different conversations. There was no sniping. I was just confused where you were getting measurements. I did not see what you were measuring to get your figures.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top