We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, i use GhostScript.Net to convert PDF pages to images. I have the following code to achieve this:
public static List<string> GetPDFPageText(Stream pdfStream, string dataPath) { try { int dpi = 100; GhostscriptVersionInfo lastInstalledVersion = GhostscriptVersionInfo.GetLastInstalledVersion( GhostscriptLicense.GPL | GhostscriptLicense.AFPL, GhostscriptLicense.GPL); List<string> textParagraphs = new List<string>(); using (GhostscriptRasterizer rasterizer = new GhostscriptRasterizer()) { rasterizer.Open(pdfStream, lastInstalledVersion,false); for (int i = 1; i <= rasterizer.PageCount; i++) { // here is the problem, pageImage returns null System.Drawing.Image pageImage = rasterizer.GetPage(dpi, i); // rest of code is unrelated to problem.. } } return textParagraphs; } catch (Exception ex) { throw new Exception("An error occurred."); } }
I think the new PDF interpreter may have some problems for now since it is new. Image returns null unless i add the following code:
rasterizer.CustomSwitches.Add("-dNEWPDF=false");
It works using old PDF interpreter. I just wanted to let you know about this problem. Thank you in advance.
The text was updated successfully, but these errors were encountered:
Yes, I ran into the same problem (the returned image is always null). The work around also worked for me...
Sorry, something went wrong.
No branches or pull requests
Hello, i use GhostScript.Net to convert PDF pages to images. I have the following code to achieve this:
I think the new PDF interpreter may have some problems for now since it is new. Image returns null unless i add the following code:
rasterizer.CustomSwitches.Add("-dNEWPDF=false");
It works using old PDF interpreter. I just wanted to let you know about this problem. Thank you in advance.
The text was updated successfully, but these errors were encountered: