Forum: Ruby on Rails Images to pdf

0c62e9f88e069423ae0d71eb89ab4f26?d=identicon&s=25 kiran cy (kirankumarcy)
on 2012-09-20 13:23
i converted pdf to images and the images back to pdf. While converting
back to pdf the images are not in order
for example if there are 14 images after the first image 10 image will
come then 11,12,13,14 and then 2,3,4,5,6,7,8,9
What is the problem?
Dbeeec9520edd7621a0040bb8a7a34b2?d=identicon&s=25 ANIKET KADAM (Guest)
on 2012-09-20 13:30
(Received via mailing list)
can you tell me how you converted Images to PDF, please tell i m new to
rails
19fad8b2f5f9948322c3fe0441265298?d=identicon&s=25 Jim ruther Nill (jimboker)
on 2012-09-20 13:36
(Received via mailing list)
On Thu, Sep 20, 2012 at 9:28 PM, ANIKET KADAM
<aniketkadam1992@gmail.com>wrote:

>> What is the problem?
>>
>
it is sorting them as string not as integers


>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



--
19fad8b2f5f9948322c3fe0441265298?d=identicon&s=25 Jim ruther Nill (jimboker)
on 2012-09-20 13:40
(Received via mailing list)
On Thu, Sep 20, 2012 at 9:28 PM, ANIKET KADAM
<aniketkadam1992@gmail.com>wrote:

> can you tell me how you converted Images to PDF, please tell i m new to
> rails


you can use rmagick

http://lmgtfy.com/?q=convert+pdf+to+image+rmagick


>> --
>>
>
--
Dbeeec9520edd7621a0040bb8a7a34b2?d=identicon&s=25 ANIKET KADAM (Guest)
on 2012-09-20 13:43
(Received via mailing list)
Thanks
0c62e9f88e069423ae0d71eb89ab4f26?d=identicon&s=25 kiran cy (kirankumarcy)
on 2012-09-20 13:44
ANIKET KADAM wrote in post #1076796:
> can you tell me how you converted Images to PDF, please tell i m new to
> rails

require 'RMagick'
    images = Dir["/home/*.jpg"]
    imglist = Magick::ImageList.new
    imglist.read(*images.natural_sort)
    imglist.write("converted.pdf")
Dbeeec9520edd7621a0040bb8a7a34b2?d=identicon&s=25 ANIKET KADAM (Guest)
on 2012-09-20 16:18
(Received via mailing list)
Thanks
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.