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

pdfFiles.map is not a function #11

Open
gmramarao opened this issue Oct 12, 2017 · 3 comments
Open

pdfFiles.map is not a function #11

gmramarao opened this issue Oct 12, 2017 · 3 comments

Comments

@gmramarao
Copy link

Hey guys,

I'm getting this error when I try to use the pdf-powerpoint

TypeError: pdfFiles.map is not a function
at Powerpoint._convertWithGhostScript (D:\Angular2-Training\Day5\App\server
node_modules\pdf-powerpoint\lib\powerpoint.js:293:26)
at _getStagingDirectory.then (D:\Angular2-Training\Day5\App\server\node_modu
les\pdf-powerpoint\lib\powerpoint.js:145:33)
at tryCatcher (D:\Angular2-Training\Day5\App\server\node_modules\bluebird\js
\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\Angular2-Training\Day5\App\server\n
ode_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (D:\Angular2-Training\Day5\App\server\node_modules
\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (D:\Angular2-Training\Day5\App\server\node_module
s\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (D:\Angular2-Training\Day5\App\server\node_module
s\bluebird\js\release\promise.js:693:18)
at Async._drainQueue (D:\Angular2-Training\Day5\App\server\node_modules\blue
bird\js\release\async.js:133:16)
at Async._drainQueues (D:\Angular2-Training\Day5\App\server\node_modules\blu
ebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (D:\Angular2-Training\Day5\App\server\node_mo
dules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)

@gmramarao
Copy link
Author

Am I missing something here or is this a bug?

@MetaBarj0
Copy link
Contributor

After have read more accurately the doc and noticed the 'map' suffix on the error message, I finally figured out that the input must be an array of pdf file path, even if you have only one file to convert. When I specify an array of pdf file path, it works like a charm.

@drizzt00s
Copy link

@MetaBarj0 hi, same issue can you show us code example on this? cannot figue out what's happend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants