FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 01-13-2012, 11:49 AM
Abhishek Dixit
 
Default jpg to pdf conversion retaining quality of image

I am converting images to pdfs.I use imagemagick via following command

$bash convert page.jpg page.pdf
and then combine multiple pdf's generated accordingly by command

$bash pdftk 1.pdf 2.pdf output result.pdf
but I noticed loss of quality in the resulting pdf.Is there some way
that I can retain the quality of pdf i.e. I want same quality in pdf
as the image is.
I am not sure if this convert command is using imagemagick library is
there any better solution? I have 100's of images to convert to pdf so
I prefer to use command line I am invoking them in a shell script.I am
looking for how can I retain quality of pdf.Is there any tool for the
same?


-------------------------
Regards
Abhi

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-13-2012, 10:02 PM
 
Default jpg to pdf conversion retaining quality of image

----- Original Message -----
> From: "Abhishek Dixit" <abhidixit87@gmail.com>
> To: "Ubuntu user technical support, not for general discussions" <ubuntu-users@lists.ubuntu.com>
> Sent: Friday, January 13, 2012 4:49:12 AM
> Subject: jpg to pdf conversion retaining quality of image
> I am converting images to pdfs.I use imagemagick via following command
>
> $bash convert page.jpg page.pdf

snip

> but I noticed loss of quality in the resulting pdf.Is there some way
> that I can retain the quality of pdf i.e. I want same quality in pdf
> as the image is.

I don't know about "same" quality. But there are two issues. Imagemagik will try and set both jpeg compression and (IIRC) document dpi based on what it expects the output to be. Default DPI is 72 and compression adjusted for that. Not sure about the default PDF page size, but that could be where your quality is going. The two command line options I would look at are density and quality. Like this:

$ convert in.jpg -density 300 -quality 100 out.pdf

What you are telling convert is that this is to be a 300 dpi image and you want the highest possible quality (ie the least) compression. To be truthful, I cannot recall having used both together. I would start with just the -quality option and see if you like the output. If not, try various permutations and find one that suits you.

You can read more on the options here:
http://www.imagemagick.org/script/command-line-processing.php

Good luck,

-- PE

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-14-2012, 10:27 AM
Paul Sladen
 
Default jpg to pdf conversion retaining quality of image

On Fri, 13 Jan 2012, Abhishek Dixit wrote:
> I am converting images to pdfs.I use imagemagick via following command

It's a bit of problem, see:

"Inkscape: Embedded jpg exported to EPS/PDF as non-jpeg (JPEGs are
stored /FlateDecode instead of /DCTDecode)"
https://bugs.launchpad.net/inkscape/+bug/168708

when I've done it, I've done it manually (pdftk, and hand-hacking),
but it was time-consuming.

-Paul


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 10:49 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org