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 - Print PDF - 2
  FAQ FAQ  Forum Search   Register Register  Login Login

Print PDF - 2

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

Joined: 27 Jan 06
Location: Italy
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote phora Quote  Post ReplyReply Direct Link To This Post Topic: Print PDF - 2
    Posted: 27 Jan 06 at 5:11AM

Hi.

I need to print a pdf (~ 40K) and I use

QP.PrintDocument( Printer, 1, QP.PageCount, QP.PrintOptions( 1, 1, '' ) );

It takes about 1 minute !!!!!!!

How can i make my process a little more faster ?

Thanks for any suggestions.

phora

 

Back to Top
JanN View Drop Down
Senior Member
Senior Member


Joined: 29 Oct 05
Location: Germany
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote JanN Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 06 at 6:42AM
Wow, that's quite long. On what machine and OS are you running your application?

I also have experienced problems while printing with QuickPdf. But not with such small files.

How big is the spool job in the end?
Back to Top
JanN View Drop Down
Senior Member
Senior Member


Joined: 29 Oct 05
Location: Germany
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote JanN Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 06 at 6:45AM
Perhaps it is an alternative to print the document using Adobe Reader:

http://www.quickpdf.org/forum/forum_posts.asp?TID=139&PN=1
Back to Top
phora View Drop Down
Beginner
Beginner
Avatar

Joined: 27 Jan 06
Location: Italy
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote phora Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 06 at 7:13AM

The SO is Win98SE but I have this problem also on Win2000 or WinXP.

I'm using Delphi V.4

At the end, the spool job is 5.xx Mb ...

I tried to use AcroRd32 with "/p /h", but I' (as suggested by Ingo...) but I'm non very happy that AcroRd32 shows its windows...

My code is:

       QP.SaveToFile( '~~TMP.PDF' );
        if ( FindExecutable( '~~TMP.PDF', nil, ExeFileName ) > 32 ) then
     ShellExecute( hinstance, 'open', ExeFileName, PChar('/p /h ~~TMP.PDF' ), nil, SW_HIDE )
        else
         Res := ( QP.PrintDocument( Stampante, 1, QP.PageCount, QP.PrintOptions( 0, 1, '' ) ) > 0 );
       DeleteFile( '~~TMP.PDF' );

 

 

Back to Top
phora View Drop Down
Beginner
Beginner
Avatar

Joined: 27 Jan 06
Location: Italy
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote phora Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 06 at 8:58AM

PS.

If I use

ShellExecute( hinstance, 'open', ExeFileName, PChar('/p /h ~~TMP.PDF' ), nil, SW_HIDE )

I can print only on then default printer, I'm not able to select another printer...

This is not a very good ... above all for my costumers

 

Andrea

Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 06 at 10:30AM
It's best to use Adobe Reader's DDE interface for printing. It's documented in Adobe's IACReference.

Here's an example, with full source code, that hides Reader's splash screen; allows wildcard batch printing; printer, orientation and duplex selection; and closes Reader when printing is done:

http://www.geocities.com/sea_sbs/files/pdfp.zip

Here are some other "fun with QuickPDF" examples:

http://www.noliturbare.com/ChicksTools.html



Edited by chicks
Back to Top
swb1 View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert
Avatar

Joined: 05 Dec 05
Location: United States
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote swb1 Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 06 at 10:42AM
I have found (in the case of QuickPDF)  that page count is often a more important factor than is file size. How many pages does this document have?
Back to Top
seva View Drop Down
Beginner
Beginner


Joined: 28 Oct 05
Location: Israel
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote seva Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 06 at 12:30PM

Chicks,

Is it possible to set the printer page size with Adobe Reader's DDE interface ?

Seva Minkovich
www.etecad.com
seva@etecad.com
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 06 at 12:45PM
No, the DDE interface is strictly for printing the PDF. All printer settings need to be done first through the Windows API - anything that you set up in Reader from the "File/Print Setup" menu should be settable via the Windows printing API, which is a bit complex.

There is a way to set printer settings via Adobe Javascript, through Adobe's JSObject API, but I don't think it's accessible in Reader, just Acrobat (I may be wrong...)

Here's a linke to Adobe's IACReference document:

http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/iac/IACReference.pdf

Note that only a few of the DDE messages are available in Reader. The only COM object usable from Reader is
AxAcroPDFLib.AxAcroPDF, which can also be used for printing (and viewing), but it's only availabe in Reader 7.



Edited by chicks
Back to Top
phora View Drop Down
Beginner
Beginner
Avatar

Joined: 27 Jan 06
Location: Italy
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote phora Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jan 06 at 8:20AM

Hi Chicks.

Thanks for your help: I'm traslating from C to Delphi your code   so I can try it with my console application.

It your code good also for PC with OS lesser then Win200 and Acrobat Reader less than V.7.0.5 ?

Bye

 

