[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 5deba0f 1/7: Optionally write uncompressed PD

From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5deba0f 1/7: Optionally write uncompressed PDF files
Date: Mon, 12 Feb 2018 07:15:09 -0500 (EST)

branch: master
commit 5deba0fd9fa3cdedafe7aace8aded3fa0bb9223b
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Optionally write uncompressed PDF files
    Adapted Vadim's suggestion here:
    to write uncompressed PDF files, iff "--pyx=uncompressed_pdf" is
    specified on the command line. Compression remains the default, as
    A single, simple, default illustration PDF created thus:
      Ctrl-N I Enter Ctrl-I
    was 26386 bytes with compression, and 158922 without: six times as
    BTW, "--pyx" options may be combined, e.g.:
 pdf_writer_wx.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pdf_writer_wx.cpp b/pdf_writer_wx.cpp
index b3da776..bfb1d76 100644
--- a/pdf_writer_wx.cpp
+++ b/pdf_writer_wx.cpp
@@ -24,6 +24,7 @@
 #include "pdf_writer_wx.hpp"
 #include "alert.hpp"
+#include "contains.hpp"
 #include "global_settings.hpp"
 #include "html.hpp"
@@ -74,6 +75,10 @@ pdf_writer_wx::pdf_writer_wx
     pdf_dc_.StartDoc(wxString()); // Argument is not used.
+    pdf_dc_.GetPdfDocument()->SetCompression
+        (
+        !contains(global_settings::instance().pyx(), "uncompressed_pdf")
+        );
     // Use a standard PDF Helvetica font (without embedding any custom fonts in

reply via email to

[Prev in Thread] Current Thread [Next in Thread]