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!
SetFormFieldAlignment for Button |
Post Reply |
Author | |
PeterAnderko
Beginner Joined: 03 Dec 20 Location: Slovakia Status: Offline Points: 10 |
Post Options
Thanks(0)
Posted: 09 Dec 20 at 7:59AM |
Hi,
I tried to set the centered alignment for the new "formfield" that I created as a button for print. here is a procedure: procedure CreatePrintButton(Menox:string); var BTWidth,BTLocation:double; ix,strana:integer; begin strana:=1; PDFDok.SetOrigin(1); BTWidth:=45; BTLocation:=91; ix:=PDFDok.NewFormField(Menox,2); if ix>0 then begin PDFDok.SetFormFieldCaption(ix,Menox); PDFDok.SetFormFieldAlignment(ix,1); PDFDok.SetFormFieldPrintable(ix,0); PDFDok.SetFormFieldBounds(ix,BTLocation,5,BTWidth,15); PDFDok.SetFormFieldFont(ix,PDFDok.GetFormFontCount); PDFDok.SetFormFieldTextSize(ix, 8); PDFDok.SetFormFieldBorderColor(ix, 0.9, 0, 0); PDFDok.SetFormFieldBorderStyle(ix, 0.2, 0, 0, 0); PDFDok.SetFormFieldColor(ix, 0, 0, 0); PDFDok.SetFormFieldBackgroundColor(ix,0.85,0.90,0.70); PDFDok.SetFormFieldValue(ix,''); PDFDok.SetFormFieldHighlightMode(ix,3); PDFDok.FormFieldJavaScriptAction(ix, 'U', 'this.print({' + 'bUI: true,' + 'bSilent: true,' + 'bShrinkToFit: true,' + 'nStart: ' + IntToStr(strana-1) + ',' + 'nEnd: ' + IntToStr(strana-1) + '});'); end; end; Despite setting up PDFDok.SetFormFieldAlignment(ix,1); The alignment of the button caption (Menox) remains left-aligned. what I'm doing wrong? Peter |
|
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