Enum Zip64Mode
Enum Zip64Mode
Namespace: Aspose.Words.Saving
Assembly: Aspose.Words.dll (25.12.0)
Specifies when to use ZIP64 format extensions for OOXML files.
public enum Zip64ModeFields
Always = 2
Always use ZIP64 format extensions.
IfNecessary = 1
If necessary use ZIP64 format extensions.
Never = 0
Do not use ZIP64 format extensions.
Examples
Shows how to use ZIP64 format extensions.
Random random = new Random();
DocumentBuilder builder = new DocumentBuilder();
for (int i = 0; i < 10000; i++)
{
using (Bitmap bmp = new Bitmap(5, 5))
using (Graphics g = Graphics.FromImage(bmp))
{
g.Clear(Color.FromArgb(random.Next(0, 254), random.Next(0, 254), random.Next(0, 254)));
using (MemoryStream ms = new MemoryStream())
{
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
builder.InsertImage(ms.ToArray());
}
}
}
builder.Document.Save(ArtifactsDir + "OoxmlSaveOptions.Zip64ModeOption.docx",
new OoxmlSaveOptions { Zip64Mode = Zip64Mode.Always });Remarks
OOXML file is a ZIP-archive that has a 4 GB (2^32 bytes) limit on uncompressed size of a file, compressed size of a file, and total size of the archive, as well as a limit of 65,535 (2^16-1) files in archive. ZIP64 format extensions increase the limits to 2^64.