Free Support Forum -

GroupDocs.Viewer.Examples.CSharp example 's RenderDocumentAsPDF Example Paging problem



I’m using example call RenderDocumentAsPDF , input excel file(has 3 pages),
but the pdf file only 1 page ???
May I have 3 pages also?


Hello Jenny,

Many thanks for your query,

The Examples at have been carefully written and tested.

Please make sure that you didn’t change the code of any function. If you had made any change then please provide us the written code.

Make sure that the file which have been used is in proper format.

Can you provide us the problematic PDF so we could reproduce the issue at our end?

Thanks in Advance


The issues you have found earlier (filed as VIEWERNET-436) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by groupdocs.notifier.


Hi Muhammadumar,

My code are below,

//license …
GroupDocs.Viewer.License lic = new License();
//gen PDF file

public static void RenderDocumentAsPDF(string fullFileName)
var fileName = Path.GetFileName(fullFileName);
var pdfName = Path.GetFileNameWithoutExtension(fullFileName) + “.pdf”;
var storageFolder = Path.GetDirectoryName(fullFileName);

var config = new ViewerConfig();
config.StoragePath = storageFolder;
config.UseCache = false;

var imageHandler = new ViewerImageHandler(config);

var options = new PdfFileOptions();
//file name
options.Guid = fileName;

//gen PDF
FileContainer container = imageHandler.GetPdfFile(options);

using (FileStream fileStream = File.Create(Path.Combine(config.StoragePath, pdfName), (int)container.Stream.Length))
byte[] bytesInStream = new byte[container.Stream.Length];
container.Stream.Read(bytesInStream, 0, bytesInStream.Length);
fileStream.Write(bytesInStream, 0, bytesInStream.Length);

Attach File contains e3.xls , e3.pdf (use ViewerImageHandler to render file), e3_ms.pdf (use office excel save as pdf)



Hello Jenny,

Thank you for raising the issue as you mentioned in your earlier post.

I am logging an improvement request in our Issue Tracking System. Our product team will look into this feature. Once there is any further update, you will be updated via this forum thread.

Thanks in advance


Hi Muhammadumar,

Other problem is there are more space at right side in pdf file.
Do I have to change other settings? Thank you.

Best Regards,


Hi Jenny,

I am going to include your point into the already raised issue. Our product team will also look at this issue. You would be informed through this thread, as any update would be taken place.

Thank you

Hi Muhammadumar,
Thank you.

Best Regards,


You are always welcome :)