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

Free Support Forum - aspose.com

Aspose PDf problem(Urgent)

Hi all,

i am converting HTML to PDF by using as pose my pdf is generating fine but as soon as the size of pdf is increased while viewing it (i.e. if i increased the size of cretaed pdf from 25% to 50%) is increased the image in center shifts to another place.for convenience i am at attaching the source html and my code too

Hi Rachit,


Thanks for using our products.

I have tested the scenario using Aspose.Pdf for .NET 7.6.0 where I have update the links in HTML file to images present over my system and I am unable to notice any issue. I have used following code snippet (based on code snippet which you have shared in Source+code.txt). Can you please share which version of Aspose.Pdf for .NET you are using and also please share the resultant PDF showing the above stated issue.

We are sorry for this inconvenience.

[C#]

Aspose.Pdf.Generator.Pdf
pdf = new Aspose.Pdf.Generator.Pdf();<o:p></o:p>

StreamReader body = File.OpenText(@"c:/pdftest/SouceHtml.txt");

Aspose.Pdf.Generator.Section section = pdf.Sections.Add();

Aspose.Pdf.Generator.MarginInfo marginInfo = new Aspose.Pdf.Generator.MarginInfo();

Aspose.Pdf.Generator.Text text2 = new Aspose.Pdf.Generator.Text(section, body.ReadToEnd());

text2.IsAlignedByWord = true;

// text2.IsFitToPage = true;

text2.IsKeptTogether = true;

text2.IsHtmlTagSupported = true;

text2.IsHtml5Supported = true;

text2.IsSvgEmbedded = true;

// text2.UseTextInfoStyle = true;

text2.TextWidth = 100;

text2.TextInfo.FontSize = 32;

section.PageInfo.PageWidth = Aspose.Pdf.Generator.PageSize.A0Width;

section.PageInfo.PageHeight = Aspose.Pdf.Generator.PageSize.A1Height;

section.Paragraphs.Add(text2);

//section.PageInfo.PageWidth = Aspose.Pdf.Generator.PageSize.A3Width;

//section.PageInfo.PageHeight = Aspose.Pdf.Generator.PageSize.A2Height;

pdf.Save(@“c:/pdftest/ConversionIssues…pdf”);