We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose pdf not working with table and images? please advise

I am still trying out aspose pdf product. I was trying to convert a testing page to pdf, but the resulting pdf does not look like the webpage. Either the image did not get rendered, or the table is out of place, or there is gap that’s not supposed be there.

the url is “http://preview.shoom.com/InvoiceView/PDFTest1.htm”… and i have attached the resulting pdf from my testing using aspose pdf library.

The code i used is as follows:

WebRequest request = WebRequest.Create(@“http://preview.shoom.com/InvoiceView/PDFTest1.htm”);
// If required by the server, set the credentials.
request.Credentials = CredentialCache.DefaultCredentials;
// time out in miliseconds before the request times out
request.Timeout = 10000;

// Get the response.
HttpWebResponse response = (HttpWebResponse)request.GetResponse();

// Get the stream containing content returned by the server.
Stream dataStream = response.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd();


MemoryStream stream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseFromServer));
HtmlLoadOptions options = new HtmlLoadOptions(@“http://preview.shoom.com/InvoiceView/”);
// Load HTML file
options.UseNewConversionEngine = true;
options.PageInfo.Margin.Bottom = 0;
options.PageInfo.Margin.Top = 0;
options.PageInfo.Margin.Right = 0;
options.PageInfo.Margin.Left = 0;
options.PageInfo.Height = Aspose.Pdf.Generator.PageSize.LetterHeight;
options.PageInfo.Width = Aspose.Pdf.Generator.PageSize.LetterWidth;
Aspose.Pdf.Document pdfDocumentAs = new Aspose.Pdf.Document(stream, options);

Please advise if this is a bug in your product. Thank you.

Hi Brian,

Thanks for contacting support.

I have tested the scenario and I am able to
notice the same problem. For the sake of correction, I have logged this problem
as PDFNEWNET-39572 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. Please be patient and spare us little time. We are sorry
for this inconvenience.