Code Monkey home page Code Monkey logo

pdf-editor's Introduction

PDF Editor

Tool to split one large PDF file into multiple files and draw rectangles on PDF file.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. There are two methods for getting started with this project.

Familiar with Git?

Checkout this repo, install dependencies, then start the gulp process with the following:

	> git clone https://github.com/TimZeng/pdf-editor.git
	> cd pdf-editor
	> npm install
	> npm run dev

Not Familiar with Git?

Click here then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:

	> npm install
	> npm run dev

Built With

  • ReactJs - The JavaScript library for building user interfaces
  • NodeJs - The JavaScript runtime built
  • react-pdf - Display PDF files in React applications
  • multer - node.js middleware for uploading files
  • zip-folder - Zips a folder and calls the callback
  • HummusJS - NodeJS Module for Creating, Parsing an Manipulating PDF Files and Streams
  • Webpack - The module bundler for modern JavaScript applications

Issues

  • Enable flexible editing on react component See more

Author

pdf-editor's People

Contributors

timzeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pdf-editor's Issues

Enable uploading PDF file

Now the project is looking for source files in a specific folder on the desktop, need to upload PDF file to the server for editing.

Can't npm install

Hi @TimZeng

Is this project still active?

I run npm install, it failed directly. I fork it, add a Dockerfile and run automation build command in Hub.docker.com, got the similar error.

Could you take a look? My feeling is, this OSS doesn't test with latest node versions, such as v8 or v10. If can, please let me know which node version it supported.

https://hub.docker.com/r/ozbillwang/pdf-editor/builds/bybztphmd33xpumsm72gkn3/


Step 4/5 : RUN npm install


 ---> Running in 42f023cf4087
> [email protected] install /apps/node_modules/hummus
> node-pre-gyp install --fallback-to-build


�[91mnode-pre-gyp ERR! Tried to download(404): https://hummus.s3-us-west-2.amazonaws.com/hummus/v1.0.83/node-v64-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp) 
�[0m
�[91mnode-pre-gyp ERR! Tried to download(undefined): https://hummus.s3-us-west-2.amazonaws.com/hummus/v1.0.83/node-v64-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp) 
�[0m
make: Entering directory '/apps/node_modules/hummus/build'
  ACTION Regenerating Makefile

  CXX(target) Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractContentContext.o

make: Entering directory '/apps/node_modules/hummus/build'
  CXX(target) Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractContentContext.o

  CXX(target) Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractWrittenFont.o

  CXX(target) Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractWrittenFont.o

  CXX(target) Release/obj.target/pdfwriter/src/deps/PDFWriter/ANSIFontWriter.o

�[91msed: can't read ./Release/.deps/Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractWrittenFont.o.d.raw: No such file or directory
�[0m
�[91mrm: cannot remove './Release/.deps/Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractWrittenFont.o.d.raw': No such file or directory
make: *** [Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractWrittenFont.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.4.0-1060-aws
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/apps/node_modules/hummus/binding/hummus.node" "--module_name=hummus" "--module_path=/apps/node_modules/hummus/binding"
gyp ERR! cwd /apps/node_modules/hummus
gyp ERR! node -v v10.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/apps/node_modules/hummus/binding/hummus.node --module_name=hummus --module_path=/apps/node_modules/hummus/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/apps/node_modules/hummus/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
�[0m
src/deps/PDFWriter/pdfwriter.target.mk:241: recipe for target 'Release/obj.target/pdfwriter/src/deps/PDFWriter/AbstractWrittenFont.o' failed
make: Leaving directory '/apps/node_modules/hummus/build'

Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/apps/node_modules/hummus/binding/hummus.node --module_name=hummus --module_path=/apps/node_modules/hummus/binding' (1)

�[91mnode-pre-gyp ERR! System Linux 4.4.0-1060-aws
node-pre-gyp ERR! command "/usr/local/bin/node" "/apps/node_modules/hummus/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /apps/node_modules/hummus
node-pre-gyp ERR! node -v v10.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok 
�[0m
�[91mnpm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

�[0m
�[91mnpm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
�[0m
�[91m
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-07-14T06_45_50_488Z-debug.log
�[0m
Removing intermediate container 42f023cf4087

The command '/bin/sh -c npm install' returned a non-zero code: 1

Error in run dev

ERROR in .//react-pdf/build/annotation_layer_builder.css
Module parse failed: D:\Desenvolvimento\xampp\htdocs\pdf-editor\node_modules\rea
ct-pdf\build\annotation_layer_builder.css Unexpected token (16:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (16:0)
at Parser.pp$4.raise (D:\Desenvolvimento\xampp\htdocs\pdf-editor\node_module
s\webpack\node_modules\acorn\dist\acorn.js:2221:15)
at Parser.pp.unexpected (D:\Desenvolvimento\xampp\htdocs\pdf-editor\node_mod
ules\webpack\node_modules\acorn\dist\acorn.js:603:10)
at Parser.pp$3.parseExprAtom (D:\Desenvolvimento\xampp\htdocs\pdf-editor\nod
e_modules\webpack\node_modules\acorn\dist\acorn.js:1822:12)
at Parser.pp$3.parseExprSubscripts (D:\Desenvolvimento\xampp\htdocs\pdf-edit
or\node_modules\webpack\node_modules\acorn\dist\acorn.js:1715:21)
at Parser.pp$3.parseMaybeUnary (D:\Desenvolvimento\xampp\htdocs\pdf-editor\n
ode_modules\webpack\node_modules\acorn\dist\acorn.js:1692:19)
at Parser.pp$3.parseExprOps (D:\Desenvolvimento\xampp\htdocs\pdf-editor\node
_modules\webpack\node_modules\acorn\dist\acorn.js:1637:21)
at Parser.pp$3.parseMaybeConditional (D:\Desenvolvimento\xampp\htdocs\pdf-ed
itor\node_modules\webpack\node_modules\acorn\dist\acorn.js:1620:21)
at Parser.pp$3.parseMaybeAssign (D:\Desenvolvimento\xampp\htdocs\pdf-editor
node_modules\webpack\node_modules\acorn\dist\acorn.js:1597:21)
at Parser.pp$3.parseExpression (D:\Desenvolvimento\xampp\htdocs\pdf-editor\n
ode_modules\webpack\node_modules\acorn\dist\acorn.js:1573:21)
at Parser.pp$1.parseStatement (D:\Desenvolvimento\xampp\htdocs\pdf-editor\no
de_modules\webpack\node_modules\acorn\dist\acorn.js:727:47)
@ ./
/react-pdf/build/PageAnnotations.js 35:0-41

node
v12.18.1
npm
6.14.7

@TimZeng can you help me

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.