Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Words برای Java به کاربران اجازه می دهد تا اسناد چند صفحه ای را به تصاویر رستر صادر کنند. این می تواند برای تولید پیش نمایش ، آرشیو یا نمایش بصری اسناد برای استفاده غیر قابل ویرایش مفید باشد.
Aspose.Words از صادرات چند صفحه ای به فرمت های تصویر رستر زیر پشتیبانی می کند:
ویژگی صادرات یک سند چند صفحه ای به یک تصویر با استفاده از کلاس MultiPageLayout اجرا می شود-شما می توانید مشخص کنید که چگونه صفحات باید هنگام ذخیره به یک تصویر سازماندهی شوند:
مثال کد زیر نشان می دهد که چگونه یک سند چند صفحه ای DOCX را به عنوان JPEG تصویر با طرح افقی ذخیره کنیم:
Document doc = new Document("Rendering.docx");
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.JPEG);
// Set up Horizontal layout.
options.setPageLayout = MultiPageLayout.Horizontal(10);
doc.save("ImageSaveOptions.HorizontalLayout.jpg", options);
همچنین می توانید ظاهر صفحه فایل خروجی را سفارشی کنید – BackColor ، BorderColor و BorderWidth را مشخص کنید.
مثال کد زیر نشان می دهد که چگونه یک سند چند صفحه ای DOCX را به عنوان PNG تصویر با طرح شبکه ذخیره کنیم:
Document doc = new Document("Rendering.docx");
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.PNG);
// Set up a grid layout with:
// - 3 columns per row.
// - 10pts spacing between pages (horizontal and vertical).
options.setPageLayout(MultiPageLayout.grid(3, 10f, 10f));
// Customize the background and border.
options.getPageLayout().setBackColor(Color.lightGray);
options.getPageLayout().setBorderColor(Color.BLUE);
options.getPageLayout().setBorderWidth(2f);
doc.save("ImageSaveOptions.GridLayout.png", options);
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.