Skip to main content
New Participant
May 23, 2022
Answered

Error Message Instead Only Number of Pages After "Create PDF" API

  • May 23, 2022
  • 1 reply
  • 1218 views

After using the "Create PDF" API to convert a word document (docx) to PDF, I'm using Ghostscript in order to get the generated PDF's number of pages and receiving the string " **** Error: This hybrid file's XRefStm does not point to a valid stream.\n Ignoring error, output may be incorrect.\n1\n" where 1 is the number of pages. The string should contain only the number of pages.

This topic has been closed for replies.
Correct answer Raymond Camden

I don't see anything wrong with that PDF. Unfortunately I'd have to say I think it's your script? Do note that our services have a Properties API that also returns page count. You could just use that.

1 reply

Raymond Camden
Community Manager
Community Manager
May 23, 2022

Can you share the PDF output? Our service should generate good PDFs only, so I'm leaning towards blaming your script, but I'd like to see the PDF you used if I could. 

New Participant
May 24, 2022
Raymond Camden
Community Manager
Raymond CamdenCommunity ManagerCorrect answer
Community Manager
May 24, 2022

I don't see anything wrong with that PDF. Unfortunately I'd have to say I think it's your script? Do note that our services have a Properties API that also returns page count. You could just use that.