I want to generate PDF to Jpeg image with a width of 900px and 150 dpi with the help of Ghostscript rasterizer.
How to set dpi for Jpeg when converting ghostscript rasterizer
771 Views Asked by Dinesh Gouttam At
1
There are 1 best solutions below
Related Questions in JPEG
- Java resized JPEG seems to be invalid format for Facebook?
- Exif and EXIF are two different Chunks with different format
- Could converting a JPG to PNG or PPM be a good idea?
- What is the difference between converting PNG images to JPEG using convertio.co
- How to use OpenGPEG Part 10, JP3D
- How to edit the Samsung Trailer Tag "Timestamp"
- how to convert .SVS to .JPEG with python using tifffile
- I am trying to read an JPEG image, which is of 32 bits pixels, but ImageIO.read(new File(path)).getColorModel() akways returns 24 bits
- Do I lose quality if I decompress a JPEG file into a ppm using libjpeg-turbo C library?
- How to use JP3D in Openjpeg to compress medical images (. ni)
- What is causing the output image of this ffmpeg command to reduce by~95% in file size?
- What's the meaning of the characters in the JPEG binary byte stream opened in python?
- Unable to Display Mapped PNG and JPG Images in Next.js
- Convert black and white Bitmap to Single-Channel JPEG in Android
- Audio to spectrogram image and back to audio
Related Questions in GHOSTSCRIPT
- eps converted from PDF using ghostscript looks bitmapped
- GS Error : Can't use Object streams before PDF 1.5, ignoring WriteObjStms directive
- Why does Ghost script 10.02.01 rotate barcode elements 180 degrees counterclockwise?
- GhostScipt High CPU Usage
- How to print a remote PDF file with gsprint (+python later on)?
- Convert PDF to PDF/A using python
- Ghostscript eps file conversion to jpg not working inside the .NET application
- format and crop with ghostscript
- error in saving tiff files to a pdf file using ghostscript win64c
- ps2write rasterizes Type1C font
- Merging PDFs with gs generates /undefinedfilename error
- Setting GhostScript -sFONTMAP argument to control parameters
- Text overlaid with Ghostscript not visible
- Wrong extra spaces for CID TrueType formated lines when converting PDF to JPG with Ghostscript
- Trying to re-define GS display window orientation for easier viewing/debugging of postscript code
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can set the size of the image in 2 ways; firstly if you know the size of the PDF media (the MediaBox), which is in the PDF file, and is in PostScript units (1/72 of an inch) then a simple calculation will give you the required rendering resolution:
target X resolution = output width in pixels / (Media width / 72)
target Y resolution = output height in pixels / (Media height / 72)
You can then set the resolution using the
-rswitch as described in the documentation hereAlternatively you can set the output media size in pixels using the
-gswitch, and then use the-dPDFFitPageswitch to have Ghostscript scale the PDF content so that it fits into the output. Note that this method scales isomorphically. That is the same scale factor is applied to both the x and y directions.The -g switch is described in the documentation here and the -dPDFFitPage switch is described here.