• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
COnvert PDF file to JPG file

#1
[eluser]rash[/eluser]
Hello all,

I am trying to convert pdf file to jpg file at the time of file upload.
can anyone help me for this that how i can do...


Thanks in advance

#2
[eluser]noideawhattotypehere[/eluser]
There is like 1000000000 guides when you enter 'php pdf to jpg' in google... Use it, wont hurt

#3
[eluser]rash[/eluser]
Hello noideawhattotypehere

I already serched in google and there is also an imagick library which do this better.
But my problem is that how can i use imagick in my project, i don't understand it. so, if there is some example that previously used by anyone then it should help me.

and thanks for your response, but always firstly i search in google and after that in this blog.

Thanks

#4
[eluser]jonez[/eluser]
The image library supports ImageMagick if you have it installed on your server: http://ellislab.com/codeigniter/user-gui...e_lib.html

Code:
$config = array(
    'image_library' => 'imagemagick',
    'library_path' => 'imagemagick_file_path_goes_here',
    'source_image' => $pdf_path,
    'new_image' => $img_path,
    'maintain_ratio' => true,
    'width' => 365,
    'quality' => '100%',
   );

   $this->image_lib->initialize( $config );

   if ( $this->image_lib->resize( ) ) {
    $this->image_lib->clear( );
   }

#5
[eluser]rash[/eluser]
Hello PM jonez

Thanks for the reply and the link.

But there is doubt i.e. where i am write the code?? in controller?? and in module i write the code for dtaabase inset?? is it the correct process??

Kindly reply for this...i am now just coded in normal mvc and learning about codeigniter mvc.

Thanks


#6
[eluser]jonez[/eluser]
You can put it anywhere. The code I pasted was used in a library since multiple controllers call it. If you don't need the code shared between controllers you can put it in the one controller you need. Or if the thumbnail is part of a single object action you could put it in the model.

#7
[eluser]rash[/eluser]
Hello jonez

Thank you for the reply. I am trying to implement it.

#8
[eluser]Unknown[/eluser]
I used to convert PDF file to JPG image on my work with this PDF converter, works fairly well, hope it helps you.
http://www.pdftoworddoc.com/pdf-converter.html
Contact me if you have any other question.

#9
[eluser]Unknown[/eluser]
If you want to convert pdfs to jpeg you are best advised to use online services such as: pdfjpg.net. Simple upload your pdfs and download your newly converted jpegs.
Hope this helps Baki1492

#10
[eluser]Unknown[/eluser]
google does help Tongue
there are literally millions of sites that will do this, quick and easy
if you want more options such as page selection and rotation, http://online-pdf.org/ isnt too bad
if you dont trust any online sites, you can just use adobe's program Smile
regards


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.