Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit ec0290c

Browse files
author
Nicolas Schäfli
committed
Merge branch 'release/0.3.0' into 'master'
Release/0.3.0 See merge request Apps/bin-eLehrmittel/pdf-wrap!6
2 parents 71c129b + 5143179 commit ec0290c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+6222
-2158
lines changed

.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/typescript-compiler.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## 0.3.0 - 2019-06-02
8+
### Added
9+
* Forms api which can be used to place rectangles, lines, circles and ellipses
10+
in a document.
11+
* Selection tool which allows to transform existing forms and drawings.
12+
### Changed
13+
* Upgrade to typescript version ^3.4.0
14+
* Engines version constraint (node 10.9 < 13.0, yarn 1.13 < 2.0)
15+
* Migrate to Gulp 4.
16+
* Updated dev example
17+
* Migrate from uglify-js to terser in order to target es2015.
18+
* Only one tool can be active at once.
19+
* Default to highlighting mode if no tool is active.
20+
* **BREAKING CHANGES**
21+
* The event PageEventCollection#afterRectangleRendered() has
22+
been renamed to PageEventCollection#afterHighlightRendered().
23+
* The Points of all elements now expect to have a x,y and z field.
24+
* Target es2015.
25+
726
## 0.2.0 - 2019-01-18
827

928
### Added

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,28 @@ to not install gulp globally and use the local gulp version.
3333

3434
> local gulp can be accessed with `yarn gulp`
3535
36-
## Running the tests
36+
> Run `yarn gulp --tasks` to obtain a list of all defined tasks.
3737
38-
Run unit tests
38+
## Build
39+
### Library
40+
To build and package the library run the following command.
41+
```
42+
yarn gulp repackage
43+
```
44+
The packed library will be located at `build/distributions/npm`.
45+
46+
### Documentation
47+
The documentation is located at `./docs`.
48+
In order to build the documentation run the following command.
49+
```
50+
yarn gulp mkdocs
51+
```
52+
The html documentation will be located at `./build/docs`.
53+
54+
## Tests
55+
### Unit tests
56+
57+
All unit test can be run with the following command.
3958

4059
```
4160
yarn gulp test
@@ -63,6 +82,7 @@ We use [SemVer](http://semver.org/) for versioning. For the versions available,
6382
## Authors
6483

6584
* **Nicolas Märchy** - *Initial work* - [BilledTrain380](https://github.com/BilledTrain380)
85+
* **Nicolas Schäfli** - [d3r1w](https://github.com/d3r1w)
6686

6787
See also the list of [contributors](https://github.com/studer-raimann/pdf-wrap/graphs/contributors) who participated in this project.
6888

docs/reference-documentation.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,38 @@ The Eraser can only remove strokes made with the Freehand tool.
306306
In order to remove a stroke, the eraser tool needs to be activated
307307
and the stroke needs to be crossed with the mouse while the mouse is pressed.
308308

309+
### Selection
310+
311+
**Limitations:**
312+
* The selected element can not be moved from one page to another.
313+
* Multiselection is currently not supported.
314+
315+
The selection can be used to select forms or drawings.
316+
317+
An element selection supports the following operations:
318+
* Resizing
319+
* Repositioning
320+
* Color change of the element (Fill & Border)
321+
* Change of the drawing sequence (z axis)
322+
323+
### Forms
324+
The forms tool places form elements onto the document which may be transformed with the selection tool.
325+
326+
Currently there are four types of forms supported:
327+
* Rectangles
328+
* Ellipse
329+
* Circles
330+
* Lines
331+
332+
Forms can be placed with the forms tool located in the *toolbox*.
333+
334+
```typescript
335+
pdf.toolbox.forms.circle.fillColor = colorFromHex("#F006");
336+
pdf.toolbox.forms.circle.borderColor = colorFromHex("#0F06");
337+
pdf.toolbox.forms.circle.create();
338+
pdf.toolbox.forms.circle.create(); // Will have the same colors then the first circle.
339+
```
340+
309341
## Using the highlighting
310342

311343
**Limitations:**

examples/dev-viewer/package.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,25 @@
66
"author": "studer + raimann ag",
77
"license": "GPL-3.0",
88
"scripts": {
9-
"copyCSS": "cp -r src/css build/www",
10-
"copyPDFjs": "mkdir -p build/www/assets/libs/pdf-wrap && cp -r node_modules/@srag/pdf-wrap/assets/* build/www/assets/libs/pdf-wrap",
11-
"copyResources": "cp src/index.html build/www && cp -r src/assets/* build/www/assets",
12-
"build": "yarn webpack && yarn run copyResources && yarn run copyPDFjs && yarn run copyCSS",
9+
"build": "yarn webpack -c webpack.config.js",
1310
"clean": "rm -r build",
14-
"start": "yarn run build && yarn light-server -s build/www"
11+
"start": "yarn webpack-dev-server -c webpack.config.js"
1512
},
1613
"devDependencies": {
17-
"light-server": "^2.5.1",
14+
"copy-webpack-plugin": "^5.0.3",
15+
"css-loader": "^2.1.1",
16+
"file-loader": "^3.0.1",
17+
"html-webpack-plugin": "^3.2.0",
18+
"raw-loader": "^2.0.0",
19+
"style-loader": "^0.23.1",
1820
"webpack": "^4.12.0",
19-
"webpack-cli": "^3.0.3"
21+
"webpack-cli": "^3.0.3",
22+
"webpack-dev-server": "^3.4.1"
2023
},
21-
"dependencies": {}
24+
"dependencies": {
25+
"bootstrap": "^4.3.1",
26+
"bootstrap-colorpicker": "^3.1.2",
27+
"jquery": "^3.4.1",
28+
"popper.js": "^1.14.7"
29+
}
2230
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
html, body {
2+
height: 100%;
3+
}
4+
5+
.pdf-container {
6+
overflow: scroll;
7+
height: 100%;
8+
position: relative;
9+
}
10+
11+
.pdf-container * {
12+
box-sizing: content-box !important;
13+
}
14+
15+
.middle.aligned {
16+
text-align: center;
17+
}
18+
19+
.sidebar {
20+
background-color: white;
21+
overflow-y: scroll;
22+
}
23+
24+
.sidebar.left {
25+
float: left;
26+
}
27+
28+
.sidebar.right {
29+
float: right;
30+
}
31+
32+
.dark {
33+
background-color: #333333;
34+
}
35+
36+
.padded {
37+
padding: 10px;
38+
}
39+
40+
ul.no.style {
41+
list-style: none;
42+
}
43+
44+
li.center.aligned {
45+
text-align: center;
46+
}
47+
48+
.positioned-viewport {
49+
top: 239px!important;
50+
left: 335px!important;
51+
right: 160px!important;
52+
}

0 commit comments

Comments
 (0)