This is a standard RTF document as used for the LicenseFile property in the [Setup] section of Inno Setup:
Is it possible to add a Print button to this page that would trigger to print the license agreement?
I saw a similar question with and answer (Adding a "print agreement" button to the licence page in Inno Setup) which I have just tried to implement. But this is what I get:
The button is in the wrong place and so this code does not seem to be fully Inno Setup 6 compatible?
So, in my script I have:
[Setup]
LicenseFile=..\..\..\EULA\EULA.rtf
[Code]
var PrintButton: TButton;
procedure PrintButtonClick(Sender: TObject);
var ResultCode :integer;
begin
    log('test');
    ExtractTemporaryFile('EULA.rtf');
    //if not ShellExec('Print', ExpandConstant('{tmp}\EULA.rtf'),
    //     '', '', SW_SHOW, ewNoWait, ResultCode) then
    if not ShellExec('', ExpandConstant('{tmp}\EULA.rtf'),
         '', '', SW_SHOW, ewNoWait, ResultCode) then
    log('test');
end;
procedure InitializeWizard();
begin
    PrintButton := TButton.Create(WizardForm);
    PrintButton.Caption := '&Print...';
    PrintButton.Left := WizardForm.InfoAfterPage.Left + 96;
    PrintButton.Top := WizardForm.InfoAfterPage.Height + 88;
    PrintButton.OnClick := @PrintButtonClick;
    PrintButton.Parent := WizardForm.NextButton.Parent;
end;
procedure CurPageChanged(CurPage: Integer);
begin
    PrintButton.Visible := CurPage = wpLicense;
end;
I am also not clear which code is correct to "print" this agreement.




