Using px for PDF output

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
IFU
Propeller Head
Posts: 48
Joined: Tue Dec 05, 2017 5:28 pm
Location: Vancouver BC

Using px for PDF output

Post by IFU »

I downloaded a template from the MadCap website that is specifically intended for PDF output (Monterey template from https://www.madcapsoftware.com/download ... templates/)

The stylesheet for this PDF project uses px for padding, margins, etc. Wouldn't it make more sense to use inches or centimeters or points? How does px get converted to something that is meaningful on a piece of paper?

Similarly, the page layout file contains a hodgepodge of units (inches, cm, px, etc).

If I were to create something from scratch that is solely intended for PDF output, what units should I use? I know to use points and em for font size but I am not sure about the other attributes.

Thank you

Isabelle
pageLayout.PNG
You do not have the required permissions to view the files attached to this post.
Chicago_HPT
Sr. Propeller Head
Posts: 133
Joined: Sun Feb 03, 2013 6:01 pm

Re: Using px for PDF output

Post by Chicago_HPT »

One option, if you're going to exclusively use print output, is to use "print" units of measurement, such at pt, mm, cm, or in. So a quarter inch margin might be written as margin-left: 0.25in; You can also use the relative measurements, such as em or rem but if you want to be precise, the print units should be fine.

If I recall correctly, if using px (pixels), these typically equate to 96px = 1in for most modern screens. So a quarter inch margin might be written as margin-left: 24px; Mobile screens technically have more pixels per inch but the device's OS or other software generally does the appropriate conversions.

Cheers,
-jeff
Post Reply