Many webservers serve maps as scalable pdf files (e.g. www.ratp.fr).
It is convenient to convert those to PNG.
By default, nconvert uses an intermediate scale, resulting is details loss.
Does anyone know how to convert PDF into PNG so as to retain
the maximum level of details (100% scaling) ?
I tried to force -dpi using the value i get from 'nconvert -info'
and also -resize, but resize is applied to the target image afterwards.
So the following did not achieve PDF scale selection.
# nconvert -info paris_metro.pdf
Xdpi : 72
Ydpi : 72
# nconvert -out png -dpi 72 paris_metro.pdf
# nconvert -out png -resize 200% 200% paris_metro.pdf
Best regards,
Phil
converting scalable pdf files
Moderators: helmut, XnTriq, xnview
Re: converting scalable pdf files
Do you have tried to use -dpi 300?positron wrote:Many webservers serve maps as scalable pdf files (e.g. www.ratp.fr).
It is convenient to convert those to PNG.
By default, nconvert uses an intermediate scale, resulting is details loss.
Does anyone know how to convert PDF into PNG so as to retain
the maximum level of details (100% scaling) ?
I tried to force -dpi using the value i get from 'nconvert -info'
and also -resize, but resize is applied to the target image afterwards.
So the following did not achieve PDF scale selection.
# nconvert -info paris_metro.pdf
Xdpi : 72
Ydpi : 72
# nconvert -out png -dpi 72 paris_metro.pdf
# nconvert -out png -resize 200% 200% paris_metro.pdf
Pierre.
Re: converting scalable pdf files
> Do you have tried to use -dpi 300 ?
You are right, it does work. So intuitively i think one
should rather use MULTIPLES of the dpi given by 'nconvert -info'.
So i tried 144 instead of 72 as dpi as got a pretty result.
Or are scales normalized in PDF documents (are 72, 300
normalized values) ?
Could (should) "nconvert -info" report the PDF DPI giving
the highest level of details (i ignore PDF specs, and if various
DPI corresponding to scales appears in PDF headers ...).
In other words, so as to feed the dpi param in nconvert,
how can one determine the smallest DPI that
gives all details ?
Thanks Pierre
Phil
You are right, it does work. So intuitively i think one
should rather use MULTIPLES of the dpi given by 'nconvert -info'.
So i tried 144 instead of 72 as dpi as got a pretty result.
Or are scales normalized in PDF documents (are 72, 300
normalized values) ?
Could (should) "nconvert -info" report the PDF DPI giving
the highest level of details (i ignore PDF specs, and if various
DPI corresponding to scales appears in PDF headers ...).
In other words, so as to feed the dpi param in nconvert,
how can one determine the smallest DPI that
gives all details ?
Thanks Pierre
Phil