Visual Basic
C#
Managed Extensions for C++
C++/CLI
Parameters
- artPage
- ART page with marks to save.
- page
- ImageGear.Core.ImGearPage class to save to.
Saves ART 2.0 & 3.0 marks into igPage. This method can be used to export ART 2.0 marks to TIF
page and ART 3.0 marks to PDF page.
C# | Copy Code |
---|---|
// Save reference to the original metadata. ImGearMetadataTree igMetadataTreeOriginal = (ImGearMetadataTree)igPage.Metadata.Child; // Prepare a TIF metadata tree. ImGearMetadataTree igMetaDataTreeTIF = (igPage.Metadata.Child.Format == ImGearMetadataFormats.TIF) ? (ImGearMetadataTree)igPage.Metadata.Child.Clone() : new ImGearMetadataTree(ImGearMetadataFormats.TIF, (Int32)ImGearTIFTagIDs.FORMAT); // Replace page metadata with igMetaDataTreeTIF. igPage.Metadata.Child = igMetaDataTreeTIF; // Save the art data into the metadata of the image. ImGearART.SavePage(igARTPage, igPage); // Save an image containing embedded ART 2.0 annotations into a ImGearPage object using (FileStream localFile = new FileStream("test_art_save.tif", FileMode.Create)) ImGearFileFormats.SavePage(igPage, localFile, 0, ImGearSavingModes.OVERWRITE, ImGearSavingFormats.TIF_UNCOMP, null); // Restore original meta data. igPage.Metadata.Child = igMetadataTreeOriginal; |
Visual Basic | Copy Code |
---|---|
' Save reference to the original metadata. Dim igMetadataTreeOriginal As ImGearMetadataTree = DirectCast(igPage.Metadata.Child, ImGearMetadataTree) ' Prepare a TIF metadata tree. Dim igMetaDataTreeTIF As ImGearMetadataTree If (igPage.Metadata.Child.Format = ImGearMetadataFormats.TIF) Then igMetaDataTreeTIF = DirectCast(igPage.Metadata.Child.Clone(), ImGearMetadataTree) Else igMetaDataTreeTIF = New ImGearMetadataTree(ImGearMetadataFormats.TIF, DirectCast(ImGearTIFTagIDs.FORMAT, Int32)) End If ' Replace page metadata with igMetaDataTreeTIF. igPage.Metadata.Child = igMetaDataTreeTIF ' Save the art data into the metadata of the image. ImGearART.SavePage(igARTPage, igPage) ' Save an image containing embedded ART 2.0 annotations into a ImGearPage object Using localFile As New FileStream("test_art_save.tif", FileMode.Create) ImGearFileFormats.SavePage(igPage, localFile, 0, _ ImGearSavingModes.OVERWRITE, ImGearSavingFormats.TIF_UNCOMP, Nothing) End Using ' Restore original meta data. igPage.Metadata.Child = igMetadataTreeOriginal |