1 / 7

Rappels OPC / API .NET 3

Rappels OPC / API .NET 3. Zip. Open Packaging Convention. Package – Le conteneur Document Parts – Les fichiers dans le container Relations – Relation entre les Parts. Formats Personnalisés. XPS Format de Document. Office 2007 Open XML Formats. XML Paper Specification.

moshe
Download Presentation

Rappels OPC / API .NET 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Rappels OPC / API .NET 3

  2. Zip Open Packaging Convention • Package – Le conteneur • Document Parts – Les fichiers dans le container • Relations – Relation entre les Parts Formats Personnalisés XPS Format de Document Office 2007 Open XML Formats XML Paper Specification Les droits numériques (Information Right Management) Package (Core Properties, Preview) Parts et Relations Open Package Specification

  3. System.IO.Packaging Common Package Parts • Les Classes: • Package • Package Properties • PackageRelationships • PackageParts • Récupération des parts avec System.IO.Stream • PackagePart: • Compression • ContentType • Package • Uri • Relationship • ID • Package • RelationshipType • SourceUri • TargetMode • TargetUri Core Properties Digital Signatures Specific Format Parts Office Document Package Relationships XML Part XML Part Part Relationships Part Rels Etc…

  4. System.IO.Packaging • Ouvrir le package • Accéder à une part • Créer une part • Ajouter du contenue au document using (Package package = Package.Open(packagePath, FileMode.Open,FileAccess.ReadWrite)) { Uri uriPartTarget = new Uri("/word/styles1.xml", UriKind.Relative); PackagePartnewPackagePart = package.CreatePart(uriPartTarget, "application/vnd.ms-word.styles+xml"); using (FileStreamfileStream = new FileStream(stylePath, FileMode.Open, FileAccess.Read)) { CopyStream(fileStream, newPackagePart.GetStream()); } }

  5. Création d’un document « à la main » Exercice 1

  6. Manipulation API OPC avec .NET Exercice 2

  7. Création de document WordML Exercice 3

More Related