Chromium Code Reviews| Index: fpdfsdk/src/fpdfview.cpp |
| diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp |
| index a5ba796158705184300e27a699a48ce64c4b02f6..7b2d51f99985d59a0ec14470b86c69dedef3bb39 100644 |
| --- a/fpdfsdk/src/fpdfview.cpp |
| +++ b/fpdfsdk/src/fpdfview.cpp |
| @@ -866,6 +866,38 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT documen |
| return viewRef.PrintScaling(); |
| } |
| +DLLEXPORT int STDCALL FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document) |
| +{ |
| + CPDF_Document* pDoc = (CPDF_Document*)document; |
| + if (!pDoc) return 1; |
| + CPDF_ViewerPreferences viewRef(pDoc); |
| + return viewRef.NumCopies(); |
| +} |
| + |
| +DLLEXPORT FPDF_PAGERANGE STDCALL FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document) |
| +{ |
| + CPDF_Document* pDoc = (CPDF_Document*)document; |
| + if (!pDoc) return NULL; |
| + CPDF_ViewerPreferences viewRef(pDoc); |
| + return viewRef.PrintPageRange(); |
| +} |
| + |
| +DLLEXPORT FPDF_DUPLEXTYPE STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document) |
| +{ |
| + CPDF_Document* pDoc = (CPDF_Document*)document; |
| + if (!pDoc) return DuplexUndefined; |
| + CPDF_ViewerPreferences viewRef(pDoc); |
| + CFX_ByteString duplex = viewRef.Duplex(); |
| + if (FX_BSTRC("None") == duplex) |
| + return DuplexUndefined; |
| + if (FX_BSTRC("Simplex") == duplex) |
| + return Simplex; |
| + if (FX_BSTRC("DuplexFlipShortEdge") == duplex) |
| + return DuplexFlipShortEdge; |
| + if (FX_BSTRC("DuplexFlipLongEdge") == duplex) |
| + return DuplexFlipLongEdge; |
| +} |
|
Nikhil
2014/07/11 06:58:42
I just realized that this gives warning! Control m
Vitaly Buka (NO REVIEWS)
2014/07/11 19:31:54
Please just return DuplexUndefined; at the end of
Nikhil
2014/07/14 07:25:10
Done.
|
| + |
| DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_BYTESTRING name) |
| { |
| if (document == NULL) |