Thanks Dhivya
Unfortunately I was using htmlConverter object so I couldn''t figure out how to apply what you wrote below to the code example I had.
I did notice in Object Browser I could pass ConvertToImage the width of the browser.
ie.
HtmlConverter html = new HtmlConverter()
html.ConvertToImage(this.TextBox1.Text, GetImageType(),1024))
I could not find any mention of this in the Documentation, mayby this could be updated?
Regards,
Jason
>Hi Jason,
Yes,it is possible to set the width of the client in terms of pixel as follows.
1.HTML string is first converted into HTML document using following statement:
//Converts HTMl strings into HTML document.
InputHTML doc = new InputHTML(StreamFromString(text), manager);
2.The HTML document is converted into Bitmap image.
3.Bitmap image is then rendered into PDF whose pixels can be adjusted as follows.
//This will set the client size in terms of pixels
doc.ClientSize = new Size((int)pdfDoc.Graphics.ConvertUnits(pdfDoc.LastPage.DrawingWidth,PrintUnits.Point,PrintUnits.Pixel),800);
Here is a sample for your reference.
HTMLToDoc_44c2c9cf.zip
Please take a look into it and let me know if you have any other queries.
Thanks,
Dhivya.