Print Page | Close Window

Convert Pdf to Image on Mac

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2640
Printed Date: 21 May 25 at 6:30PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Convert Pdf to Image on Mac
Posted By: JMLM
Subject: Convert Pdf to Image on Mac
Date Posted: 12 May 13 at 12:03PM
Hi,
I can not convert a pdf to image I don't know if it is a bug. I tried with RenderPageToFile  , and RenderDocumentToFile . My images are empty.
Best regards 
Jim



Replies:
Posted By: Ingo
Date Posted: 12 May 13 at 8:27PM
So you've done something wrong... ;-)

You should post the relevant code part from ...create up to ...free
and then it should be possible to help you with this issue.

Cheers, Ingo




Posted By: Rowan
Date Posted: 13 May 13 at 2:35AM
Hi Jim,

Sorry to hear you're experiencing issues.

If you could upload the PDF that you're trying to convert to an image we'll run some tests on our end. Also which image type are you trying to save it as?

Cheers,
- Rowan.


Posted By: JMLM
Date Posted: 13 May 13 at 7:39AM
hi,
Thanks Ingo and Rowan.
in fact , for testing i used :

if([DQPL RenderDocumentToFile:300: 0: pageCount: 1: @"/Users/JMLM/Desktop/test/image-%p.jpg"]) NSLog(@"OK");( prompt Ok but images are empty)

or 

int pageCount = [DQPL PageCount]; 

    for( int nPage = 0; nPage < pageCount; ++nPage ) {     

      

        [DQPL RenderPageToFile:72 : nPage :1 :@"/Users/JMLM/Desktop/test/image.jpg"]; 

        [DQPL RenderPageToString:300 : nPage :1]             

}


(I also tried with png option : 5)


For my project I want to store the result as a blob text, the result (NSData*) of RenderPageToString is also empty.

I want to convert any pdf to images (from : Word, Open Office, Acrobat ...) I tried with differents sources of Pdf. 


I tested on Lion and Mountain Lion.


Cheers Jim.



Posted By: JMLM
Date Posted: 17 May 13 at 2:51PM
HI
I have tested these lines code on windows os (C#) and it works fine but on mac , images are empty.
Cheers Jim


Posted By: Ingo
Date Posted: 17 May 13 at 7:11PM
Hi Jim!

Did you check the returning values from the functions?
And if there's something strange you can use LastErrorCode...
Did you read this:
http://www.debenu.com/kb/debenu-quick-pdf-library-and-mac-xcode-projects/

Cheers, Ingo



Posted By: JMLM
Date Posted: 17 May 13 at 9:10PM
Hi Ingo,
I did that, my project works fine, except this function.
I can use all your sample easily.


[DQPL RenderDocumentToFile:72: 0: iNumPages: 5: @"/Users/JMLM/Documents/jpg/png.png"];

return 1

in Loop :

 NSString *name = [NSString stringWithFormat:@"/Users/JMLM/Documents/jpg/img-%d.png", i];

[DQPL RenderPageToFile:300 :i :5 :name];

return 1



[DQPL RenderPageToString:300 : nPage :1]  

return Empty NSdata



Cheers Jim



Posted By: JMLM
Date Posted: 18 May 13 at 8:33AM
Hi, 
I tested with the last version 0914.
Same problem on mac Os.
Cheers Jim.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk