Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
RenderDocumentToFiles/RenderPageToFile |
Post Reply |
Author | |
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
Posted: 27 Apr 10 at 5:10AM |
I am trying to use RenderDocumentToFiles() and RenderPageToFil() to convert pdf pages to images.
But after convert successful,my result images has color different from original color of pdf file. Does anyone know what's wrong here? Please show me how to solve this problem? Thank you very much ! |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Thang!
You won't solve the problem. This prob can raise only in few cases. Normally the effect is seeing the text in white and the background in black. In very few cases the colors can look a bit different. But like i've said only in very few cases. It depends on how complicated the pdf was built (some 3d-models or something similar). In your daily work with "normal" documents you won't have this effect. What type of documents did you use for testing? Do you have some samples for us? If it always happens in your case: Please let us have a look on your code. Cheers, Ingo |
|
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
Dear Ingo,
Thanks for your reply. My code is very simple. private bool ConvertFiles(string sInputPdfFile, string sOutputFile, int iOutputType) { try { if (PDFLib.LoadFromFile(sInputPdfFile) != 1) return false; if (iOutputType == 1) // iOutputType is assigned to 1 by default (mean jpeg type) PDFLib.SetJPEGQuality(100); if (PDFLib.RenderDocumentToFile(100, 1, PDFLib.PageCount(), iOutputType, sOutputFile) == 0) return false; else return true; } catch { return false; } } And here is link to my testing file: http://www.mediafire.com/?nzzwd0gwrww Regards, V.T |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
You didn't do anything wrong. There are few huge image-objects included which makes the library a bit to disorder. So all things are on the images but the adobe trade mark is yellow instead of read and the whole text is blue instead of black. You should post all this stuff and your description to the official support pages 'cause it's a lack of functionality and so we can't help you here. Cheers, Ingo |
|
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
Yeah ! Thanks for your suggestion. I will do that soon.
|
|
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
I use Lib DLL in Langeguage programming c++ . I used lib quickpdflibrary version 7.18 and 7.19
my code C++ void QuickpdfToImage(const char* filePdf,string filejpeg) { char logFile[1 + MAX_PATH]; char szPathDllLib[1 + MAX_PATH]; memset(szPathDllLib,0,1 + MAX_PATH); //GetModuleFileName(hInst, szPathDllLib,1 + MAX_PATH); GetModuleFileName(hInst, szPathDllLib,1 + MAX_PATH); ::PathRemoveFileSpec(szPathDllLib); strcat_s(szPathDllLib,1 + MAX_PATH,_T("\\")); strcpy_s(logFile,1 + MAX_PATH,szPathDllLib); strcat_s(logFile,1+ MAX_PATH,"LOG\\"); if (!PathFileExists(logFile)) ::CreateDirectory(logFile,NULL); strcat_s(szPathDllLib,1+ MAX_PATH,"QuickPDFDLL0719.dll"); string fileLibDll = string(szPathDllLib); string Pdf = string(filePdf); QuickPDFDLL0719* plib = NULL; plib = new QuickPDFDLL0719(fileLibDll); if (plib != NULL) { if (1 == plib->UnlockKey("mykey")) { try { int FileHandle = plib->DAOpenFile(Pdf,string("")); int pageCount = plib->PageCount(); plib->SetJPEGQuality(100); plib->RenderDocumentToFile(100,1,pageCount ,1,filejpeg); plib->DACloseFile(FileHandle); } catch(...) { int code = plib->LastErrorCode(); writeToLog(logFile,code); } } } // if plib != NULL } when call Function this .REsult only onefile convert with content blank. Please help me fix Error. Edited by Ingo - 14 May 10 at 7:06AM |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
I don't know how to use C++ with the dll... In the reference guide there's a different syntax for the dll: int QuickPDFRenderDocumentToFile(int InstanceID, int DPI, int StartPage, int EndPage, int Options, char * FileName) Cheers, Ingo |
|
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
lib DLL Error .
I added 2 file QuickPDFDLL0719.cpp and QuickPDFDLL0719.h in directory with path C:\Program Files\Quick PDF Library\DLL\Import\CPlusPlus to my project. complie exe convert file.pdf with multipage to JPeg. then only first page pdf file are converted to JPeg. Call funcion void QuickpdfToImage(const char* filePdf,string filejpeg) { char logFile[1 + MAX_PATH]; char szPathDllLib[1 + MAX_PATH]; memset(szPathDllLib,0,1 + MAX_PATH); //GetModuleFileName(hInst, szPathDllLib,1 + MAX_PATH); GetModuleFileName(hInst, szPathDllLib,1 + MAX_PATH); ::PathRemoveFileSpec(szPathDllLib); strcat_s(szPathDllLib,1 + MAX_PATH,_T("\\")); strcpy_s(logFile,1 + MAX_PATH,szPathDllLib); strcat_s(logFile,1+ MAX_PATH,"LOG\\"); if (!PathFileExists(logFile)) ::CreateDirectory(logFile,NULL); strcat_s(szPathDllLib,1+ MAX_PATH,"QuickPDFDLL0719.dll"); string fileLibDll = string(szPathDllLib); string Pdf = string(filePdf); QuickPDFDLL0719* plib = NULL; plib = new QuickPDFDLL0719(fileLibDll); if (plib != NULL) { if (1 == plib->UnlockKey("mykey")) { try { int FileHandle = plib->DAOpenFile(Pdf,string("")); int pageCount = plib->PageCount(); plib->SetJPEGQuality(100); plib->RenderDocumentToFile(100,1,pageCount ,1,filejpeg); plib->DACloseFile(FileHandle); } catch(...) { int code = plib->LastErrorCode(); writeToLog(logFile,code); } } } // if plib != NULL } example QuickpdfToImage("C:\\test\\test.pdf",string("C:\\output\\test.jpg")); test.pdf have 4 page; but dir C\\output only test0.jpg I found the contents of test0.jpg different the first page of pdf file. (file test0.jpg with content empty ) I think QuickPDFDLL0719.dll error.Please help me fix this errror. |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
I think test0.jpg is empty 'cause image-creation failed. Reason for this should be the mixed use of DA- and non-DA-functions. t's not possible to mix DA-functions with "normal" functions. Cheers, Ingo |
|
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
I have tested pdf file (please download below link : http://www.mediafire.com/?lzmdje4nnml ).
function in RenderDocumentToFile(100,1,pageCount ,1,filejpeg); convert with total pages with content empty. QuickPDFDLL0719.dll Error Can't convert true content that pdf file . Please fixed this Error. |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
First again: Don't mix DA- and non-DA. Perhaps the non-DA-function PageCount delivers nothing 'cause the pdf was opened with a DA-function. Another thing is that the sample ado_net.pdf has only less user-rights and a main password. I think that's the problem. At last: We won't fix here anything. For this you should post on the official support pages. Cheers, Ingo Edited by Ingo - 19 May 10 at 10:21AM |
|
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
I've fixed the code in my project. I only use non-DA whole function.
Export your movie I tested several pdf. but it is a pdf file conversion incorrectly. pdf file link download for testing: http://www.mediafire.com/?lzmdje4nnml. |
|
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
I've revised the code in my project. I only use non-DA whole function.
I tested several pdf files. but it is a pdf file conversion incorrectly. pdf file link download for testing: http://www.mediafire.com/?lzmdje4nnml |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
For me (and my app) rendering with your ADO_NET.pdf is okay. If you've any problems you should post your complete code and the pdf (there's an upload-functionality) on the official support-pages from Debenu: http://www.quickpdflibrary.com/support/support-query.php Cheers, Ingo |
|
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
Hi!
We try to use the library quickpdf to convert pdf files to image (JPEG, TIFF ,...). Before deciding to buy the library. This is the complete source code written in C + + . LINK download my project source code adn pdf file for your support : http://www.mediafire.com/?mmmzkfmrjjo |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
It seems to me that you didn't understand? THIS isn't the OFFICIAL support-page ... It's only a user-user-forum. I don't want to download a complete project looking for any bugs and getting nothing for this. Sorry... but i hope you understand now. If you think that there's a bug you should post it to the official support pages. Do it right now. Cheers, Ingo Edited by Ingo - 20 May 10 at 9:46AM |
|
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
Hi!
I was on the support page and mail it to you to solve the problem for about RenderDocument pdf file. That I have mentioned. You told me to try setting SetAdvancePassword function with a blank password field.I have followed your instructions . But without success. But until now I have not seen you reply to me email |
|
Rowan
Moderator Group Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
|
Hi There, we will respond to your reply today with another solution to the problem.
Cheers, - Rowan.
|
|
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
Hi!
lib quickpdf still error when convert pdf to JPEG image. Results Jpeg file content other than the original file content? You really did not fix the problem? |
|
thangnvhl
Beginner Joined: 20 Apr 10 Status: Offline Points: 18 |
Post Options
Thanks(0)
|
Old Error still. After converting from pdf to jpeg successful, the results received. File
changed color, some were the letters page pdf override on the others.
You can check to see ADO_NET.pdf results after conversion into JPEG |
|
Rowan
Moderator Group Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
|
Please reply to the email (case 2090) that we sent to you with our solution to this problem.
This forum is not the right place to ask for official support. If you reply to the email we will be able to help you.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store