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 - Cannot able to fill and print PDF document
  FAQ FAQ  Forum Search   Register Register  Login Login

Cannot able to fill and print PDF document

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

Joined: 17 Oct 16
Location: Bahrain
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote rizzz86 Quote  Post ReplyReply Direct Link To This Post Topic: Cannot able to fill and print PDF document
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 17 Oct 16 at 9:35AM
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

Back to Top
rizzz86 View Drop Down
Beginner
Beginner
Avatar

Joined: 17 Oct 16
Location: Bahrain
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote rizzz86 Quote  Post ReplyReply Direct Link To This Post Posted: 17 Oct 16 at 10:30AM
Hi Ingo,

Thanks, it worked.

Setting and Updating appearance stream worked for me.

rizzz86

Edited by rizzz86 - 17 Oct 16 at 10:30AM
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