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以降、PDFから下付き文字および上付き文字のテキストを抽出するサポートが追加されました。

PDF文書に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内のSuspectsフラグを削除します。

  • ドキュメントを保存する際にInfoを削除します。

Aspose.PDF 22.3の新機能

このリリースには以下の更新が含まれています:

  • AFRelationshipのサポート。

  • PDFヘッダーの検証。

  • ドキュメントを保存する際にadbe.x509.rsa_sha1サブフィルターを削除します。

  • フィールドを数値および日付形式としてフォーマットします。

  • FDF 2.0でのRC4暗号の使用を禁止します。

Aspose.PDF 22.2の新機能

22.2バージョンから、LTVを使用してPdfFileSignatureでドキュメントに署名することが可能になり、ハッシュを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は最も人気のあるドキュメント形式の1つであるポータブルドキュメント形式(PDF)バージョン2.0からドキュメントを読み込むことをサポートしています。