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.