示例#1
0
        private void DoConvertToPdfA(string tmpFile, string targetFile, ConversionProfile profile)
        {
            var logfile = targetFile + ".log";

            using (var converter = new Pdf2Pdf())
            {
                converter.Compliance = DetermineCompliance(profile);
                converter.Convert(tmpFile, "", targetFile, logfile);
            }
        }
示例#2
0
        private string DoConvertToPdfA(string pdfFile, ConversionProfile profile)
        {
            var targetFile = Path.ChangeExtension(pdfFile, "_pdfa.pdf");

            var logfile = targetFile + ".log";

            using (var converter = new Pdf2Pdf())
            {
                converter.Compliance = DetermineCompliance(profile);
                converter.Convert(pdfFile, "", targetFile, logfile);
            }

            return(targetFile);
        }
        private void SetLicenses()
        {
            if (!string.IsNullOrWhiteSpace(PdfAConverterKey))
            {
                Pdf2Pdf.SetLicenseKey(PdfAConverterKey);
            }

            if (!string.IsNullOrWhiteSpace(PdfSecureKey))
            {
                Secure.SetLicenseKey(PdfSecureKey);
            }

            if (!string.IsNullOrWhiteSpace(PdfToolboxKey))
            {
                Document.LicenseKey = PdfToolboxKey;
            }
        }