Regards.
Andrea
Back to Top
phora View Drop Down
Beginner
Beginner
Avatar

Joined: 27 Jan 06
Location: Italy
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote phora Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jan 06 at 9:22AM

Hi CHicks.

I don't understand why you not use "DocOpen" and "DocClose" DDE messages in your code ....

The correct sequence'd be:

1) DocOpen

2) FilePrintTo

3) DocClose

Regards.
Andrea
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jan 06 at 11:09AM
Andrea,

Reader's DDE interface goes back at least to version 4. I don't have any OS still running before Win2K, but I don't see any reason why it wouldn't run on '95 or '98.

DocOpen and DocClose are only required if you are planning to view the documents in Reader. FilePrintTo works fine on its own.
Back to Top
phora View Drop Down
Beginner
Beginner
Avatar

Joined: 27 Jan 06
Location: Italy
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote phora Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jan 06 at 12:15PM

Thanks

Regards.
Andrea
Back to Top
lapinig View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Jan 06
Location: Italy
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote lapinig Quote  Post ReplyReply Direct Link To This Post Posted: 12 Feb 06 at 5:58AM
I had a similar problem, i print 2 or 3 copies on Kyocera FS-1750 Laser Printer with command QP.PrintDocument and using QP.PrintOptions and the Kyocera print one copy in one minute and another one minute for the next copy !!! Without using QP.PrintOptions the printer is much faster. I change the printer driver choosing a PCL driver instead the fully options Kyocera driver. Now i obtain the 2 copies in 20 seconds!!!
Back to Top
phora View Drop Down
Beginner
Beginner
Avatar

Joined: 27 Jan 06
Location: Italy
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote phora Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 06 at 3:23AM

Hi lapinig (Ciao)

Can you post an example of your code (2/3 righe di codice) ?

How can you work without QP.PrintOptions ?

Thanks (grasssssie)

 



Edited by phora
Regards.
Andrea
Back to Top
lapinig View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Jan 06
Location: Italy
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote lapinig Quote  Post ReplyReply Direct Link To This Post Posted: 19 Feb 06 at 6:02AM
Hi Phora

i used this fragment of code to print many copies of the same pdf document

' Default stampa tutte le pagine
PrimaPagina = 1
UltimaPagina = oPdf.PageCount()
' in txtCopie.text è indicato il numero di copie
' in <PrnName> è indicato il nome Windows della stampante
PrnName = "Epson EPL-6200L"
for j=1 to val(txtCopie.text)
oPdf.PrintDocument PrnName, PrimaPagina, UltimaPagina, 0
next j

With this command the speed of printing is very slow (i work with a Kyocera FS-1750), but using the NewCustomPrinter and PrintOptions the speed has incremented by 4-10 times!!!

Mi puoi contattare a questa e-mail lapinig(chiocciola)tiscali(punto)it
ciao
gualtiero
Back to Top
lapinig View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Jan 06
Location: Italy
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote lapinig Quote  Post ReplyReply Direct Link To This Post Posted: 19 Feb 06 at 6:13AM
I used a freeware open source PDFP.EXE to print, but for example it print "only" files with PDF extension, while i hide the file type used in my programs, i name the pdf file like *.$$$ (like a temporary file). PDFP has some problem printing on net shared printer and appear the dos window and i never want it.
Using Acrobat Reader to print directly the file generates many problems, like program hanging if there is a internet connection (attempting to update AcroReader, etc.) and my program depend on the version of acrobat reader installed...
Using Ised library i had resolve ALL my problems...
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 19 Feb 06 at 2:17PM
Originally posted by lapinig lapinig wrote:

I used a freeware open source PDFP.EXE to print, but for example it print "only" files with PDF extension, while i hide the file type used in my programs, i name the pdf file like *.$$$ (like a temporary file).


Which is one reason I made it open source, so you can change it to meet your needs...

Originally posted by lapinig lapinig wrote:


PDFP has some problem printing on net shared printer


News to me...

Originally posted by lapinig lapinig wrote:


and appear the dos window and i never want it.


See above comment re open source...

Originally posted by lapinig lapinig wrote:


Using Acrobat Reader to print directly the file generates many problems, like program hanging if there is a internet connection (attempting to update AcroReader, etc.) and my program depend on the version of acrobat reader installed...


Updates happen what, twice a year... Not exactly a major issue... I used the DDE interface rather than the new COM interface exactly for this reason - there ARE NO Reader version issues with the DDE interface...

Originally posted by lapinig lapinig wrote:


Using Ised library i had resolve ALL my problems...


Except spool file size, performance, rendering quality, inability to render MANY images correctly...

Don't get me wrong, I am a HUGE fan if QuickPDF as a general purpose PDF library, and use it in many applications. Its rendering/printing capabilities, on the other hand, are not up to the quality of the rest of the library, and certainly don't come close to Adobe Reader.


Edited by chicks
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. About — Contact — Blog — Support — Online Store