News & Releases

Minimize
Nasosoft Component for .NET v4.0.0 Released - Friday, April 20, 2012

Nasosoft Component for .NET v4.0.0 has released with many improvements.

Nasosoft Component for .NET is a suite of comprehensive .NET controls, including EXCEL, PDF, and RTF document format engines, RTF to HTML, HTML to RTF, RTF to TEXT, HTML to TEXT document transform engines and ZIP, GZIP, TAR compression.

What's new

  • Nasosoft Barcodes
    • Support different types of industry standards 1D and 2D Barcodes.
    • Support XML serialization and deserialization.
    • Support different types of image formats, like jpeg, bitmap, png, and etc.
    • Support metafile image format.
  • Nasosoft PDF
    • Support drawing barcodes image in PDF file with Nasosoft.Barcodes.
    • Fixed several bugs in PdfDocumentEditor.

 How to Download

 
 

Samples: Delete Files from ZipArchive

   Minimize
  Delete Files from ZipArchive Sample for C# / VB.NET


Download the sample here
 

[C#]

//Creates a ZipArchieve from the file name
ZipArchive zip = new ZipArchive(zipFilename);
//Get the files matching the file mask
ZipFile[] filesToRemove = zip.GetFiles(recursive, fileMask);
//begin update
zip.BeginUpdate();
try
{
    //remove the files from the ZipArchieve
    foreach (ZipFile file in filesToRemove)
    {
        Console.WriteLine("Removing {0}...", file.FullName);
        file.Delete();
    }
}
finally
{
    //commit the delete
    zip.EndUpdate();
}

[VB.NET]

 'Creates a ZipArchieve from the file name
Dim zip As New ZipArchive(zipFilename)
'Get the files matching the file mask
Dim filesToRemove As ZipFile() = zip.GetFiles(recursive, fileMask)
'begin update
zip.BeginUpdate()
Try
    'remove the files from the ZipArchieve
    For Each file As ZipFile In filesToRemove
        Console.WriteLine("Removing {0}...", file.FullName)
        file.Delete()
    Next
Finally
    'commit the delete
    zip.EndUpdate()
End Try