ghostscript api를 사용하여 pdf를 인쇄하는 방법. Google을 시도했지만 여전히 적절한 해결책을 얻지 못했습니다. 이 일을 어떻게 도와 드릴까요?Ghostscript.NET.dll 지정된 프린터로 PDF 인쇄
답변
이 (Ghostscript.NET 래퍼를 사용하여) 당신을 위해 작동합니다 :
using System;
using System.Collections.Generic;
using Ghostscript.NET.Processor;
namespace Ghostscript.NET.Samples
{
public class SendToPrinterSample : ISample
{
public void Start()
{
// YOU NEED TO HAVE ADMINISTRATOR RIGHTS TO RUN THIS CODE
string printerName = "YourPrinterName";
string inputFile = @"E:\__test_data\test.pdf";
using (GhostscriptProcessor processor = new GhostscriptProcessor())
{
List<string> switches = new List<string>();
switches.Add("-empty");
switches.Add("-dPrinted");
switches.Add("-dBATCH");
switches.Add("-dNOPAUSE");
switches.Add("-dNOSAFER");
switches.Add("-dNumCopies=1");
switches.Add("-sDEVICE=mswinpr2");
switches.Add("-sOutputFile=%printer%" + printerName);
switches.Add("-f");
switches.Add(inputFile);
processor.StartProcessing(switches.ToArray(), null);
}
}
}
}
덕분에 그 작품 : ( –
나는 ghost 스크립트 설치와 함께 아래 링크 코드를 제안했다. 나는 gsdll32.dll 어셈블리 바이너리와 GhostscriptVersionInfo를 시도했다. [link] (https://ghostscriptnet.codeplex.com/discussions/465418) 네이티브 dll 및 관리되는 어셈블리를 사용하는 방법을 알려주십시오. –
pdf1.7 (xfa) –
- 1. pdf 프린터로 문서 인쇄
- 2. 프로그래밍 방식으로 PDF 프린터로 인쇄
- 3. Java에서 PDF 프린터로 인쇄 할 수 없습니다.
- 4. Ruby에서 프린터로 파일 인쇄
- 5. Windows 서비스에서 PDF 인쇄
- 6. PHP에서 네트워크 프린터로 인쇄
- 7. Microsoft 웹 브라우저 ActiveX 컨트롤 - 지정된 (기본값이 아닌) 프린터로 인쇄
- 8. Java - 영수증 프린터로 인쇄
- 9. 영수증 프린터로 인쇄
- 10. C에서 특정 프린터로 인쇄 #
- 11. 인터넷에서 원격 프린터로 인쇄
- 12. PHP에서 프린터로 인쇄
- 13. 열전 사 프린터로 인쇄
- 14. PHP continuouspaper 프린터로 인쇄
- 15. 레일 3/자바 스크립트 : 기본 프린터로 PDF 인쇄
- 16. 선택에 따라 프린터로 자바 인쇄
- 17. 인쇄 PDF 프린터를
- 18. pdf 파일을 프린터로 보내십시오 - print pdf
- 19. Windows 서비스를 통해 프린터로 pdf 파일 보내기
- 20. Python을 사용하여 USB 프린터로 인쇄 작업 보내기
- 21. C# 도트 매트릭스 프린터로 인보이스 인쇄
- 22. iframe을 통해 브라우저의 PDF URL을 프린터로 보냅니다.
- 23. 영수증 프린터로 인쇄 PRP-085IIIT
- 24. C#의 네트워크 프린터로 인쇄
- 25. 루비에서 IP 영수증 프린터로 인쇄
- 26. MigraDoc 문서를 특정 프린터로 인쇄
- 27. 모바일 브라우저에서 블루투스 프린터로 인쇄
- 28. FoxPro 2.6에서 USB 프린터로 인쇄
- 29. 크리스탈 보고서를 잘못된 프린터로 인쇄
- 30. Infopath - 네트워크 프린터로 양식 인쇄
당신은 구글은 충분하지 않았다. http://stackoverflow.com/questions/21462247/printing-pdf-using-ghostscript-net-dpi-printing-issue | 필요한 경우이 변환기를 사용할 수 있습니다. http://codeconverter.sharpdevelop.net/SnippetConverter.aspx –
https://ghostscriptnet.codeplex.com/discussions/574516 | https://ghostscriptnet.codeplex.com/discussions/470946 –
@Visual Vincent 위의 모든 예는 pdf 이미지로 변환합니다. 나는 인쇄 pdf를 프린터로 보내고 싶다. –