hello
i am using windows xp with activeperl 5.10 , i want to call a windows dll such as AcroPDF.dll to display a pdf file within a win32 gui window?. i have seen a small code in VB6 titled: How to use Adobe Acrobat Reader 7.0 Viewer Control (AcroPDF.dll) in
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=69282&lngWId=1
wich can realy display a pdf file on the form of the visual basic 6 ,i hope there is no opposition to display the vb6 code here for the attention of who may infer something from it, there is a little docs about calling dll's from perl, and any ideas to call this AcroPDF.dll could help many people in calling another dll's
thank you very much
it is a small code but commented heavily
' Demonstrated by: Julius Enerio ' Requirements: Make sure the Adobe Acrobat 7.0 Control Type Library ( +AcroPDF.dll) is visible in your toolbox ' Right Click on the toolbox then select Components. Select Adobe Acro +bat 7.0 Control Type Library then click OK ' No need to add the control in the form though. Just use the code. ' Read More on how to use the browser control by reading the Interappl +ication communication API Reference found by searching in on Google Option Explicit 'Which means all variables must be declared before it +can be used in the program Private m_objPDF As AcroPDFLibCtl.AcroPDF 'Declare an object of type A +croPDF Private m_strFilePath As String 'Declare a string for the PDF Filename + and Path 'On Form Load... Private Sub Form_Load() m_strFilePath = App.Path & "\Quran_Page_013.pdf" 'Change this to th +e path and filename of your PDF File Set m_objPDF = Controls.Add("AcroPDF.PDF.1", "Test") 'This will add + the PDF Browser control to the form on runtime. The "Test" is the co +ntrol's name Set m_objPDF.Container = Frame1 'Attach the PDF Browser control to +a container. 'A Container can be a Frame, PictureBox, or SSTab Control. In this +code, I used a Frame. End Sub 'On Form Activate Private Sub Form_Activate() 'Load the PDF file specified in m_strFilePath. 'Make sure to do this before doing any changes to the browser contr +ols view/layout m_objPDF.LoadFile m_strFilePath 'Set whether a toolbar will appear in the viewer. True to show, Fal +se to Hide. m_objPDF.setShowToolbar False 'Sets the Layout Mode for a page view according to the specified st +ring. 'DontCare — use the current user preference 'SinglePage — use single page mode (as it would have appeared in pr +e-Acrobat 3.0 viewers) 'OneColumn — use one-column continuous mode 'TwoColumnLeft — use two-column continuous mode with the first page + on the left 'TwoColumnRight — use two-column continuous mode with the first pag +e on the right m_objPDF.setLayoutMode "SinglePage" 'Sets the page mode in which a document is to be opened 'PDDontCare: 0 — leave the view mode as it is 'PDUseNone: 1 — display without bookmarks or thumbnails 'PDUseThumbs: 2 — display using thumbnails 'PDUseBookmarks: 3 — display using bookmarks m_objPDF.setPageMode "none" 'Set the Zoom view according to the value specified. ranges from 0 +and onwards m_objPDF.setZoom 240 'Move and Resize the object in relation to its container/form With m_objPDF .Move 125, 175, 7800, 8415 'x-position, y-position, width, heigh +t End With 'Show the Browser Control m_objPDF.Visible = True End Sub 'On Form Unload Private Sub Form_Unload(Cancel As Integer) 'The Browser control will load a blank m_objPDF.LoadFile "" 'Set object to nothing Set m_objPDF = Nothing End Sub

In reply to calling AcroPDF.dll from perl by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.