Jun 13, 2014 at 12:09 AM
Edited Jun 13, 2014 at 12:19 AM
I have requirement where i am getting the data from printer in a PS format, and i want that to be converted to pdf.
data is in the form of bytearray, what is the best way to accomplish this using Ghostlibrary.
i am using right now latest version of gs
OS is windows 8, 64 bit.
gs installed is 9.09
i tried using different classes of gs but nothing worked.
using (var rasterizer = new GhostscriptRasterizer())
using (var memoryStream = new MemoryStream(bytes))
GhostscriptVersionInfo gv = GhostscriptVersionInfo.GetLastInstalledVersion();
rasterizer.Open(memoryStream, gv, false);
this fails with error "Stream format is not valid! Please make sure it's PDF, PS or EPS
whatever data i get from print command i am passing to above method, and that is not working.
I am directly using binaries without any gs code integration, and my application is running in 32 bit mode.
and if i use gs api's it converts gs sample ps->pdf files successfully, but ps files created from printtofile option in printer always gives error. nothing worked so far.
Is there any best reference i get to make this work.?