TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sarmad Yousif
NA
128
7k
GhostScript convert PDF to image
Feb 6 2020 12:27 PM
I followed this tutorial :
https://www.c-sharpcorner.com/blogs/convert-pdf-file-into-image-filepngjpgjpeg-using-ghostscript
public void ExtracImagesFromPdf(string fileNameResultDirectory)
{
GhostscriptPngDevice img = new GhostscriptPngDevice(GhostscriptPngDeviceType.Png16m);
img.GraphicsAlphaBits = GhostscriptImageDeviceAlphaBits.V_4;
img.TextAlphaBits = GhostscriptImageDeviceAlphaBits.V_4;
img.ResolutionXY = new GhostscriptImageDeviceResolution(200, 200);
img.InputFiles.Add(fileNameResultDirectory);
//img.Pdf.FirstPage = 1;
//img.Pdf.LastPage = 1;
img.PostScript = string.Empty;
img.OutputPath = @"C:\Users\name\Desktop\images\Result";
img.Process();
}
I get this error: Ghostscript.NET.GhostscriptAPICallException: 'An error occured when call to 'gsapi_init_with_args' is made: -100'
My PDF has more than page.
Reply
Answers (
4
)
Upload a file using WebApi
RoutConfigure more than two routes or one is enough?