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!
![]() |
problems printing a list of pdf |
Post Reply ![]() |
Author | |
lbcs ![]() Beginner ![]() Joined: 14 Mar 12 Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
jpbro ![]() Senior Member ![]() Joined: 29 Mar 11 Status: Offline Points: 77 |
![]() ![]() ![]() ![]() ![]() |
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? |
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
Are you using multitheading to print the documents ?
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
lbcs ![]() Beginner ![]() Joined: 14 Mar 12 Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
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