ما الجديد 2022

ما الجديد في Aspose.PDF 22.12

من هذا الإصدار، دعم تحويل PDF إلى صورة DICOM


private static void PdfToDicom()
{
    // The path to the documents directory
    var dataDir = RunExamples.GetDataDir_AsposePdf_Images();

    // Open PDF document
    using (var document = new Aspose.Pdf.Document(dataDir + "PagesToImages.pdf"))
    {
        var dicom = new Aspose.Pdf.Devices.DicomDevice();
        FileStream outStream = new FileStream(dataDir + "PdfToDicom_out.dcm", FileMode.Create, FileAccess.ReadWrite);
        dicom.Process(document.Pages[1], outStream);
    }
}

ما الجديد في Aspose.PDF 22.09

منذ 22.09، دعم إضافة خاصية لتعديل ترتيب العناوين الموضوعية (E=، CN=، O=، OU=،) في التوقيع.


private static void SignPdfWithModifiedOrderOfSubjectRubrics(string pfxFilePath, string password)
{
    // The path to the documents directory
    var dataDir = RunExamples.GetDataDir_AsposePdf_SecuritySignatures();

    // Instantiate PdfFileSignature object
    using (var fileSign = new Aspose.Pdf.Facades.PdfFileSignature())
    {
        // Bind PDF document
        fileSign.BindPdf(dataDir + "DigitallySign.pdf");

        var rect = new System.Drawing.Rectangle(100, 100, 400, 100);
        var signature = new Aspose.Pdf.Forms.PKCS7Detached(pfxFilePath, password);

        // Set signature custom appearance
        signature.CustomAppearance = new Aspose.Pdf.Forms.SignatureCustomAppearance()
        {
            UseDigitalSubjectFormat = true,
            DigitalSubjectFormat = new Aspose.Pdf.Forms.SubjectNameElements[] { Aspose.Pdf.Forms.SubjectNameElements.CN, Aspose.Pdf.Forms.SubjectNameElements.O }
            //or
            //DigitalSubjectFormat = new Aspose.Pdf.Forms.SubjectNameElements[] { Aspose.Pdf.Forms.SubjectNameElements.OU, Aspose.Pdf.Forms.SubjectNameElements.S, Aspose.Pdf.Forms.SubjectNameElements.C }
        };

        // Sign PDF file
        fileSign.Sign(1, true, rect, signature);
        // Save PDF document
        fileSign.Save(dataDir + "SignPdfWithModifiedOrderOfSubjectRubrics_out.pdf");
    }
}

ما الجديد في Aspose.PDF 22.6

منذ 22.5 يدعم استخراج نصوص SubScript و SuperScript من PDF.

إذا كان مستند PDF يحتوي على نصوص SubScript و SuperScript مثل H2O، فإن استخراج النص من PDF يجب أن يستخرج أيضًا معلومات التنسيق الخاصة بهم (في النص المستخرج العادي). إذا كان PDF يحتوي على نص مائل، يجب أيضًا تضمينه في المحتوى المستخرج.


private static void ExtractTextSuperscript()
{
    // The path to the documents directory
    var dataDir = RunExamples.GetDataDir_AsposePdf_Text();

    // Open PDF document
    using (var document = new Aspose.Pdf.Document(dataDir + "TextWithSubscriptsSuperscripts.pdf"))
    {
        // Use TextFragmentAbsorber with no parameters to get all text
        var absorber = new Aspose.Pdf.Text.TextFragmentAbsorber();
        absorber.Visit(document.Pages[1]);

        // Iterate through text fragments to find superscript text
        foreach (var textFragment in absorber.TextFragments) 
        {
            if (textFragment.TextState.Superscript)
            {
                Console.WriteLine(String.Format("Text {0} at {1} is superscript!", textFragment.Text, textFragment.Position));
            }
        }
    }
}

ما الجديد في Aspose.PDF 22.4

يتضمن هذا الإصدار معلومات لـ Aspose.PDF for .NET:

  • PDF إلى ODS: التعرف على النص في النص الفرعي والنص العلوي؛

مثال


private static void ConvertPdfToOds()
{
    // The path to the documents directory
    var dataDir = RunExamples.GetDataDir_AsposePdf();

    // Open PDF document
    using (var document = new Aspose.Pdf.Document(dataDir + "input.pdf"))
    {
        // Instantiate ExcelSaveOptions object
        var saveOptions = new Aspose.Pdf.ExcelSaveOptions
        {
            // Specify the desired table file format
            Format = Aspose.Pdf.ExcelSaveOptions.ExcelFormat.ODS
        };

        // Save the file in ODS format
        document.Save(dataDir + "PDFToODS_out.ods", saveOptions);
    }
}
  • PDF إلى XMLSpreadSheet2003: التعرف على النص في النص الفرعي والنص العلوي؛

  • PDF إلى Excel: التعرف على النص في النص الفرعي والنص العلوي؛

  • إزالة توقيعات UR أثناء حفظ المستند؛

  • إزالة علامة المشتبه بهم في MarkInfo أثناء حفظ المستند؛

  • إزالة المعلومات أثناء حفظ المستند

ما الجديد في Aspose.PDF 22.3

يتضمن هذا الإصدار التحديثات التالية:

  • دعم AFRelationship؛

  • التحقق من صحة رأس PDF؛

  • إزالة الفلتر الفرعي adbe.x509.rsa_sha1 أثناء حفظ المستند؛

  • تنسيق الحقل كرقم وتنسيق تاريخ؛

  • حظر استخدام تشفير RC4 في FDF 2.0.

ما الجديد في Aspose.PDF 22.2

من إصدار 22.2، من الممكن توقيع مستند باستخدام PdfFileSignature مع LTV، مع القدرة على تغيير التجزئة من SHA1 إلى SHA256.


private static void SignPdfWithSha256(string pfxFilePath, string password)
{
    // The path to the documents directory
    var dataDir = RunExamples.GetDataDir_AsposePdf_SecuritySignatures();

    // Instantiate PdfFileSignature object
    using (var fileSign = new Aspose.Pdf.Facades.PdfFileSignature())
    {
        // Bind PDF document
        fileSign.BindPdf(dataDir + "DigitallySign.pdf");

        var rect = new System.Drawing.Rectangle(300, 100, 1, 1);
        var signature = new Aspose.Pdf.Forms.PKCS7(pfxFilePath, password)
        {
            UseLtv = true,
            TimestampSettings = new Aspose.Pdf.TimestampSettings("http://freetsa.org/tsr", string.Empty, Aspose.Pdf.DigestHashAlgorithm.Sha256)
        };

        // Sign PDF file
        fileSign.Sign(1, false, rect, signature);
        // Save PDF document
        fileSign.Save(dataDir + "SignPdfWithSha256_out.pdf");
    }
}

ما الجديد في Aspose.PDF 22.1

الآن، Aspose.PDF for .NET يدعم تحميل المستندات من أحد أكثر تنسيقات المستندات شعبية، تنسيق المستندات المحمولة (PDF) الإصدار 2.0.