GENERATE PDF FROM URL DOES NOT WORK

We are trying to generate PDF from url with styles. We are facing below issues

  1. The heading text gets blur
  2. The fonts losses the sharpness
  3. We can set the left and right margins but it does not work.

Please help as it is very urgent.

  1. I have attached code we have used
  2. I have copied the HTML and css for reference please link on contact-history html to view screen in
    browser
  3. I have attached the image of pdf generated.

Please help us urgently.

aspose pdf.zip (741.6 KB)

@durgeshdulera

Unfortunately, we are unable to generate the same output at our end. When we convert the shared HTML to PDF, the output looks not good.

Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing. We will then investigate the issue and log the same issue in our issue tracking system for fix.

Thanks Tahir,
I can create a standalone console application and share it with you. Can you host the html and css page at your end ? so that when you run the console app it generates pdf/

@durgeshdulera

We can open the HTML at our end. We have converted it using Aspose.PDF for .NET with following code example. However, the HTML to PDF conversion generates incorrect output. Please check the attached PDF. 22.2.pdf (207.7 KB)

We have logged this issue as PDFNET-51439 in our issue tracking system.

MarginInfo margin = new MarginInfo();
margin.Left = 15;
margin.Right = 15;
margin.Top = 10;
margin.Bottom = 10;
HtmlLoadOptions options = new HtmlLoadOptions() { PageInfo = { Width = 842, Height = 1191, IsLandscape = true, Margin = margin } };
options.HtmlMediaType = HtmlMediaType.Print;
Document doc = new Document(@"SampleFile.html", options);
doc.Save(dataDir + "22.2.pdf");

You are generating PDF from URL. Could you please share the URL that you are using and problematic output PDF that you generated at your end?

Hi Tahir,
I have hosted the page for your reference, I need to create PDF from URL. Please provide me the code to do it. Below is the URL of page.

[https://tool-uat.cm-internal.com/lib/temp/contact-history/Contact%20history.html]

@durgeshdulera

We downloaded the web page at our end will all CSS and convert the HTML document to PDF. However, we faced the same output as shared in my older post. We already logged this issue in our issue tracking system.

To ensure a timely and accurate response, please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

Thanks for your cooperation.

I have build a console application .Net core 5.0 to generate PDF from url. The PDF can be found at the debug/PDF folder. The PDF has following problems. Please download the console app from below link

https://tool-uat.cm-internal.com/lib/temp/UrlToPDF.zip

you will find the PDF in debug/PDF directory. It has below problems

1.The heading text gets blur (to overcome this we have used media query it should work without media queries)
2.The fonts losses the sharpness (to overcome this we have used media query it should work without media queries)
3.We can set the left and right margins but it does not work.

Please help us.
Thanks

@durgeshdulera

We have logged this problem in our issue tracking system as PDFNET-51529. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hello Tahir,
Can you please give me tentative date to resolve this issue.

@durgeshdulera

Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.

Tahir,

Any updates for the ticket PDFNET-51529 ?

@durgeshdulera

We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. We work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

Currently, your issues are pending for analysis. Once there is an update available on your issues, we will share it with you via this forum thread.

Tahir,
Any updates on the above ticket.

@durgeshdulera

Unfortunately, there is no update available on your issues. We will be sure to inform you via this forum thread once there is an update available on it.