Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawing directly onto the Page in an Overlay #25

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
"@rollup/plugin-node-resolve": "^7.0.0",
"autoprefixer": "^9.7.6",
"open": "^7.0.3",
"postcss": "^7.0.27",
"postcss": "^7.0.36",
"postcss-load-config": "^2.1.0",
"rollup": "^1.20.0",
"rollup-plugin-livereload": "^1.0.0",
"rollup-plugin-svelte": "^5.0.3",
"rollup-plugin-terser": "^5.1.2",
"svelte": "^3.0.0",
"rollup": "^2.57.0",
"rollup-plugin-livereload": "^2.0.5",
"rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-terser": "^7.0.2",
"svelte": "^3.42.6",
"svelte-preprocess": "^3.7.4",
"tailwindcss": "^1.3.5"

},
"dependencies": {
"sirv-cli": "^0.4.4"
Expand Down
6 changes: 3 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<title>
No Server, No Install, Mobile Friendly PDF Editor - PDF Editor
</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="stylesheet" href="/build/bundle.css" />
<script defer src="/build/bundle.js"></script>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" href="build/bundle.css" />
<script defer src="build/bundle.js"></script>
</head>
<body></body>
</html>
5 changes: 5 additions & 0 deletions public/overlay.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/stroke.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ No install. No server. ¯\\\_(ツ)\_/¯ https://pdf-editor.now.sh
## How to use pdf-editor?

1. Click `Choose PDF` to upload a `.pdf` file.
2. Add images, signatures, text to your PDF.
2. Add images, signatures, text, freehand drawing to your PDF.
3. Click `Save`.
4. That's it! All is done **in your browser**.

## Features

- Resize and move everything.
- Add signatures.
- Draw on page.
- Adjust line height, font size, font family.
- Mobile friendly.
- Drag and drop to upload your PDF.
Expand Down
23 changes: 12 additions & 11 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ export default {
plugins: [
svelte({
preprocess: sveltePreprocess({ postcss: true }),
// enable run-time checks when not in production
dev: !production,
// we'll extract any component CSS out into
// a separate file - better for performance
css: (css) => {
css.write('public/build/bundle.css');
},
emitCss: false,
compilerOptions: {
// enable run-time checks when not in production
dev: !production,
// we'll extract any component CSS out into
// a separate file - better for performance
css: (css) => {
css.write('public/build/bundle.css');
}
}
}),

resolve({
browser: true,
dedupe: ['svelte'],
Expand All @@ -49,12 +51,11 @@ function serve() {
writeBundle() {
if (!started) {
started = true;

require('child_process').spawn('yarn', ['start', '--dev'], {
require('child_process').spawn('npm', ['start', '--dev'], {
stdio: ['ignore', 'inherit', 'inherit'],
shell: true,
});
open('http://localhost:5000');
open('http://localhost:5000/index.html');
}
},
};
Expand Down
Loading