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 - problems printing a list of pdf
  FAQ FAQ  Forum Search   Register Register  Login Login

problems printing a list of pdf

 Post Reply Post Reply
Author
Message
lbcs View Drop Down
Beginner
Beginner


Joined: 14 Mar 12
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote lbcs Quote  Post ReplyReply Direct Link To This Post Topic: problems printing a list of pdf
    Posted: 14 Mar 12 at 7:45AM
Hi, my procedure creates pdf documents and stores them in an archive; the size of the documents is always between 1 and 3 pages (80-200 Kb).
Later a user selects a list of documents and prints them, but 'sometimes' documents with more than 1 page have a problem; the first page is ok, the second is not printed and instead you get a blank page. The doc is ok, if you select it again and print it alone, it works.
For example, yesterday they printed a list of 50 docs, and the 32nd (2-page doc) was printed like that, first page ok and a blank page.
I think it could be a network problem or a printer problem, maybe the print queue is too long. Should I slow the process adding some delay ?
 
thanks
Back to Top
jpbro View Drop Down
Senior Member
Senior Member


Joined: 29 Mar 11
Status: Offline
Points: 77
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 12 at 12:58PM
Are you removing the documents from QPDF after you print them? If not, they will all be in memory (32 documents and counting), and perhaps you are running out of memory?

Maybe you could share your print code so we can see if we can spot a problem?
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 12 at 1:49PM
Are you using multitheading to print the documents ?

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

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 12 at 8:55PM
Hi!

I think Andrews questions goes the right way.
Calling the function again before there's the result from the call before
could let you stumble into problems ;-)

Cheers, Ingo
Back to Top
lbcs View Drop Down
Beginner
Beginner


Joined: 14 Mar 12
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote lbcs Quote  Post ReplyReply Direct Link To This Post Posted: 15 Mar 12 at 7:03AM
I use the DLL with MS Visual C++ 6.0 and i don't use multithreading.
I just use my PrintQuick class with some functions.
 
PrintQuick::PrintQuick()
{
   pdf = new QuickPDFDLL0812(...path...);
   pdf->UnlockKey(...);
   pdf->SetPageSize(L"A4");
}
PrintQuick::LoadFile(wPathFile)
{
    int iRet = pdf->LoadFromFile(wPathFile,L"");
}
PrintQuick::RemoveFile()
{
    int iId = pdf->SelectedDocument();
    pdf->RemoveDocument(iId);
}
PrintQuick::PrintFile(printer)
{
     std::wstring wQuickPrn = pdf->NewCustomPrinter(printer);
     pdf->SetupCustomPrinter(wQuickPrn,1,DMPAPER_A4);
     int iNum = pdf->PageCount();
     int iOptions = pdf->PrintOptions(1,0,L"Print Options"); // fit to page
     pdf->PrintDocument(wQuickPrn,1,iNum,iOptions);
}
PrintQuick::~PrintQuick()
{
   delete pdf;
}
 
When the user selects a list of docs to print, there's just a loop:
for (iDoc=0;iDoc<iMaxDoc;iDoc++)
{
 CPrintQuick printPdf;
 printPdf.LoadFile(ListDoc.GetAt(iDoc));
 printPdf.PrintFile(printerName);
 printPdf.RemoveFile();
}
 
thanks
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