求教:将Word文档转成图片格式,即用vb或asp实现将word文件转成一张或n张jpg格式的图片。

解决方案 »

  1.   

    把油箱给我,我发一个例子给!!!能把word和text文件转换为PDF 格式!!
      

  2.   

    发邮件给我吧!![email protected]
      

  3.   

    相关的API
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPrivate Type OPENFILENAME
      lStructSize As Long
      hwndOwner As Long
      hInstance As Long
      lpstrFilter As String
      lpstrCustomFilter As String
      nMaxCustFilter As Long
      nFilterIndex As Long
      lpstrFile As String
      nMaxFile As Long
      lpstrFileTitle As String
      nMaxFileTitle As Long
      lpstrInitialDir As String
      lpstrTitle As String
      flags As Long
      nFileOffset As Integer
      nFileExtension As Integer
      lpstrDefExt As String
      lCustData As Long
      lpfnHook As Long
      lpTemplateName As String
    End Type
        
    Private Const OFN_READONLY = &H1
    Private Const OFN_OVERWRITEPROMPT = &H2
    Private Const OFN_HIDEREADONLY = &H4
    Private Const OFN_NOCHANGEDIR = &H8
    Private Const OFN_SHOWHELP = &H10
    Private Const OFN_ENABLEHOOK = &H20
    Private Const OFN_ENABLETEMPLATE = &H40
    Private Const OFN_ENABLETEMPLATEHANDLE = &H80
    Private Const OFN_NOVALIDATE = &H100
    Private Const OFN_ALLOWMULTISELECT = &H200
    Private Const OFN_EXTENSIONDIFFERENT = &H400
    Private Const OFN_PATHMUSTEXIST = &H800
    Private Const OFN_FILEMUSTEXIST = &H1000
    Private Const OFN_CREATEPROMPT = &H2000
    Private Const OFN_SHAREAWARE = &H4000
    Private Const OFN_NOREADONLYRETURN = &H8000
    Private Const OFN_NOTESTFILECREATE = &H10000
    Private Const OFN_NONETWORKBUTTON = &H20000
    Private Const OFN_NOLONGNAMES = &H40000 ' force no long names for 4.x modules
    Private Const OFN_EXPLORER = &H80000 ' new look commdlg
    Private Const OFN_NODEREFERENCELINKS = &H100000
    Private Const OFN_LONGNAMES = &H200000 ' force long names for 3.x modules
    Private Const OFN_SHAREFALLTHROUGH = 2
    Private Const OFN_SHARENOWARN = 1
    Private Const OFN_SHAREWARN = 0
    Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
    Private Declare Function GetSaveFileName Lib "comdlg32.dll" Alias "GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As LongDim Position As Long
    Dim pageNo As Long
    Dim lineNo As Long
    Dim pageHeight As Long
    Dim pageWidth As Long
    Dim location(1 To 5000) As Long
    Dim pageObj(1 To 5000) As Long
    Dim lines As Long
    Dim obj As Long
    Dim Tpages As Long
    Dim encoding As Long
    Dim resources As Long
    Dim pages As Variant
    Dim author As String
    Dim creator As String
    Dim keywords As String
    Dim subject As String
    Dim Title As String
    Dim BaseFont As String
    Dim pointSize As Currency
    Dim vertSpace As Currency
    Dim rotate As Integer
    Dim info As Long
    Dim root As Long
    Dim npagex As Double
    Dim npagey As Long
    Dim filetxt As String
    Dim filepdf As String
    Dim linelen As Long
    Dim cache As String
    Dim cmdline As StringConst AppName = "Text-PDF v1.0"
      

  4.   

    转成pdf时会有很多误差的,排版会弄乱的.不知道 print 可不可以搞位图片