OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "../include/fsdk_define.h" | 7 #include "../include/fsdk_define.h" |
8 #include "../include/fpdfview.h" | 8 #include "../include/fpdfview.h" |
9 #include "../include/fsdk_rendercontext.h" | 9 #include "../include/fsdk_rendercontext.h" |
10 #include "../include/fpdf_progressive.h" | 10 #include "../include/fpdf_progressive.h" |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 } | 859 } |
860 | 860 |
861 DLLEXPORT FPDF_BOOL STDCALL FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT documen
t) | 861 DLLEXPORT FPDF_BOOL STDCALL FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT documen
t) |
862 { | 862 { |
863 CPDF_Document* pDoc = (CPDF_Document*)document; | 863 CPDF_Document* pDoc = (CPDF_Document*)document; |
864 if (!pDoc) return TRUE; | 864 if (!pDoc) return TRUE; |
865 CPDF_ViewerPreferences viewRef(pDoc); | 865 CPDF_ViewerPreferences viewRef(pDoc); |
866 return viewRef.PrintScaling(); | 866 return viewRef.PrintScaling(); |
867 } | 867 } |
868 | 868 |
| 869 DLLEXPORT int STDCALL FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document) |
| 870 { |
| 871 CPDF_Document* pDoc = (CPDF_Document*)document; |
| 872 if (!pDoc) return TRUE; |
| 873 CPDF_ViewerPreferences viewRef(pDoc); |
| 874 return viewRef.NumCopies(); |
| 875 } |
| 876 |
| 877 DLLEXPORT FPDF_PAGERANGE STDCALL FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT
document) |
| 878 { |
| 879 CPDF_Document* pDoc = (CPDF_Document*)document; |
| 880 if (!pDoc) return NULL; |
| 881 CPDF_ViewerPreferences viewRef(pDoc); |
| 882 return viewRef.PrintPageRange(); |
| 883 } |
| 884 |
| 885 DLLEXPORT int STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document) |
| 886 { |
| 887 CPDF_Document* pDoc = (CPDF_Document*)document; |
| 888 if (!pDoc) return FALSE; |
| 889 CPDF_ViewerPreferences viewRef(pDoc); |
| 890 return viewRef.Duplex(); |
| 891 } |
| 892 |
869 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_
BYTESTRING name) | 893 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_
BYTESTRING name) |
870 { | 894 { |
871 if (document == NULL) | 895 if (document == NULL) |
872 return NULL; | 896 return NULL; |
873 if (name == NULL || name[0] == 0) | 897 if (name == NULL || name[0] == 0) |
874 return NULL; | 898 return NULL; |
875 | 899 |
876 CPDF_Document* pDoc = (CPDF_Document*)document; | 900 CPDF_Document* pDoc = (CPDF_Document*)document; |
877 CPDF_NameTree name_tree(pDoc, FX_BSTRC("Dests")); | 901 CPDF_NameTree name_tree(pDoc, FX_BSTRC("Dests")); |
878 return name_tree.LookupNamedDest(pDoc, name); | 902 return name_tree.LookupNamedDest(pDoc, name); |
879 } | 903 } |
OLD | NEW |