Work with VB, should work with Perl? 
Author Message
 Work with VB, should work with Perl?

Hello,

I want to get rid of a VisualBasic written ActiveX dll used to perform
OLE Automation.  I was able to to 95% of the job using perl tough a
little glitch.  Maybe I'm to new to perl 5 to understand refs....

Anyway, the following snippet explain my problem:

This perl code is translated from a working vb function...

$AformAut = Win32::OLE->new('AFormAut.App') or  die $!;
$Fields = $AformAut->Fields;

    $i = 1;
    while ($i <= $maxPage) {
        $Field = $Fields->Add("Date".$i, "text", $i  - 1, 30, 30, 320, 50);
        # where the \ is going?
        $Field::TextFont = 'Arial';
        $Field::TextSize = 10;
        $Field::Value = $foo;
        $Field::IsReadOnly = 1;
        print $Field::Value;
    } continue {
        $i++;
    }

The following piece of vb code is doing the job.

    If (bOK) Then
        Set AFormAut = CreateObject("AFormAut.App")
        Set Fields = AFormAut.Fields
    End If

        nMaxPage = AcroPDDoc.GetNumPages()
        For I = 1 To nMaxPage
          Set Field = Fields.Add("Date" & Trim(Str(I)), "text", I - 1, 30, 30, 320, 50)
          Field.TextFont = "Arial"
          Field.TextSize = "10"
          Field.Value = s_Note
          Field.IsReadOnly = True

        Next

The goal of this is to automate the management of PDF files, namely to
stamp each files (footer message) before putting it on-line for perusal
on our web site.

--
+----------------------------------------------------------------------+

   Web Specialist                                   www.jfgagnon.com
+----------------------------------------------------------------------+
     (ooops!... posted with a 100% Pure Java news reader of my own)



Wed, 11 Sep 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Work with VB, should work with Perl?

2. IIS running perl scripts with VB not working

3. NC - HTML,JAVA,CGI,VB, SRIPTING, POSITIONS AND OPPORTUNITIES AVAILABLE, ALSO REMOTE WORK

4. sybperl -- begin work and commit works...

5. Send mail script not working in 2nd server but working in 1st server

6. Send mail script not working in 2nd server but working in 1st server

7. Directory handling script works and doesn't work

8. Good Programmers (C++,VB,Perl, etc.) wanted for future work.

9. Command line Perl works but IIS Perl doesn't

10. Perl NT IIS4.0 - can't get Perl to work via the web

11. How to get perl -d to work in Windows NT 3.51 (RESKIT UPDATE 2 perl)

12. Perl 4 works, Perl 5 doesn't?

 

 
Powered by phpBB® Forum Software