Print Page | Close Window

How to Print PDF

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=187
Printed Date: 29 Apr 24 at 2:53PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How to Print PDF
Posted By: loufeliz
Subject: How to Print PDF
Date Posted: 27 Nov 05 at 1:25PM
Hello. Is there a reliable way of sending PDF's to print? I have been unsuccesful in get OLE automation to work with Acrobat Reader to print. I am replacing a process that utilized Word via OLE automation to create documents and print them. Word solution has been very solid, but client now wants to use PDF forms as it will result in faster processing and no MS word dependancy.

- Lou



Replies:
Posted By: Ingo
Date Posted: 27 Nov 05 at 4:18PM
Hi Lou!
You can do this directly with QuickPDF. Here's a code snippet (in Delphi). Please read the QP-documentation which options are possible...
...
    QP := TiSEDQuickPDF.Create;
    try
       QP.UnlockKey('MyLicenceKey');
       QP.LoadFromFile(FileName);

       If QP.Encrypted > 0 Then
          QP.Unencrypt;

       prName     := QP.GetDefaultPrinterName();
       prOptions := QP.PrintOptions(2, 1, FileName);
       QP.PrintDocument(prName, 1, pc, prOptions);

    finally

       QP.Free;

    end;
...

You can do it with Acrobat Reader, too.

...
ShellExecute(hinstance,'open',PChar(c),PChar('/p ' + FileName),nil,SW_SHOWNORMAL);
// or you can hide it complete...
ShellExecute(hinstance,'open',PChar(c),PChar('/p /h ' + FileName),nil,SW_SHOWNORMAL);


Best regards,
Ingo




-------------
Cheers,
Ingo



Posted By: loufeliz
Date Posted: 27 Nov 05 at 11:29PM

Thanks. I will give them both a try and report back here with my results.  All I have left to resolve is my font alignment (right justify numeric collumns) problem

- Lou




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk