Issue in fetching correct height and width after extracting from pdf
Posted: 2015-06-08T01:36:07-07:00
Hi,
I am using below code to extract image from pdf :-
Which is working fine and image saved in jpg format.
But when I try to fetch width and height of saved image its not give me the original height and width which I have given in pdf.
Issue is pdf will be uploaded by end user so I am not able to give resolution in above code.
So please help me to save image from pdf in the original resolution, height and width.
Any help will be appreciated.
Thanks in Advance.
I am using below code to extract image from pdf :-
Code: Select all
$imagick = new Imagick();
$imagick->readImage('D:\DBCL\1.pdf');
$imagick->writeImage('D:\DBCL\output.jpg');
But when I try to fetch width and height of saved image its not give me the original height and width which I have given in pdf.
Issue is pdf will be uploaded by end user so I am not able to give resolution in above code.
So please help me to save image from pdf in the original resolution, height and width.
Any help will be appreciated.
Thanks in Advance.