Skip to content

Commit b8471fc

Browse files
committed
JS -- Implement doc object
* https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_api_reference.pdf#page=335 * it has all the properties/methods defined in the spec * unimplemented methods are there but with an empty body to avoid exception when calling an undefined method * implement zoom, zoomType, layout, pageNum, ...
1 parent 55f55f5 commit b8471fc

File tree

7 files changed

+1184
-22
lines changed

7 files changed

+1184
-22
lines changed

src/scripting_api/constants.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* Copyright 2020 Mozilla Foundation
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
const ZoomType = Object.freeze({
17+
none: "NoVary",
18+
fitP: "FitPage",
19+
fitW: "FitWidth",
20+
fitH: "FitHeight",
21+
fitV: "FitVisibleWidth",
22+
pref: "Preferred",
23+
refW: "ReflowWidth",
24+
});
25+
26+
export { ZoomType };

0 commit comments

Comments
 (0)