We are using version 6.1.0.0 of Aspose.PDF to convert HTML (generated as string at runtime) into PDF. Is there any method in Aspose.PDF.Generator that creates PDF and returns as PDF buffer (or Byte Array)? Currently we have found that it created PDF physically at a path provided to it.
Hi Vineet,
Thanks for your interest in our products.
Kindly use the below line of code to save PDF contents in Byte Array instead of saving PDF physically on the disk and check if it works fine for you.
[C#]
byte[] buffer = pdf.GetBuffer();
Please feel free to contact support in case you need any further assistance.
Thanks & Regards,
Hi Rashid,
Thanks for your kind reply, its work on my side.
We are using Aspose Total for .Net in our web application to convert files(doc,excel etc) into PDF files.
Now our requirement is convert html to pdf. We have tried methods of Aspose.Pdf dll (Version 6.1.0.0) for conversion.
We found that the html file and the resultant pdf file is not same and the following issues observed while converting the html to pdf
1) Forecolor and background color of any text in the Description not reflected (see samples in attachments)
2) Inner Borders (grid) of a Table copied & pasted from Word doesn’t show up in the PDF.(see samples in attachments)
3) Table Border color is always black and is comparatively thicker.(see samples in attachments)
4) We found that height attribute is not working in tag.
5) We Found that IsKeptTogether with Text is not working, as a result the table single row appears into two pages
6) Could you please provide us the list of html tags supported for 6.1.0.0 version.
7) Could you please provide us the list of Css styles supported for 6.1.0.0 version.
8) There is problem in rendering html table in pdf file (see Table Sample.zip in attachment)
Please find the sample HTMl file and converted PDF File for reference.
Could you please provide us the solution/workaround to solve the above issues asap?
Please note our client wants the solution in the same version of dll i.e (6.1.0.0) and doesn’t want to upgrade to newer version.
We have tried the version 7.0 of Aspose.PDF as well and the PDF generated by v7.0 is even worse than that of v6.1.
Thanks & Regards
Vineet
Hi Vineet,
Thanks for using our products and sharing the template documents with us.
I tested the scenario using Visual Studio 2010 and Aspose.Pdf for .NET v7.0. I got ‘Font source could not be opened: /usr/X11R6/lib/X11/fonts/truetype/msttcorefonts/’ exception while saving the PDF and with TableSample.htm, I am able to notice the problems. For rectification, I logged this problem with ID: PDFNEWNET-33860 in our Issue Tracking System. We will further look into the details of this issue and will keep you updated via this forum thread on the status of correction.
Kindly visit the documentation link [HTML Tags in Text](http://www.aspose.com/docs/display/pdfnet/HTML+Tags+in+Text) for supported list of HTML Tags using Aspose.Pdf for .NET.
Moreover, I am very sorry to share with you that, this is not possible to provide the fix in the same version. The hot fix of reported issues always provide in the latest version.
We apologize for your inconvenience.
Thanks & Regards,
Hi,
Thanks
for logging the issues in your Issue Tracking system. Would you be
able to provide an approximate time frame within which the issue
could be resolved?
While evaluating latest version of
Aspose Total(v7), we found that time consumption to convert HTML to
PDF is much more than the version we possess currently(6.1.0.0).
Currently we are using Subsystem's HTML to PDF converter component in
one of our web applications and observed that subsystems is taking
very less time in HTML to PDF conversion.
In order to compare the
performances, we converted a long HTML code (contained in the
attached file - “Footer.html,Header.html,SampleRpt.htm,RptLogo.jpg” in Zip Attachment(Samples.zip))
using Aspose.PDF v6.1, Aspose.PDF v7.0 and Subsystems dll
respectively, and following is our observation:
|
Tool |
Time Taken |
|
Aspose.dll(6.1.0.0) |
43 sec |
|
Aspose.dll(7.0.0.0) |
1 min : 35 sec |
|
SubSystems |
22 secs. |
Code :
***************************************************************************
Dim pdf As Aspose.Pdf.Generator.Pdf = New Aspose.Pdf.Generator.Pdf()
Dim section As Aspose.Pdf.Generator.Section = pdf.Sections.Add()
pdf.PageSetup.PageHeight = 792
pdf.PageSetup.PageWidth = 612
pdf.PageSetup.Margin.Left = 55
pdf.PageSetup.Margin.Right = 40
Dim hf1 As Aspose.Pdf.Generator.HeaderFooter = New Aspose.Pdf.Generator.HeaderFooter(section)
Dim hf2 As Aspose.Pdf.Generator.HeaderFooter = New Aspose.Pdf.Generator.HeaderFooter(section)
section.OddHeader = hf1
section.EvenHeader = hf1
hf1.Margin.Bottom = 5
section.OddFooter = hf2
section.EvenFooter = hf2
Dim rHeader As StreamReader = File.OpenText("D:/Header.html")
Dim txtHeader As Aspose.Pdf.Generator.Text = New Aspose.Pdf.Generator.Text(hf1, rHeader.ReadToEnd())
Dim rFooter As StreamReader = File.OpenText("D:/Footer.html")
Dim txtFooter As Aspose.Pdf.Generator.Text = New Aspose.Pdf.Generator.Text(hf2, rFooter.ReadToEnd())
hf1.DistanceFromEdge = 40
hf1.Paragraphs.Add(txtHeader)
txtHeader.IsHtmlTagSupported = True
hf2.Paragraphs.Add(txtFooter)
txtFooter.IsHtmlTagSupported = True
hf2.DistanceFromEdge = 70
Dim r As StreamReader = File.OpenText("D:/SampleRpt.htm")
Dim text2 As Aspose.Pdf.Generator.Text = New Aspose.Pdf.Generator.Text(section, r.ReadToEnd())
text2.IsHtmlTagSupported = True
section.Paragraphs.Add(text2)
pdf.Save("D:/SampleRpt.pdf")
***************************************************************************
Our Questions:
1. Could you please do something to improve the performance of the aspose.pdf? This is very important for us.
2. Does the Aspose.PDF (v6.1 or any other version) support Multi-Threading? We have seen some posts in this regard in your forum.
3. Aspose.PDF throws error whenever it
encounters some unsupported Font in the HTML(see attached file
“unSupportedTag.htm” in Zip Attachment(Samples.zip)) provided to it. Is there any method
in Aspose.PDF to suppress any errors? Actually what we need is that
the Aspose should not throw error in case it encounters any
unsupported HTML Tag/Font etc. and should ignore them. Could you
please add such functionality in your Aspose.PDF.dll?
Thanks & Regards
Vineet
Hi Vineet,
Thank you for sharing the details.
I am working over this query and will get back to you soon. Sorry for the inconvenience.
Thanks & Regards,
Hi Rashid,
We have found concurrency issues with both the versions i.e v6.1 and v7. When the same report is generated by the different users at the same time, only one user able to generate the report while other user is not able to generate the report.
When the different users generate the same report at different time period, then both the uses able to generate the report(html to pdf), this seems that concurrency issues are there in the aspose.pdf dll.
could you please provide us the solution for the above query?
Regards
Vineet
Hi Vineet,
Thanks for your inquiry.
vineets:
Thanks for logging the issues in your Issue Tracking system. Would you be able to provide an approximate time frame within which the issue could be resolved?
As we just have been able to discover PDFNEWNET-33860, so we require some time to investigate this issue in detail. However, as soon as we have made some significant progress towards the resolution of this problem, we would be more than happy to update you with the status of correction. Please be patient and spare us little time. We are really sorry for this inconvenience.
vineets:
1. Could you please do something to improve the performance of the aspose.pdf? This is very important for us.
I have shared the details provided by you with our development team. We will update you as soon as we get a response from the development team.
vineets:
2. Does the Aspose.PDF (v6.1 or any other version) support Multi-Threading? We have seen some posts in this regard in your forum.
I am very pleased to inform you that every version of Aspose.Pdf for .NET v6.x onwards support multi-threading. If you are facing any issue, kindly share the details or create a sample application to show the issue.
vineets:
3. Aspose.PDF throws error whenever it encounters some unsupported Font in the HTML(see attached file “unSupportedTag.htm” in Zip Attachment(Samples.zip)) provided to it. Is there any method in Aspose.PDF to suppress any errors? Actually what we need is that the Aspose should not throw error in case it encounters any unsupported HTML Tag/Font etc. and should ignore them. Could you please add such functionality in your Aspose.PDF.dll?
vineets:
We have found concurrency issues with both the versions i.e v6.1 and v7. When the same report is generated by the different users at the same time, only one user able to generate the report while other user is not able to generate the report.
When the different users generate the same report at different time period, then both the uses able to generate the report(html to pdf), this seems that concurrency issues are there in the aspose.pdf dll.
Thank you for reporting these issues to us. For the sake of correction, I have logged these issues as PDFNEWNET-33895 in our bug tracking system. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved.
We apologize for your inconvenience.
Thanks & Regards,
Hi Rashid,
Its really set back for us as no workaround/solutions suggested by you in order to resolve those mentioned issues in version(6.1.0.0).
While Evaluating latest version of Aspose Total (7.0.0.0), we found that latest version is even worst than (6.1.0.0) for HTML-PDF Conversion.
I m attaching the sample html file (SampleRpt_July05.htm) along with with pdf files generated through V6(SampleRpt_July06_V6.1.pdf) and V7(SampleRpt_July05_V7.pdf).
Please find the samples files in attachment(samples_July05.zip)
Following are our observation/comparisons
|
Issues |
SampleRpt_July06_V6.1.pdf |
Page No |
SampleRpt_July05_V7.pdf |
Page No |
|
Header and Footer is color less(i.e no colors in header & footer) |
Header & footer is looking as expected. |
1 |
No colors in the header & footers |
1
|
|
PDF page right margin issue |
All margins are coming as expected in the pdf file |
All PAges |
Right Margin is not Working.(i.e contents moving out of the page) |
All Pages |
|
background colors in table rows |
Colors are coming as expected. |
All pages |
No colors are coming in table rows |
All pages |
|
Fore color Issue |
Fore colors are coming properly |
2 |
Fore Colors are not rendering |
2 |
After so many days of RnD we conclude that latest version is worst than the earlier one(6.1.0.0 )
As mentioned by you in earlier reply that its not possible to provide hotfix for (V6).
Could you please provide us the workaround/Solution in your latest version(V7) asap so that we can make change in code at our end?
Please provide us the workaround/solutions asap, as we have to take decision for upgrading the Aspose Total.
Regards
Vineet
Hi Vineet,
Thanks for using our products and sharing the details with us, as we just have been able to discover these issues, so we require some time to investigate this issue in detail. However, as soon as we have made some significant progress towards the resolution of these problems, we would be more than happy to update you with the status of correction. Please be patient and spare us little time.
We are really sorry for this inconvenience.
Thanks & Regards,
Hi Rashid,
Thanks for reply. Could you please provide the list of css styles attributes supported by aspose.pdf.dll version 7?
Thanks & Regards
Vineet
Hi Vineet,
Thanks for your inquiry.
I am very sorry to share with you that, at the moment complete list of supported HTML Tags / CSS styles attributes is not available in the documentation. We are working on this and hopefully it will be available in near future.
We apologize for your inconvenience.
Thanks & Regards,
Hello,
we are using aspose.pdf dll for converting inline html to pdf .
we found that vertical alignment attribute is not working.
the resultant pdf is not rending the valign=‘middle’’.
could you please provide us the workaround for the mentioned issue.
here is the sample html:
| Month | Savings |
|---|---|
| January | $100 |
| February | $80 |
Thanks & Regards
Vineet
Hi Vineet,
have tested the scenario and I am able to reproduce the same problem that vertical alignment attribute is not being honored during HTML to PDF conversion. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-34646. We
will investigate this issue in details and will keep you updated on the status
of a correction.
apologize for your inconvenience.
The issues you have found earlier (filed as PDFNEWNET-34646) have been fixed in Aspose.Pdf for .NET 7.8.0update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
The issues you have found earlier (filed as PDFNEWNET-33860) have been fixed in Aspose.Pdf for .NET 8.7.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.