Chromium Code Reviews| Index: fpdfsdk/src/fpdfview.cpp |
| diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp |
| index a5ba796158705184300e27a699a48ce64c4b02f6..20c5b1c6620c1ca6354a7f2536cbfa613a5218e7 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 TRUE; |
|
Vitaly Buka (NO REVIEWS)
2014/07/08 23:33:13
return 1
Nikhil
2014/07/09 06:19:05
Done.
|
| + 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; |
| +} |
| + |
| DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_BYTESTRING name) |
| { |
| if (document == NULL) |