 |
|
|
 |
|
 |
Essential Objects recently released a good HTML to PDF converter. It can render any HTML file a browser can render, but all features are packed inside two DLL files. So it is very easy to redistribute. It does not rely on external browser on the user's computer either.
Check out the online demo here:
http://www.essentialobjects.com/Products/EOPdf/Default.aspx[^]
|
|
|
|
 |
|
 |
When am trying to add the ssleay32.dll file to my application .. it says an error like please check the dll file is accessible or COM component ..
I couldn't add the dll files in my application....
can anyone help me to solve this issue.
|
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
For .NET I recommend you a professional HTML to PDF library or a free online HTML to PDF service.
EVO HTML to PDF is a another library which is even more CSS3 compliant.
modified on Monday, January 24, 2011 2:57 AM
|
|
|
|
 |
|
|
 |
|
 |
Hi Al, thanks for posting the HTML-PDF article on Code Project, I got a problem when using it, it says: The application or DLL C:\Windows\system32\LIBEAY32.dll is not a valid windows image. Please check this against your installation diskette.
I do have the latest dll file, I am not sure if it is the right one because the file can't be registered (DllRegister start point cannot be found)
Can you please help me out here?
Thank you very much.
|
|
|
|
 |
|
 |
I corrected plenty of things in code, and it goes till Response.Redirect("DisplayPDF.aspx?File=" + sFile); successfully in Default.aspx page. However, it doesn't display DisplayPDF.aspx page. I am getting the following error..
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0115: 'ASP.displaypdf_aspx.GetTypeHashCode()': no suitable method found to override
Source Error:
Line 427:
Line 428: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 429: public override int GetTypeHashCode() {
Line 430: return -183858480;
Line 431: }
I am not able to fix it
Any help or pointers would be highly appreciable.
Thanks
Ritesh
|
|
|
|
 |
|
 |
The actual site appears to be http://www.htmldoc.org/[^], not the ESP company website.
It also looks like you have to manually compile your own binaries. If you want them pre-compiled, you'll have to buy a license from ESP, or Google for the old versions.
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|
 |
|
 |
And the stupid code doesn't even compile! What a load of junk. If it takes too long I'll just finish my xsl-fo template and get things going that route (nFOP is the rendering engine I;m playing with).
|
|
|
|
 |
|
 |
Would be nice if some good samaritan would compile the code (for say Windows) for the open source / free version for the rest of us, or offer to post link to or provide (via email, etc.) the old versions which were precompiled but no longer available on the web.
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|
 |
|
 |
Right now I'm under EXTREME time crunch. I'm going for the fastest route. If compiling this is teh fastest route I'll do that and post the link. If finishing my XSL-FO templates (already started) I'll compile this for everyone at some point down the line (in a month or two).
Hey, if I could get FFMPEG to compile on Windows I should be able to get this going right?
|
|
|
|
 |
|
 |
On a side note: I smell two blog posts/ articles here. One on how to compile and get things going with HTMLDOC and the other, probably better one, is how to create reports/invoices/quotes/documents (or at least teh templates) in XSL-FO and generate both HTML and PDF output from single xml data sources. Probably add a touch of Linq2Xml and some data access tidbits in there.
|
|
|
|
 |
|
 |
Hi Team,
Good Morning.
Find below are the clarifications and questions regarding PDF document creation
Does your PDF creator or converter component authenticate against RSA ClearTrust Authentication and get the snapshots of webpages viewed?
In our current application we are downloading a copy of the PDF after viewing some webpages.
The new PDF shall consist of the contents of the web pages viewed.
We have ClearTrust authentication software installed in our Model Office and Production servers.
Below is the procedure that we follow for downloading the PDF.
There are 8 .aspx pages that the End User should view.
Each webpage is authenticated against the ClearTrust server and then redirected to the actual Web URL.
At the end of the 8th webpage,there is a link button control provided to download the PDF.
Below is some sample piece of code which we use
strURLPage1 = ConfigurationManager.AppSettings["PDFURLPage1"];
strURLPage2 = ConfigurationManager.AppSettings["PDFURLPage2"];
Document document = new Document();
PdfPage page = document.Pages.AddNewPage(PageSize.Letter, new Margins(10, 10, 0, 0),PageOrientation.Portrait);
AddElementResult addResult;
string urlToConvert = strURLPage1 + strGlobalID + "&GroupID=" + intGroupID;
htmlToPdfElement = new HtmlToPdfElement(urlToConvert);
addResult = page.AddElement(htmlToPdfElement);
document.Save(Response, false, "MyPDFSample.pdf");
We already have purchased a software which uses the similar kind of code,but it fails in our Testing and Production Server's when we click on the Download PDF link button.
Find below the error
Could not get the metafile from url. Could not get image from url.The URL is not accessible..
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Winnovative.PdfCreator.HtmlConvertException: Could not get the metafile from url. Could not get image from url.The URL is not accessible..
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HtmlConvertException: Could not get the metafile from url. Could not get image from url.The URL is not accessible..]
r.a(String A_0, lo& A_1) +176
Winnovative.PdfCreator.HtmlToPdfElement.Render(ElementsRenderer renderer) +623
Winnovative.PdfCreator.PdfPage.AddElement(PageElement pageElement) +6
LegalHold.Memos.InvestigationMemoComplete.lnkDownload_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\LegalHold\LegalHold\Memos\InvestigationMemos\InvestigationMemoComplete.aspx.cs:78
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +90
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +76
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +177
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
NOTE : Please forward it to appropriate team,if I had mailed to the wrong team.
Thanks,
D.Vinoth
|
|
|
|
 |
