OptimizeOutput

HtmlFixedSaveOptions.OptimizeOutput property

يشير العلم إلى ما إذا كان مطلوبًا لتحسين الإخراج. إذا تم تعيين هذا العلم، تتم إزالة اللوحات المتداخلة الزائدة واللوحات الفارغة، يتم أيضًا ربط الحروف المجاورة بنفس التنسيق. ملاحظة: قد تتأثر دقة عرض المحتوى إذا تم تعيين هذه الخاصية علىحقيقي . الافتراضي هوحقيقي .

public override bool OptimizeOutput { get; set; }

أمثلة

يوضح كيفية تبسيط المستند عند حفظه بتنسيق HTML عن طريق إزالة العديد من الكائنات الزائدة.

Document doc = new Document(MyDir + "Rendering.docx");

HtmlFixedSaveOptions saveOptions = new HtmlFixedSaveOptions { OptimizeOutput = optimizeOutput };

doc.Save(ArtifactsDir + "HtmlFixedSaveOptions.OptimizeGraphicsOutput.html", saveOptions);

// حجم النسخة المحسنة من المستند هو ما يقرب من ثلث حجم المستند غير المحسن.
Assert.AreEqual(optimizeOutput ? 60385 : 191000,
    new FileInfo(ArtifactsDir + "HtmlFixedSaveOptions.OptimizeGraphicsOutput.html").Length, 200);

أنظر أيضا