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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Does the entire PDF have to be the same size?

Thread ID:





114014 Oct 22,2013 08:36 PM UTC Oct 28,2013 04:16 AM UTC ASP.NET Web Forms (Classic) 1
Tags: PDF
John Bonds
Asked On October 22, 2013 08:36 PM UTC

I'm writing images from a multi-page TIFF to a PDF using code similar to below:

  Public Sub AppendImage(ByVal vPDFDoc As PdfDocument, ByVal vPDFBitmap As Syncfusion.Pdf.Graphics.PdfBitmap, ByVal vFrame As Integer)
    Dim pPDFPage As PdfPage = vPDFDoc.Pages.Add
    pPDFPage.Section.PageSettings.Margins.All = 0
    Dim pGraphics As Syncfusion.Pdf.Graphics.PdfGraphics = pPDFPage.Graphics
    vPDFBitmap.ActiveFrame = vFrame
    pGraphics.DrawImage(vPDFBitmap, 0, 0, pPDFPage.GetClientSize.Width, pPDFPage.GetClientSize.Height)
  End Sub

The above is a helper function. I'm working with some images that are different sizes, some long and some short. When I attempt to set the size of the new instance of the PDFPage, it seems to change the size of ALL the pages in the PDF instead of just the individual page.

pPDFPage.Section.PageSettings.Width = vPDFBitmap.Width
pPDFPage.Section.PageSettings.Height = vPDFBitmap.Height

This results in the resulting PDF displaying images that are stretched or compressed.


Please advise.

Praveenkumar H [Syncfusion]
Replied On October 28, 2013 04:16 AM UTC

Hi John,

Thank you for your interest in Syncfusion products.

We are able to reproduce the issue.

Could you please report this issue through Direct Trac Developer Support System (https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon