summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-20 22:02:25 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-20 22:02:25 +0000
commit75280ad2f6013db0a504650801fa8134a707a49c (patch)
tree09812e68bfc5304b95372d6c59c0599a3e5d98cf /printing
parented3eb462ba5584dabfa47461e676cb89da921838 (diff)
downloadchromium_src-75280ad2f6013db0a504650801fa8134a707a49c.zip
chromium_src-75280ad2f6013db0a504650801fa8134a707a49c.tar.gz
chromium_src-75280ad2f6013db0a504650801fa8134a707a49c.tar.bz2
Printing on Windows via PDF
Currently: - Based on #if, switches renderer rendering to PDF for preview - Add PdfToEmfConvert based on PWGRasterConverter - Various plumbing. Preview works the same as other PDF based platforms. For getting to EMF, the when PRINTING_WIN_USES_PDF_AS_METAFILE is on, the renderer generates a PDF instead of EMF directly (this contains all the pages in the desired range). This is returned to PrintViewManagerBase, where it's passed to PdfToEmfConverter which uses the sandboxed utility process and pdf.dll to convert via RenderPDFPageToDC. The utility process renderers one emf page at at time (into numbered files) to avoid having a very large emf file. As this uses pdf.dll this is currently off-by-default controlled by the gyp variable win_pdf_metafile_for_printing. R=vitalybuka@chromium.org BUG=170859 Review URL: https://codereview.chromium.org/255543006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271772 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r--printing/metafile_impl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/printing/metafile_impl.h b/printing/metafile_impl.h
index 840a1ce..9fb2307 100644
--- a/printing/metafile_impl.h
+++ b/printing/metafile_impl.h
@@ -13,10 +13,10 @@
namespace printing {
-#if defined(OS_WIN)
+#if defined(OS_WIN) && !defined(WIN_PDF_METAFILE_FOR_PRINTING)
typedef Emf NativeMetafile;
typedef PdfMetafileSkia PreviewMetafile;
-#elif defined(OS_POSIX)
+#else
typedef PdfMetafileSkia NativeMetafile;
typedef PdfMetafileSkia PreviewMetafile;
#endif