Summary: | Enhancement: documentation for pdf scaling | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | MarjaE <marja-e> |
Component: | Documentation | Assignee: | Default assignee <ghostpdl-bugs> |
Status: | RESOLVED INVALID | ||
Severity: | enhancement | ||
Priority: | P4 | ||
Version: | 9.25 | ||
Hardware: | Macintosh | ||
OS: | MacOS X | ||
Customer: | Word Size: | --- |
Description
MarjaE
2018-10-16 05:32:58 UTC
(In reply to MarjaE from comment #0) > I think it would help to fit some of my pdfs to my e-reader, so pixels in > raster images in the pdf match up with pixels on the screen. I am sure other > users may also have reason to fit some of their pdfs to specific sizes. PDF files don't have a size in 'pixels'. All measurements in PDF files, including the media size, are in points where 1 point = 1/72 inch. So there's no way to 'resize' a PDF file to pixels. If you know the dimensions of the target device then you can create a scaled PDF very simply; -dDEVICEWIDTHPOINTS=x -dDEVICEHEIGHTPOINTS=y -dFIXEDMEDIA -dPDFitPage However, this almost certainly won't mean that samples in images in the PDF file will 'match up' with the pixels in your screen. That's a hopeless goal. > If you know the dimensions of the target device then you can create a scaled PDF very simply; -dDEVICEWIDTHPOINTS=x -dDEVICEHEIGHTPOINTS=y -dFIXEDMEDIA -dPDFitPage According to the documentation, -dFIXEDMEDIA creates a *cropped* pdf. If the documentation is wrong, then it would help to correct it. -dPDFFitPage doesn't explain how to set the device page size. And is -dPDFSETTINGS still used? > However, this almost certainly won't mean that samples in images in the PDF file will 'match up' with the pixels in your screen. That's a hopeless goal. k2pdfopt does that for scanned pdfs. Using the device settings there, which include pixel count, makes things *much* more readable than using default settings. |