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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - RenderDocumentToFiles/RenderPageToFile
  FAQ FAQ  Forum Search   Register Register  Login Login

RenderDocumentToFiles/RenderPageToFile

 Post Reply Post Reply
Author
Message
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Topic: RenderDocumentToFiles/RenderPageToFile
    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 !
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Apr 10 at 6:23AM
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

 
Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 27 Apr 10 at 8:30AM
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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Apr 10 at 9:48AM
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
 
Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 27 Apr 10 at 10:17AM
Yeah ! Thanks for your suggestion. I will do that soon.
Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 10 at 1:40AM
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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 10 at 7:13AM
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

Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 10 at 1:49AM
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.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 10 at 6:11AM
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

Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 10 at 8:59AM
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. 
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 10 at 10:19AM
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
Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 10 at 1:02AM
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.

Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 10 at 1:05AM
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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 10 at 6:27AM
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

Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 10 at 8:20AM
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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 10 at 9:44AM
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
Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 24 May 10 at 9:00AM
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

Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 24 May 10 at 9:09AM
Hi There, we will respond to your reply today with another solution to the problem.

Cheers,
- Rowan.
Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 27 May 10 at 9:48AM
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?
Back to Top
thangnvhl View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Apr 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote thangnvhl Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 10 at 9:54AM
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
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 10 at 10:29AM
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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store