[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:
http://lists.nongnu.org/archive/html/lmi/2018-02/msg00063.html
to write uncompressed PDF files, iff "--pyx=uncompressed_pdf" is
specified on the command line. Compression remains the default, as
always.
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
large.
BTW, "--pyx" options may be combined, e.g.:
--pyx=only_new_pdf,uncompressed_pdf
---
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_.SetMapMode(wxMM_POINTS);
pdf_dc_.StartDoc(wxString()); // Argument is not used.
+ pdf_dc_.GetPdfDocument()->SetCompression
+ (
+ !contains(global_settings::instance().pyx(), "uncompressed_pdf")
+ );
pdf_dc_.StartPage();
// Use a standard PDF Helvetica font (without embedding any custom fonts in
- [lmi-commits] [lmi] master updated (a3a0a42 -> b7c7ce5), Greg Chicares, 2018/02/12
- [lmi-commits] [lmi] master 4f4b26f 2/7: Write inequality comparisons in number-line order, Greg Chicares, 2018/02/12
- [lmi-commits] [lmi] master 66ef509 4/7: Rename a function for terseness, Greg Chicares, 2018/02/12
- [lmi-commits] [lmi] master e49df2c 5/7: Alphabetize unit-test functions, Greg Chicares, 2018/02/12
- [lmi-commits] [lmi] master 26cb882 6/7: Reorder a function's arguments, Greg Chicares, 2018/02/12
- [lmi-commits] [lmi] master 5deba0f 1/7: Optionally write uncompressed PDF files,
Greg Chicares <=
- [lmi-commits] [lmi] master b7c7ce5 7/7: Augment unit tests, Greg Chicares, 2018/02/12
- [lmi-commits] [lmi] master aef4bd7 3/7: Write whitespace before and after binary operators, Greg Chicares, 2018/02/12