|
 |
I would love to figure out how to get around this issue. I have been receiving this error message for months
[HtmlConvertException: Could not get the metafile from url. Could not get image from url.The URL is not accessible..]
and I have been unable to figure out how to stop it from appearing. I don't get it when I do the conversion from my dev machine. Only from the production webserver. I checked my permissions to the project folder and all necessary users have read, write and exec privileges. This error seems to show up periodically as I haven't seen it for a few months but now, it occurs everytime the web tries to convert to pdf.
Does anyone have any idea how to work around this issue or how to prevent it??
|
|
|
|
 |
|
 |
Well I hope this ends up helping someone.
I was running into this error and getting NO help from anywhere on what the heck was going on. 2 months of frustration and I finally figured it out. We had a line of code in the app that was parsing the AbsoluteUri to get the full URL that it should return the PDF to. For some reason, our Firewall choked on that. Once I replaced the AbsoluteUri with the INTERNAL IP ADDRESS that the website was running off of, it worked outside the firewall just fine. Here's what the code looks like:
----------------------------------------------------------------------------------------------------------
--> THIS WAS BREAKING IT: //string urlPrefix = Request.Url.AbsoluteUri;
--> REPLACED WITH THIS: string urlPrefix = "http://192.168.xxx.xx/UI";
--> COMMENTED THIS OUT: //urlPrefix = urlPrefix.Substring(0,urlPrefix.LastIndexOf('/'));
urlToPrintFrom = String.Format("{0}/{1}/PrintReport.aspx?sid={2}",urlPrefix, folder, orginalSessionId);
string downloadName = "ExportedReport.pdf";
PdfConverter pdfConverter = new PdfConverter();
pdfConverter.LicenseKey = "MY KEY HERE";
pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal;
pdfConverter.PdfDocumentOptions.ShowHeader = true;
pdfConverter.PdfDocumentOptions.ShowFooter = true;
pdfConverter.PdfDocumentOptions.LeftMargin = 5;
pdfConverter.PdfDocumentOptions.RightMargin = 5;
pdfConverter.PdfDocumentOptions.TopMargin = 5;
pdfConverter.PdfDocumentOptions.BottomMargin = 5;
pdfConverter.PdfDocumentOptions.GenerateSelectablePdf = true;
//pdfConverter.AvoidImageBreak = true;
pdfConverter.PdfDocumentOptions.ShowHeader = false;
//pdfConverter.PdfHeaderOptions.HeaderText = "Sample header: " + TxtURL.Text;
//pdfConverter.PdfHeaderOptions.HeaderTextColor = Color.Blue;
//pdfConverter.PdfHeaderOptions.HeaderSubtitleText = string.Empty;
//pdfConverter.PdfHeaderOptions.DrawHeaderLine = false;
pdfConverter.PdfFooterOptions.FooterText = "Footer";
//pdfConverter.PdfFooterOptions.FooterTextColor = Color.Blue;
pdfConverter.PdfFooterOptions.DrawFooterLine = false;
pdfConverter.PdfFooterOptions.PageNumberText = "Page";
pdfConverter.PdfFooterOptions.ShowPageNumber = true;
byte[] downloadBytes = pdfConverter.GetPdfFromUrlBytes(urlToPrintFrom);
HttpResponse response = HttpContext.Current.Response;
response.Clear();
response.AddHeader("Content-Type", "binary/octet-stream");
response.AddHeader("Content-Disposition",
"attachment; filename=" + downloadName + "; size=" + downloadBytes.Length.ToString());
response.Flush();
response.BinaryWrite(downloadBytes);
response.Flush();
response.End();
|
|
|
|
 |
|
 |
hello,
i have purchased also the pdf converter and when i try to run the application from my server i get this error.
i tried to use the internal ip but it didn't solve the problem.
could someone please help????
|
|
|
|
 |
|
 |
I'm having the same problem. Did you find a solution? It's just some servers it doesn't work on. Using IP didn't not work for me either.
|
|
|
|
 |
|
 |
I just fixed this problem on my production server (was not a problem on the development server) the issue was fixed with putting the internal ip address for the server in the hosts file on the server.
The problem was that the production server was getting the external ip from the DNS and couldn't access itself with the external ip.
|
|
|
|
 |
|
 |
I can only get this to work in debug mode on the dev. machine. Can anyone help me figure out what account needs permissions on which folders?
|
|
|
|
 |
|
 |
Figured it out - on IIS the group IIS_WPG needs write permissions on the directory.
|
|
|
|
 |
|
 |
Good day,
Plesae could you send me the source code for "HtmlToPDF.dll" or please could you update all of your Server.MapPath to reflect "~/" instead of "" or "/".
Many thanks.
|
|
|
|
 |
|
 |
Hi All
I am currently using your source code and its working fine but it is not accepting CSS.
I have read the article about HTMLDOC which says that HTMLDOC 1.8 does not support CSS but HTMLDOC 1.0 supports. i downloaded HTMLDOC 1.9 and trying to find ghtmldoc 1.9 OR htmldoc 1.9 but not able to find it out..
Can anyone tell me where did i find this .exe file
Thanx in advance
|
|
|
|
 |