Print Page | Close Window

Image not showing

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3417
Printed Date: 22 Nov 24 at 1:55PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Image not showing
Posted By: 27ffb8b2-bfac-4126-b
Subject: Image not showing
Date Posted: 06 Dec 16 at 9:20PM
QuickPDF Library version: TDebenuPDFLibrary1013
Delphi XE3

I am using .Pdf fillable forms extensively in my production project.  Each of the forms needs an image of a signature created and inserted at runtime, in place of a fillable text field that is being used simply as a place holder.   

I am using the following code to grab the dimensions of the fillable text field, then I basically "get rid of it" then I display the signature .Jpg image.  This works.  However, after the form is saved, then reopened, the signature field is not being displayed in QuickPDF, nor in an external .Pdf viewer like Adobe. However, upon printing, the signature shows up on the hard copy, in the correct place and it's the correct size.  

I need to know how to force QuickPDF or Adobe, to display the signature image .jpg that I know is there (because it prints), but is not being shown.  

Only 1 form out of 331 forms has this problem.  All other forms display the signature image in QuickPDF and Adobe even after having been saved and reloaded.

----------------------------------------------------------------------

                // Set text to blank, Grab the dimensions, then get rid of the "place holder" text field
                ff_val := '';
                idx := 29;
                qwk_pdf.SetFormFieldValue(idx, ff_val);
                sig_lft := qwk_pdf.GetFormFieldBound(idx, 0);
                sig_top := qwk_pdf.GetFormFieldBound(idx, 1);
                sig_wdt := qwk_pdf.GetFormFieldBound(idx, 2);
                sig_hgt := qwk_pdf.GetFormFieldBound(idx, 3);
                qwk_pdf.SetFormFieldVisible(idx, 0);
                qwk_pdf.UpdateAppearanceStream(idx);
                
                // Draw the image of the signature
                sig_blb_strm := dmCln.cdsPrvdr.CreateBlobStream(dmCln.cdsPrvdrSIG_JPG, bmRead);
                img_id := qwk_pdf.AddImageFromStream(sig_blb_strm, 0);
                qwk_pdf.DrawImage(sig_lft, sig_top, sig_wdt, 20);   

...
qwk_pdf_frm.SaveToFile(ff_mrg_fyl_nm);
...

//  At this point the signature image displays correctly in QuickPDF and Adobe.  However, when I reload the image into QuickPDF, or reload into Adobe, the signature image is not visible.  However, it prints onto the hard copy.
----------------------------------------------------------------------




Replies:
Posted By: Ingo
Date Posted: 07 Dec 16 at 9:28PM
Hi,

try it with an additional SetNeedAppearances(1) before SetFormFieldValue.

Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo



Posted By: 27ffb8b2-bfac-4126-b
Date Posted: 08 Dec 16 at 2:12AM
Hi Ingo,

Sorry I did not include that line in my code snippet.  It's actually in my original source code, a bit further up.  So that is not the problem.  I moved the line to just above where I set the field value, but it still has the same problem.  The signature prints, but it is not visible in QuickPDF viewer, and it is not visible in an external .Pdf viewr like Adobe or Nuance Power PDF.

Any other suggestions?  Thanks in advance.


Posted By: 27ffb8b2-bfac-4126-b
Date Posted: 08 Dec 16 at 2:59AM
Is there a way I can send you the .Pdf form that is manifesting this behavior?  I don't see a user file upload section in your forums.


Posted By: Ingo
Date Posted: 08 Dec 16 at 5:43PM
Hi,

you can upload the pdf anywhere (there are many data hoster out there ;-)  and post the link here.
So users or me <perhaps can help.



-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk