From 12a7b7b6e8fbf6b1e593d606c62ce52703e60f21 Mon Sep 17 00:00:00 2001 From: Asaf Bartov Date: Sat, 6 Dec 2025 03:59:52 +0200 Subject: [PATCH 1/2] Fixed #168. Rubyzip changed default behavior. --- lib/docx/document.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/docx/document.rb b/lib/docx/document.rb index c2a3759..15e6a77 100755 --- a/lib/docx/document.rb +++ b/lib/docx/document.rb @@ -5,6 +5,11 @@ require 'nokogiri' require 'zip' +# Disable ZIP64 support to maintain compatibility with version 0.9.1 and +# ensure compatibility with all readers. Rubyzip 3.x enables ZIP64 by default, +# but many readers (including pandoc) don't support it for small files. +Zip.write_zip64_support = false + module Docx # The Document class wraps around a docx file and provides methods to # interface with it. From 4b22f8ffe6ce06bc26e8b55ad5cc2e02ab644223 Mon Sep 17 00:00:00 2001 From: Asaf Bartov Date: Sat, 6 Dec 2025 19:23:55 +0200 Subject: [PATCH 2/2] Update lib/docx/document.rb Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- lib/docx/document.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/docx/document.rb b/lib/docx/document.rb index 15e6a77..e290e23 100755 --- a/lib/docx/document.rb +++ b/lib/docx/document.rb @@ -5,9 +5,9 @@ require 'nokogiri' require 'zip' -# Disable ZIP64 support to maintain compatibility with version 0.9.1 and -# ensure compatibility with all readers. Rubyzip 3.x enables ZIP64 by default, -# but many readers (including pandoc) don't support it for small files. +# Disable ZIP64 support to maintain compatibility with the previous default behavior +# (before rubyzip 3.x) and ensure compatibility with all readers. Rubyzip 3.x enables +# ZIP64 by default, but many readers (including pandoc) don't support it for small files. Zip.write_zip64_support = false module Docx