Save a Multi-Page Document as a Single Image
Wordize provides an easy way to save multi-page documents as images.
By default, each page of the document is saved as a separate image, but you can configure Wordize to combine all pages into a single image, arranging them:
- vertically
- horizontally
- or in a grid
Сustomize the layout to render multiple pages in a single output using the MultiPageLayout class.
The following code example shows how to convert a multi-page DOCX document into a single image, where each page of the input document is rendered sequentially in a vertical layout:
ImageSaveOptions opt = new ImageSaveOptions(SaveFormat.Png);
opt.PageLayout = MultiPageLayout.Vertical(10);
opt.PageLayout.BorderColor = Color.Black;
opt.PageLayout.BorderWidth = 1;
Converter.Create()
.From("DocumentIn.docx")
.To("DocumentOut", opt)
.Execute();FAQ
Q: How can I save a multi‑page Word document as a single image?
A: UseImageSaveOptionstogether withMultiPageLayout. Set the desired layout (vertical, horizontal, or grid) onopt.PageLayout, then callConverter.Create().From(...).To(..., opt).Execute();. The result is one image that contains all pages.Q: Which layout options are available for combining pages?
A:MultiPageLayout.Vertical(float),MultiPageLayout.Horizontal(float), andMultiPageLayout.Grid(int, float, float)let you arrange pages vertically, horizontally, or in a grid.Q: How do I add a border around each page in the combined image?
A: After creating aMultiPageLayoutinstance, setBorderColorandBorderWidthon it, e.g.opt.PageLayout.BorderColor = Color.Black; opt.PageLayout.BorderWidth = 1;. The border will be drawn around every page in the final image.Q: What image formats can I use for the combined output?
A:ImageSaveOptionssupports all formats provided bySaveFormat, such as PNG, JPEG, BMP, TIFF, and GIF. Choose the format when constructingImageSaveOptions, e.g.new ImageSaveOptions(SaveFormat.Jpeg).Q: How can I control the spacing between pages in the combined image?
A: The spacing value passed to the layout method determines the gap. For vertical layout useMultiPageLayout.Vertical(10)where10is the pixel spacing; similarly,Horizontal(10)orGrid(int, 10, 10)apply the same spacing. Adjust the number to increase or decrease the gap.