We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Blank pages in PDF

Thread ID:





104599 Aug 1,2012 04:45 PM Aug 2,2012 12:55 AM Windows Forms 1
Tags: PDF
Administrator [Syncfusion]
Asked On August 1, 2012 04:45 PM

I'm looping through a dataset of 17 records, each record represents a page of an image.
All is well except that I get an extra blank page after each page resulting in 34 pages.
Here is a snippet of my code:

MemoryStream ms = new MemoryStream();
ms.Write(bytes, 0, bytes.Length);

Image image = Image.FromStream(ms);

int imgWdth = image.Width;
int imgHt = image.Height;

if (imgWdth > imgHt)
 pdfdoc.PageSettings.Orientation = PdfPageOrientation.Landscape;

pdfdoc.PageSettings.Margins.All = 0.0f;

PdfPage pdfpg = pdfdoc.Pages.Add();

PdfImage pdfimg = PdfImage.FromImage(image);

pdfimg.Draw(pdfpg, 0, 0);


Kesavan D [Syncfusion]
Replied On August 2, 2012 12:55 AM

Hi John,


Thank you for using Syncfusion products.


We have created a sample for drawing the image on the pdf file, could you please verify the sample attached to this post and let us know if this helps you.






This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.