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 - PDFLibrary.PrintDocument with blanc page
  FAQ FAQ  Forum Search   Register Register  Login Login

PDFLibrary.PrintDocument with blanc page

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


Joined: 26 Mar 15
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote iosam Quote  Post ReplyReply Direct Link To This Post Topic: PDFLibrary.PrintDocument with blanc page
    Posted: 26 Mar 15 at 5:22PM
I use PDFLibrary.PrintDocument and when I execute my function the printed page is only white.

Here is my code to print a pdf from a Memorystream

DFLibrary.LoadFromStream(PDFStream, '');
printoptions := PDFLibrary.PrintOptions(1, 0, '');
nret := PDFLibrary.PrintDocument(printer, 1, 1, printoptions);

is there something that I forgot?






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

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 29 Mar 15 at 1:09PM
I would suggest making a call to RenderDocumentToFile after the LoadFromStream call to ensure that the PDF can be successfully rendered to an image. That will confirm whether the file is loading and rendering correctly. If that is successful then the problem obviously lies with the printing side of things.

When displaying an image of a PDF onscreen or printing one to paper the same rendering process is required, so this will help to see where the problem is.
Back to Top
agat View Drop Down
Beginner
Beginner


Joined: 18 Jun 15
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote agat Quote  Post ReplyReply Direct Link To This Post Posted: 18 Jun 15 at 12:17PM
I have similar problem. I'm trying to print pdf file with printDocument function.
This document is supposed have an image (it is a scan) on the first page and a text on the second page.

The problem is that printout contains first blank page where supposed to be an image (the second page is correctly filled with text)

I tried to use renderDocumentToFile function and it gives same result.
When I just save the document and reopen, both text and image are present.

my code:

  var QP = new QuickPDF();
  DebenuPDFLibraryDLL1014.PDFLibrary pdf = QP.unlockLibrary();

  string f = "C:\temp\file.pdf";   
  pdf.LoadFromFile(f, "");
  int n = pdf.PageCount();
  string printer = pdf.GetDefaultPrinterName(); 
  int result = pdf.PrintDocument(printer, 1, n, 0);



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