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 - Emulating A Printer
  FAQ FAQ  Forum Search   Register Register  Login Login

Emulating A Printer

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

Joined: 29 Jul 13
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote BirdGuy66 Quote  Post ReplyReply Direct Link To This Post Topic: Emulating A Printer
    Posted: 13 Sep 13 at 6:42PM
Hi,

I'm adding the ability to an application to output reports to PDF. Current that application only outputs to a printer using to standard GDI functions. To implement this, I've changed the printing code to create wrappers for the GDI Print API functions StartDoc, EndDoc, StartPage, EndPage. When printing to a to printer, the wrappers behave as expected but when outputting to a PDF file, they call QuickPDF library functions. The document is created but with only the first page. Here is the sequences of QuickPDF calls:

  1. QP.GetCanvasDC(10200, 13200);            // initialization
  2. // GDI operations on Canvas DC for first page
  3. QP.LoadFromCanvasDC(1200.0, 3);         // called on first EndPage invocation
  4. // GDI operations on Canvas DC for second page
  5. QP.NewPageFromCanvasDC(1200.0, 3);  // called on subsequent EndPage invocation
  6. QP.SaveToFile("Report.pdf");                    // called on EndDoc invocation

I should note that the call to NewPageFromCanvasDC fails which leads me to believe this is the wrong sequence of functions or that I'm missing some function calls to do what I need to do.

Any ideas? Thanks,

- Rich

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