Hello,
I’m converting several files of different filetypes using memorystreams. However we noticed that when for example an Excel file only has a value (eg. number “1”) in Cell A1 and we convert to PDF the GroupDocs converter will only convert that cell, resulting in a very small PDF file.
How can we achieve that the converter always converts the complete page (empty cells included) AND keeps using the saved orientation mode (Landscape / Portrait) ? Because now, when the document is not filled with a lot of cells, we have no difference in landscape/portrait in the resulting PDF file.
This code is used for conversion where the file variabel is our Excel file byte[]:
using (MemoryStream sourceStream = new MemoryStream(file))
{
using (var converter = new Converter(() => sourceStream))
{
using (MemoryStream output = new MemoryStream())
{
// Convert document through GroupsDoc.Converter
converter.Convert(new SaveDocumentStream(() => output), new PdfConvertOptions()
{
MarginBottom = 0,
MarginLeft = 0,
MarginRight = 0,
MarginTop = 0,
PdfOptions = {
PdfFormat = PdfFormats.v1_7,
OptimizationOptions = {
CompressImages = false,
ImageQuality = 100
},
Zoom = 100
}
});
Thank you in advance