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!
![]() |
Cannot able to fill and print PDF document |
Post Reply ![]() |
Author | |
rizzz86 ![]() Beginner ![]() ![]() Joined: 17 Oct 16 Location: Bahrain Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() Posted: 17 Oct 16 at 7:40AM |
I am trying to fill a PDF document using "SetFormFieldValue" function and after filling I want to print the filled document using "PrintDocument" function.
Both functions are working fine individually i.e. "SetFormFieldValue" is filling the PDF as I can see the filled PDF when I save it to local file. Also "PrintDocument" prints the PDF. The issue is "PrintDocument" prints the empty (unfilled) PDF document. Following is the code I am using: int isloaded = QP.LoadFromVariant(PDFStream, ""); QP.SetFormFieldValue(fieldNumber, "TextToSet"); int iPrintOptions = QP.PrintOptions(1, 1, "Title"); QP.PrintDocument("printerName", 1, QP.PageCount(), iPrintOptions); Please confirm what I am missing here? rizzz86 Edited by rizzz86 - 17 Oct 16 at 8:16AM |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Rizzz,
Regarding this case you have to know a bit about appearance streams: http://www.debenu.com/kb/appearance-streams-pdf-form-fields/ Please read addionally about SetFormFieldPrintable: http://www.debenu.com/docs/pdf_library_reference/SetFormFieldPrintable.php After maintaining a form field the appearance stream should be set to value 1 to show/print the value in a pdf-viewer: http://www.debenu.com/docs/pdf_library_reference/SetNeedAppearances.php Here's a working sample from a user: http://www.quickpdf.org/forum/vb6-print-pdf-on-the-fly_topic232_post814.html?KW=SetNeedAppearance#814 Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
![]() |
|
rizzz86 ![]() Beginner ![]() ![]() Joined: 17 Oct 16 Location: Bahrain Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() |
Hi Ingo,
Thanks, it worked. Setting and Updating appearance stream worked for me. rizzz86 Edited by rizzz86 - 17 Oct 16 at 10:30AM |
|
![]() |
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