IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VB.NET Discussion :

Où trouver les classes .net d'adobe acrobat ?


Sujet :

VB.NET

  1. #1
    Membre du Club
    Homme Profil pro
    Développeur .NET / php / java / c++
    Inscrit en
    Février 2013
    Messages
    44
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loiret (Centre)

    Informations professionnelles :
    Activité : Développeur .NET / php / java / c++
    Secteur : Industrie

    Informations forums :
    Inscription : Février 2013
    Messages : 44
    Points : 41
    Points
    41
    Par défaut Où trouver les classes .net d'adobe acrobat ?
    Bonjour à tous,

    Je fait part d'un petit souci rencontré en entreprise.
    Actuellement nous travaillons sur le logiciel adobe reader 10.0 et nous recherchons le moyen d'imprimer des fichiers .pdf sans utiliser des process() dans une banale classe.


    Peut être que le sdk pour l'utilisation .net n'est pas installé, peut être que je n'ai pas su utiliser les références déjà disponible, je sèche...

    Pour être plus clair, je recherche à faire la conversion, la fusion et autres manipulation que fait PDFCreator mais sur le reader d'adobe.
    Merci.

  2. #2
    Candidat au Club
    Femme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Février 2014
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 37
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Février 2014
    Messages : 1
    Points : 4
    Points
    4
    Par défaut
    Bonjour,

    Tu peux essayer de voir parmi ces 2 librairies :
    - AcroRd32.dll (C:\Program Files\Adobe\Reader 10.0\Reader)
    - AcroPDF.dll (C:\Program Files\Common Files\Adobe\Acrobat\ActiveX)

  3. #3
    Membre éprouvé
    Avatar de dkmix
    Profil pro
    Inscrit en
    Septembre 2007
    Messages
    619
    Détails du profil
    Informations personnelles :
    Localisation : Jamaïque

    Informations forums :
    Inscription : Septembre 2007
    Messages : 619
    Points : 924
    Points
    924
    Par défaut
    Bonjour,
    j'utilise : axinterop.acropdflib.dll et Interop.AcroPDFLib.dll (les deux sont necessaires)

    Dans VS j'utilise cette classse pour afficher un print preview PDF

    PrintPreviewPDF.vb
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
     
    Public Class PrintPreviewPDF
     
        Private Chemin As String
     
        Public Sub New(Path As String)
            InitializeComponent()
            Me.Chemin = Path
        End Sub
     
        Public Sub New(Bytes As Byte(), FileName As String)
     
            InitializeComponent()
            Me.Chemin = CheminExtract() + FileName
     
            System.IO.File.WriteAllBytes(Me.Chemin, Bytes)
     
        End Sub
     
        Private Sub PrintPreviewPDF_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
            Me.AxAcroPDF1.LoadFile(Me.Chemin)
            Me.AxAcroPDF1.setShowToolbar(True)
            Me.AxAcroPDF1.setLayoutMode("SinglePage")
            Me.AxAcroPDF1.Show()
        End Sub
     
        Private Sub PrintPreviewPDF_Shown(sender As System.Object, e As System.EventArgs) Handles MyBase.Shown
     
            MsgBox(" File saved in : " & Me.Chemin)
     
        End Sub
    End Class
    PrintPreviewPDF.Designer.vb
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
     
     
    <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
    Partial Class PrintPreviewPDF
        Inherits System.Windows.Forms.Form
     
        'Form remplace la méthode Dispose pour nettoyer la liste des composants.
        <System.Diagnostics.DebuggerNonUserCode()> _
        Protected Overrides Sub Dispose(ByVal disposing As Boolean)
            Try
                If disposing AndAlso components IsNot Nothing Then
                    components.Dispose()
                End If
            Finally
                MyBase.Dispose(disposing)
            End Try
        End Sub
     
        'Requise par le Concepteur Windows Form
        Private components As System.ComponentModel.IContainer
     
        'REMARQUE*: la procédure suivante est requise par le Concepteur Windows Form
        'Elle peut être modifiée à l'aide du Concepteur Windows Form.  
        'Ne la modifiez pas à l'aide de l'éditeur de code.
        <System.Diagnostics.DebuggerStepThrough()> _
        Private Sub InitializeComponent()
            Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(PrintPreviewPDF))
            Me.AxAcroPDF1 = New AxAcroPDFLib.AxAcroPDF()
            CType(Me.AxAcroPDF1, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.SuspendLayout()
            '
            'AxAcroPDF1
            '
            Me.AxAcroPDF1.Dock = System.Windows.Forms.DockStyle.Fill
            Me.AxAcroPDF1.Enabled = True
            Me.AxAcroPDF1.Location = New System.Drawing.Point(0, 0)
            Me.AxAcroPDF1.Name = "AxAcroPDF1"
            Me.AxAcroPDF1.OcxState = CType(resources.GetObject("AxAcroPDF1.OcxState"), System.Windows.Forms.AxHost.State)
            Me.AxAcroPDF1.Size = New System.Drawing.Size(502, 422)
            Me.AxAcroPDF1.TabIndex = 0
            '
            'PrintPreviewPDF
            '
            Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
            Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
            Me.ClientSize = New System.Drawing.Size(502, 422)
            Me.Controls.Add(Me.AxAcroPDF1)
            Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow
            Me.Name = "PrintPreviewPDF"
            Me.Text = "Print Preview PDF"
            CType(Me.AxAcroPDF1, System.ComponentModel.ISupportInitialize).EndInit()
            Me.ResumeLayout(False)
     
        End Sub
        Friend WithEvents AxAcroPDF1 As AxAcroPDFLib.AxAcroPDF
    End Class
    PrintPreviewPDF.resx :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
     
    <?xml version="1.0" encoding="utf-8"?>
    <root>
      <!-- 
        Microsoft ResX Schema 
     
        Version 2.0
     
        The primary goals of this format is to allow a simple XML format 
        that is mostly human readable. The generation and parsing of the 
        various data types are done through the TypeConverter classes 
        associated with the data types.
     
        Example:
     
        ... ado.net/XML headers & schema ...
        <resheader name="resmimetype">text/microsoft-resx</resheader>
        <resheader name="version">2.0</resheader>
        <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
        <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
        <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
        <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
        <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
            <value>[base64 mime encoded serialized .NET Framework object]</value>
        </data>
        <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
            <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
            <comment>This is a comment</comment>
        </data>
     
        There are any number of "resheader" rows that contain simple 
        name/value pairs.
     
        Each data row contains a name, and value. The row also contains a 
        type or mimetype. Type corresponds to a .NET class that support 
        text/value conversion through the TypeConverter architecture. 
        Classes that don't support this are serialized and stored with the 
        mimetype set.
     
        The mimetype is used for serialized objects, and tells the 
        ResXResourceReader how to depersist the object. This is currently not 
        extensible. For a given mimetype the value must be set accordingly:
     
        Note - application/x-microsoft.net.object.binary.base64 is the format 
        that the ResXResourceWriter will generate, however the reader can 
        read any of the formats listed below.
     
        mimetype: application/x-microsoft.net.object.binary.base64
        value   : The object must be serialized with 
                : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
                : and then encoded with base64 encoding.
     
        mimetype: application/x-microsoft.net.object.soap.base64
        value   : The object must be serialized with 
                : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
                : and then encoded with base64 encoding.
     
        mimetype: application/x-microsoft.net.object.bytearray.base64
        value   : The object must be serialized into a byte array 
                : using a System.ComponentModel.TypeConverter
                : and then encoded with base64 encoding.
        -->
      <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
        <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
        <xsd:element name="root" msdata:IsDataSet="true">
          <xsd:complexType>
            <xsd:choice maxOccurs="unbounded">
              <xsd:element name="metadata">
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="value" type="xsd:string" minOccurs="0" />
                  </xsd:sequence>
                  <xsd:attribute name="name" use="required" type="xsd:string" />
                  <xsd:attribute name="type" type="xsd:string" />
                  <xsd:attribute name="mimetype" type="xsd:string" />
                  <xsd:attribute ref="xml:space" />
                </xsd:complexType>
              </xsd:element>
              <xsd:element name="assembly">
                <xsd:complexType>
                  <xsd:attribute name="alias" type="xsd:string" />
                  <xsd:attribute name="name" type="xsd:string" />
                </xsd:complexType>
              </xsd:element>
              <xsd:element name="data">
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                    <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
                  </xsd:sequence>
                  <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
                  <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
                  <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
                  <xsd:attribute ref="xml:space" />
                </xsd:complexType>
              </xsd:element>
              <xsd:element name="resheader">
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                  </xsd:sequence>
                  <xsd:attribute name="name" type="xsd:string" use="required" />
                </xsd:complexType>
              </xsd:element>
            </xsd:choice>
          </xsd:complexType>
        </xsd:element>
      </xsd:schema>
      <resheader name="resmimetype">
        <value>text/microsoft-resx</value>
      </resheader>
      <resheader name="version">
        <value>2.0</value>
      </resheader>
      <resheader name="reader">
        <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
      </resheader>
      <resheader name="writer">
        <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
      </resheader>
      <data name="AxAcroPDF1.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>
            AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
            LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
            ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAIQAAAAIB
            AAAAAQAAAAAAAAAAAAAAAAwAAAAACgAA4jMAAJ0rAAAL
    </value>
      </data>
    </root>

Discussions similaires

  1. Trouver les class d'un carnet d'adresse
    Par neufrdb dans le forum Débuter avec Java
    Réponses: 6
    Dernier message: 08/04/2011, 13h07
  2. Trouver les classes héritant de JFace
    Par ManusDei dans le forum Eclipse Java
    Réponses: 0
    Dernier message: 11/02/2011, 14h20
  3. Trouver les classes implémentant mes interfaces
    Par nicofromChina dans le forum Eclipse Java
    Réponses: 3
    Dernier message: 23/12/2008, 09h11
  4. imprimer un PDF en vb.net sans adobe Acrobat
    Par cedric.synix dans le forum Windows Forms
    Réponses: 6
    Dernier message: 30/11/2007, 15h40
  5. Réponses: 12
    Dernier message: 04/10/2006, 15h53

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo