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 "x:/pdf/fpdfapi5/include/fpdfapi.h" | |
8 #include "../include/fsdk_define.h" | 7 #include "../include/fsdk_define.h" |
9 #include "../include/fpdfedit.h" | 8 #include "../include/fpdfedit.h" |
10 #include "../include/fpdfformfill.h" | 9 #include "../include/fpdfformfill.h" |
11 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 10 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
12 #include "../include/fpdfxfa/fpdfxfa_app.h" | 11 #include "../include/fpdfxfa/fpdfxfa_app.h" |
13 #include "../include/fpdfxfa/fpdfxfa_page.h" | 12 #include "../include/fpdfxfa/fpdfxfa_page.h" |
14 | 13 |
15 | 14 |
16 #if _FX_OS_ == _FX_ANDROID_ | 15 #if _FX_OS_ == _FX_ANDROID_ |
17 #include "time.h" | 16 #include "time.h" |
(...skipping 23 matching lines...) Expand all Loading... |
41 } | 40 } |
42 } | 41 } |
43 } | 42 } |
44 | 43 |
45 CPDF_Dictionary* pInfoDict = NULL; | 44 CPDF_Dictionary* pInfoDict = NULL; |
46 pInfoDict = pDoc->GetInfo(); | 45 pInfoDict = pDoc->GetInfo(); |
47 if (pInfoDict) | 46 if (pInfoDict) |
48 { | 47 { |
49 if(FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS)) | 48 if(FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS)) |
50 pInfoDict->SetAt("CreationDate", new CPDF_String(DateStr
)); | 49 pInfoDict->SetAt("CreationDate", new CPDF_String(DateStr
)); |
51 #ifdef FOXIT_CHROME_BUILD | 50 » » pInfoDict->SetAt("Creator",FX_NEW CPDF_String(L"PDFium")); |
52 » » pInfoDict->SetAt("Creator",FX_NEW CPDF_String(L"Google")); | |
53 #else | |
54 » » pInfoDict->SetAt("Creator",FX_NEW CPDF_String(L"Foxit PDF SDK DL
L 2.0 - Foxit Software")); | |
55 #endif | |
56 } | 51 } |
57 | 52 |
58 CPDFXFA_App* pApp = FPDFXFA_GetApp(); | 53 CPDFXFA_App* pApp = FPDFXFA_GetApp(); |
59 CPDFXFA_Document* document = FX_NEW CPDFXFA_Document(pDoc, pApp); | 54 CPDFXFA_Document* document = FX_NEW CPDFXFA_Document(pDoc, pApp); |
60 | 55 |
61 return document; | 56 return document; |
62 } | 57 } |
63 | 58 |
64 DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index) | 59 DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index) |
65 { | 60 { |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type
") || !pPage->m_pFormDict->GetElement("Type")->GetDirect() | 332 if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type
") || !pPage->m_pFormDict->GetElement("Type")->GetDirect() |
338 || pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetStrin
g().Compare("Page")) | 333 || pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetStrin
g().Compare("Page")) |
339 { | 334 { |
340 return; | 335 return; |
341 } | 336 } |
342 CPDF_Dictionary* pDict = pPage->m_pFormDict; | 337 CPDF_Dictionary* pDict = pPage->m_pFormDict; |
343 rotate %=4; | 338 rotate %=4; |
344 | 339 |
345 pDict->SetAt("Rotate", FX_NEW CPDF_Number(rotate * 90)); | 340 pDict->SetAt("Rotate", FX_NEW CPDF_Number(rotate * 90)); |
346 } | 341 } |
OLD | NEW |