Open tu11950 opened 1 year ago
I had the same problem,when I printpdf on win11 using Ghostscript.NET v1.2.3。When printing a pdf file, multiple tasks appeared in the printer queue.the cod is following,The code is shown below:
public static void PrintReceipt(string pdfFilePath,string printerName)
{
try
{
var path = "";
if (Environment.Is64BitOperatingSystem)
{
path = Path.Combine(AppContext.BaseDirectory, "GSDll/gsdll64.dll");
}
else
{
path = Path.Combine(AppContext.BaseDirectory, "GSDll/gsdll32.dll");
}
var gvi = new GhostscriptVersionInfo(path);
Ghostscript.NET.Processor.GhostscriptProcessor processor = new Ghostscript.NET.Processor.GhostscriptProcessor(gvi, true);
var switches = new List
My environment:
Windows 11 Chinese 64-bit Ghostscript version: 10.0.0 64-bit Ghostscript.NET v1.2.3 (latest)
Hello, I'm using this function to "compress" PDF files. If the filename has Asian language (Japanese and Vietnamese) and the number of characters in filename is longer 15, the error "'gsapi_init_with_args' is made -100" will be appear.
Example:
Input Filename: "こんにちは、私の名前は.pdf" or "Xin chào, tôi tên là. Xin chào, tôi tên là.pdf"
Output Filename: "こんにち.p" or "Xin cháo, tôi tơn lá". They're without extension in filename, zero size and incorrect filename.
Expected Filename: "こんにちは、私の名前は.pdf" or "Xin chào, tôi tên là. Xin chào, tôi tên là.pdf" with smaller size.
If the filename has Asian language (Japanese and Vietnamese) and the number of characters in filename is shorter 15, it's OK to use.
I also use the PDF to TIFF conversion using Ghostscript.NET. When using this feature with PDF files as above, there is no problem. Code below with PDF files as above is OK:
My environment:
Please help me fix this. Thank you in advance.
This code with PDF files as above is not working and errors: