Print Page | Close Window

SetFormFieldCheckStyle bug

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=3578
Printed Date: 25 Apr 24 at 4:59PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: SetFormFieldCheckStyle bug
Posted By: geonetwork
Subject: SetFormFieldCheckStyle bug
Date Posted: 08 Jun 18 at 11:06AM
Another strange different behavior (imho another bug) from version 12 to 15: if you put the SetFormFieldCheckStyle instruction before SetFormFieldBound check fields will not be printed (see 1.jpeg). If you invert the instructions you will have the correct print (2.jpeg)

var
  QP: TDebenuPDFLibrary;
  nFieldIndex: integer;
  i,n: integer;
begin
  QP:=TDebenuPDFLibrary.Create;
  try
    QP.UnlockKey('xxx');
    QP.SetOrigin(1);
    QP.SetMeasurementUnits(1); // mm.
    QP.SetPageDimensions(210, 297); // A4
    QP.SelectPage(n);
    QP.AddFormFont(QP.GetFontID(4));
    QP.SetTextSize(10);
    for i:=1 to 3 do begin
      nFieldIndex:=QP.NewFormField('FIELD'+IntToStr(i),3);
      QP.SetFormFieldCheckStyle(nFieldIndex,0,1); // <- if you put this instruction here pdf printed haven't the cross (1.JPEG)
      QP.SetFormFieldBounds(nFieldIndex,40,46+(i-1)*15,5,5);
      // QP.SetFormFieldCheckStyle(nFieldIndex,0,1); // <- if you put this instruction here pdf printed have the cross (2.JPEG)
    end;
    QP.SaveToFile('c:\temp\output.PDF');
    ShellExecute(self.Handle,'open','c:\temp\output.PDF','','',SW_SHOWMAXIMIZED);
  finally
    QP.Free;
  end;
end;

1.JPEG


2.JPEG








Replies:
Posted By: Ingo
Date Posted: 08 Jun 18 at 8:01PM
Why you're posting errors here?
Here's nobody to change them ;-)
BTW: Good for the users here getting you're work around. Thanks for it.



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



Posted By: geonetwork
Date Posted: 13 Jun 18 at 3:27PM
WorkAround in version 13 or above:
QP.SetNeedAppearances(1)



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