• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Trying to convert pdf to xlsx format

New Here ,
Jan 21, 2021 Jan 21, 2021

Copy link to clipboard


The pdf I am trying to convert is a 1000 page document. The samples I received in the zip did not include a node script to export to xlsx. So I repurposed the 'export-pdf-to-docx.js' file to instead convert to xlsx by changing the following parameters within it:

1. exportPdfOperation = exportPDF.Operation.createNew(exportPDF.SupportedTargetFormats.DOCX); => exportPdfOperation = exportPDF.Operation.createNew(exportPDF.SupportedTargetFormats.XLSX);

2. const input = PDFToolsSdk.FileRef.createFromLocalFile('resources/exportPDFInput.pdf'); =>

const input = PDFToolsSdk.FileRef.createFromLocalFile('C:/NEW ABSOLUTE INPUT FILE LOCATION.pdf');

3. exportPdfOperation.execute(executionContext)
.then(result => result.saveAsFile('output/exportPdfOutput.docx')) =>

.then(result => result.saveAsFile('C:/NEW ABSOLUTE OUTPUT FILE LOCATION.xlsx'))


When I first tested with a 5 page pdf file, it worked just fine. However when I tried again with the 1000 page pdf, I am getting the following error. Please help clarify the issue and how to address this.


2021-01-21T16:29:39.682:[INFO]: All validations successfully done. Beginning PDF export
Exception encountered while executing operation ServiceApiError: An unknown error has occurred.
at C:\Abode PDF Tools SDK\adobe-dc-pdf-tools-sdk-node-samples\node_modules\@adobe\documentservices-pdftools-node-sdk\src\internal\api\cpf-api.js:170:20
at IncomingForm.<anonymous> (C:\Abode PDF Tools SDK\adobe-dc-pdf-tools-sdk-node-samples\node_modules\formidable\lib\incoming_form.js:107:9)
at IncomingForm.emit (events.js:315:20)
at IncomingForm._maybeEnd (C:\Abode PDF Tools SDK\adobe-dc-pdf-tools-sdk-node-samples\node_modules\formidable\lib\incoming_form.js:557:8)
at JSONParser.parser.onEnd (C:\Abode PDF Tools SDK\adobe-dc-pdf-tools-sdk-node-samples\node_modules\formidable\lib\incoming_form.js:532:10)
at JSONParser.end (C:\Abode PDF Tools SDK\adobe-dc-pdf-tools-sdk-node-samples\node_modules\formidable\lib\json_parser.js:29:8)
at IncomingMessage.<anonymous> (C:\Abode PDF Tools SDK\adobe-dc-pdf-tools-sdk-node-samples\node_modules\formidable\lib\incoming_form.js:132:30)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
requestTrackingId: 'Ds6CU7fhzXr9LRn8cmG8eFraTiPw0SuP',
statusCode: 500

PDF Services API






Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation