Image size is increasing in generated PDF document

Last post 12-16-2011, 3:35 AM by nausherwan.aslam. 6 replies.
Sort Posts: Previous Next
  •  11-18-2011, 12:04 AM 343242

    Image size is increasing in generated PDF document

    Hi,

    We have upgraded the product  to v6.4 and  observed that image size is increasing in generated pdf. Image is displaying correctly in html view but size is increasing in pdf document. We are using following code:

    string comments = "<OL><LI><STRONG><FONT color=#ff0000>this is sample test.</FONT></STRONG></LI><LI><EM><FONT size=5 face="Courier New">this is second test.</FONT></EM></LI><LI>third line</LI></OL><P><IMG src="http://10.11.164.232:8092/Uploads/propscilogo.GIF" width=251 height=59></P>";

    TextInfo textinfoComment = new TextInfo();
    textinfoComment.Alignment = AlignmentType.Justify;

    Aspose.Pdf.Table tab14 = new Aspose.Pdf.Table();
    tab14.DefaultCellPadding = margin;
    tab14.ColumnWidths = "5% 95%";

    Row row00 = tab14.Rows.Add();
    Cell cell = row00.Cells.Add("Conclusion");
    cell.ColumnsSpan = 2;
    cell.DefaultCellTextInfo = textinfo;

    Text commentText = new Text(comments);
    commentText.IsHtmlTagSupported = true;

    Row row20 = tab14.Rows.Add();
    row20.Cells.Add("");

    Aspose.Pdf.Cell cell2 = row20.Cells.Add();
    cell2.DefaultCellTextInfo = textinfoComment;
    cell2.Paragraphs.Add(commentText);

    section.Paragraphs.Add(tab14);

    Regards,
    Surya

     
  •  11-18-2011, 2:07 AM 343285 in reply to 343242

    Re: Image size is increasing in generated PDF document

    Hi Surya,

    Please share the image file you are using with us to reproduce the issue at our end (as I am not able to connect to the server you are using in your code). This will help us check and figure out your issue soon. Also, I noticed that you are still using Aspose.Pdf.Table instead of the latest Aspose.Pdf.Generator.Table. Please update your code accordingly to use the latest apis of Aspose.Pdf for .NET 6.x.

    Thank You & Best Regards,


    Nausherwan Aslam
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  11-18-2011, 3:03 AM 343306 in reply to 343285

    Re: Image size is increasing in generated PDF document

    Attachment: Present (inaccessible)

    Hi Aslam,
    We have updated the code after product upgradation. Now we are using Aspose.Pdf.Generator.Table only. Please find the attached image for your reference.

    Thanks,

    Surya

     
  •  11-18-2011, 3:34 AM 343319 in reply to 343306

    Re: Image size is increasing in generated PDF document

    Attachment: Present (inaccessible)
    Hi Surya,

    Thanks for sharing the image file. I have tested the scenario and have observed that image dimensions are increasing when HTML string is converted into PDF format. For the sake of correction, I have logged this problem as PDFNEWNET-32034 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for this inconvenience.

    However as a workaround, if you set the value of image dimensions in HTML string as width=140 height=38, the output is much better. See the attached PDF document which I have generated with Aspose.Pdf for .NET 6.4.2.

    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  12-12-2011, 2:14 AM 348433 in reply to 343242

    Re: Image size is increasing in generated PDF document

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


    This message was posted using Notification2Forum from Downloads module by aspose.notifier.
     
  •  12-15-2011, 3:21 AM 349477 in reply to 348433

    Re: Image size is increasing in generated PDF document

    Hi,

    I have upgraded Aspose.Pdf v6.4 to v6.5. Still image size is increasing in generated pdf document.

     

    Regards,

    Surya

     
  •  12-16-2011, 3:35 AM 349774 in reply to 349477

    Re: Image size is increasing in generated PDF document

    Hi Surya,

     

    Thank you for the feedback.

     

    You have set fixed width and height for the image in your code (width=251 height=59). Are you sure you want to delete ?

    Please remove it from your code to get the original size of the image.

     

    Thank You & Best Regards,


    Nausherwan Aslam
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
View as RSS news feed in XML