Images to pdf

38 views
Skip to first unread message

kiran cy

unread,
Sep 20, 2012, 7:23:40 AM9/20/12
to rubyonra...@googlegroups.com
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?

--
Posted via http://www.ruby-forum.com/.

ANIKET KADAM

unread,
Sep 20, 2012, 7:28:50 AM9/20/12
to rubyonra...@googlegroups.com
can you tell me how you converted Images to PDF, please tell i m new to rails

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Jim Ruther Nill

unread,
Sep 20, 2012, 7:34:44 AM9/20/12
to rubyonra...@googlegroups.com
On Thu, Sep 20, 2012 at 9:28 PM, ANIKET KADAM <aniketk...@gmail.com> wrote:
can you tell me how you converted Images to PDF, please tell i m new to rails


On Thu, Sep 20, 2012 at 4:53 PM, kiran cy <li...@ruby-forum.com> wrote:
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?

it is sorting them as string not as integers
 

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.com

Jim Ruther Nill

unread,
Sep 20, 2012, 7:38:25 AM9/20/12
to rubyonra...@googlegroups.com
On Thu, Sep 20, 2012 at 9:28 PM, ANIKET KADAM <aniketk...@gmail.com> wrote:
can you tell me how you converted Images to PDF, please tell i m new to rails

ANIKET KADAM

unread,
Sep 20, 2012, 7:42:35 AM9/20/12
to rubyonra...@googlegroups.com
Thanks

kiran cy

unread,
Sep 20, 2012, 7:44:26 AM9/20/12
to rubyonra...@googlegroups.com
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")

ANIKET KADAM

unread,
Sep 20, 2012, 10:17:01 AM9/20/12
to rubyonra...@googlegroups.com
Thanks

danny thyui

unread,
Jul 23, 2013, 10:55:00 PM7/23/13
to rubyonra...@googlegroups.com
I do this almost daily. I use a PDF converter driver found on the
internet . Install it and it becomes a selectable converter option.Then
you can convert PDFs to many forms in any program at all, including
Adobe Acrobat . Just open a PDF, select convert, and choice a form you
want,then you can convert pdf to image and vice versa. the task will be
finished in several seconds. if you haven't found a good choice , you
can have a try. best wishes.
http://www.rasteredge.com/how-to/csharp-imaging/pdf-creating/
Reply all
Reply to author
Forward
0 new messages