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!
PDFLibrary.PrintDocument with blanc page |
Post Reply |
Author | |
iosam
Beginner Joined: 26 Mar 15 Status: Offline Points: 2 |
Post Options
Thanks(0)
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? |
|
Rowan
Moderator Group Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
|
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.
|
|
agat
Beginner Joined: 18 Jun 15 Status: Offline Points: 1 |
Post Options
Thanks(0)
|
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); |
|
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