Unable to obtain PageCount for PDFs #1359
Unanswered
mirko-horvacki
asked this question in
Help
Replies: 1 comment 2 replies
-
It suspect that |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I tried to obtain Page Count using following code:
var info = PdfInfo.Create(fileName);
isMultipage = info.PageCount > 1;
Code works perfectly when run locally on my machine but - it does not work when deployed to Azure App Service.
GhostScript is available on machine where my service is deployed, since I am using already Image Magick for different cases (one of them is rasterization which utilizes GhostScript) and those cases are fine.
Here is what exception from logs says:
FailedToExecuteCommand `"gswin64c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT --permit-file-read="7a3ea60f-8e28-48d3-8d8d-1a2841d200c5.pdf" -sPDFPassword="" -c "(7a3ea60f-8e28-48d3-8d8d-1a2841d200c5.pdf) (r) file runpdfbegin pdfpagecount = quit"' (-1073741819) @ error/delegate.c/ExternalDelegateCommand/521
What does error/delegate.c/ExternalDelegateCommand/521 mean?
Do you know maybe how I could know why command failed to execute?
It does not matter which PDF file I use, for all - exception is the same.
Thanks in advance for help!
Kind regards,
Mirko
Beta Was this translation helpful? Give feedback.
All reactions