إضافة جدول
Documentize PDF Manager for .NET هو مكوّن متعدد الاستخدامات صُمِّم لتبسيط دمج الجداول في مستندات PDF. سواء كنت تنظم البيانات، تصمم النماذج، أو تحسن قابلية قراءة المستند، فإن هذا المكوّن يبسط العملية مع الحفاظ على الدقة والكفاءة.
إنشاء PDF مع جداول
اتبع الخطوات التالية لإنشاء جداول منظمة في ملف PDF باستخدام الفئة TableOptions:
- ضبط كائن
TableOptionsلتحديد بنية الجدول، المحتوى، وملفات الإدخال/الإخراج. - إضافة جداول، صفوف، وخلايا إلى ملف PDF الخاص بك.
- إكمال عملية توليد الجدول باستخدام طريقة
AddTable.
إليك مثالًا:
1// Configure table options
2var options = new TableOptions();
3options.InsertPageBefore(1)
4 .AddTable()
5 .AddRow()
6 .AddCell().AddParagraph("Name")
7 .AddCell().AddParagraph("Age")
8 .AddRow()
9 .AddCell().AddParagraph("Bob")
10 .AddCell().AddParagraph("12")
11 .AddRow()
12 .AddCell().AddParagraph("Sam")
13 .AddCell().AddParagraph("20")
14 .AddRow()
15 .AddCell().AddParagraph("Sandy")
16 .AddCell().AddParagraph("26")
17 .AddRow()
18 .AddCell().AddParagraph("Tom")
19 .AddCell().AddParagraph("12")
20 .AddRow()
21 .AddCell().AddParagraph("Jim")
22 .AddCell().AddParagraph("27");
23// Add input file path
24options.AddInput(new FileData("path_to_input.pdf"));
25// Set output file path
26options.AddOutput(new FileData("path_to_output.pdf"));
27// Perform the process
28PdfManager.AddTable(options);تحديد صفحة الجدول
اتبع الخطوات التالية لإنشاء جدول في ملف PDF قبل الصفحة رقم 2: إليك مثالًا:
1// Configure table options
2var options = new TableOptions();
3options.InsertPageBefore(2) // Add table before page 2
4 .AddTable()
5 .AddRow()
6 .AddCell().AddParagraph("Name")
7 .AddCell().AddParagraph("Age");
8// Add input file path
9options.AddInput(new FileData("path_to_input.pdf"));
10// Set output file path
11options.AddOutput(new FileData("path_to_output.pdf"));
12// Perform the process
13PdfManager.AddTable(options);المميزات الرئيسية:
- إنشاء جدول ديناميكي: توليد جداول منظمة في مستندات PDF بسهولة.
- تحديد موضع الصفحة: إدراج الجداول في مواقع محددة داخل ملف PDF بدقة.
- تخطيط قابل للتخصيص: تعديل بنية الجدول، محاذاة الخلايا، وتنسيقها.