summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview.cpp
diff options
context:
space:
mode:
authorScott Byer <scottbyer@chromium.org>2015-05-05 17:02:40 -0700
committerVitaly Buka <vitalybuka@chromium.org>2015-05-05 17:02:40 -0700
commit5dee6299cc103e5e0bfb138198f2369856ee81a9 (patch)
treecc21e5231b446458c8cec12849e7389cc0fea5ce /fpdfsdk/src/fpdfview.cpp
parent2cf0d21788974dd1ea19a68259c4fbccb0e56897 (diff)
downloadpdfium-5dee6299cc103e5e0bfb138198f2369856ee81a9.tar.xz
Expose additional flags for rasterization.
These flags are unused in Chromium, but are needed for the Cloud Print conversion process, which takes PDF and produces a raster for low-end printers. Certain low-end printers (e.g., B&W laser printers) will turn anti-aliased text into a mess. The existing printing flag isn't sufficient, as other kinds of printers will still want some kinds of anti-aliasing to occur for best results. BUG=482253 TEST=none R=vitalybuka@chromium.org Review URL: https://codereview.chromium.org/1115513002 Patch from Scott Byer <scottbyer@chromium.org>.
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r--fpdfsdk/src/fpdfview.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 5df563ffa4..3207ebe336 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -689,6 +689,12 @@ void FPDF_RenderPage_Retail(CRenderContext* pContext, FPDF_PAGE page, int start_
pContext->m_pOptions->m_Flags |= RENDER_LIMITEDIMAGECACHE;
if (flags & FPDF_RENDER_FORCEHALFTONE)
pContext->m_pOptions->m_Flags |= RENDER_FORCE_HALFTONE;
+ if (flags & FPDF_RENDER_NO_SMOOTHTEXT)
+ pContext->m_pOptions->m_Flags |= RENDER_NOTEXTSMOOTH;
+ if (flags & FPDF_RENDER_NO_SMOOTHIMAGE)
+ pContext->m_pOptions->m_Flags |= RENDER_NOIMAGESMOOTH;
+ if (flags & FPDF_RENDER_NO_SMOOTHPATH)
+ pContext->m_pOptions->m_Flags |= RENDER_NOPATHSMOOTH;
//Grayscale output
if (flags & FPDF_GRAYSCALE)
{