Creating PDF/A with GhostscriptProcessor

后端 未结 1 2029
天涯浪人
天涯浪人 2021-01-22 08:41

I want to convert a PDF file into PDF/A with GhostscriptProcessor, but the result is a PDF not PDF/A.

GhostscriptProcessor gsproc = new GhostscriptProcessor(Prop         


        
相关标签:
1条回答
  • 2021-01-22 09:06

    First switch is ignored. You need to add dummy switch at position 0 so the code will look like:

    string[] CreateTestArgs(string inputPath, string outputPath)
    {
        List<string> gsArgs = new List<string>();
        gsArgs.Add("-notused");
        gsArgs.Add("-dPDFA");
        gsArgs.Add("-dBATCH");
        gsArgs.Add("-dNOPAUSEgsArgs");
        gsArgs.Add("-sDEVICE=pdfwrite");
        gsArgs.Add(@"-sOutputFile=" + outputPath);
        gsArgs.Add(@"-f" + inputPath);
        return gsArgs.ToArray();
    }
    
    0 讨论(0)
提交回复
热议问题