Do you want to add functionality to convert HTML to PDF to your dynamic ASP.Net Application?

12/21/2009

DuoDimension software provides PDF component duo. Net 2.2 that helps you to convert HTML to PDF, your dynamic ASP.Net application.

The new version of PDF-Duo. NET component presented by DuoDimension software developer is a professional server-based component based on ASP.NET allows you to convert HTML to PDF. The component is really appropriate for Web applications

The component can be used in any ASP.NET languages (VB.Net, C# etc.) PDF Duo .Net has C# classes with easy-to-operate methods to convert HTML to PDF as a file or as a stream. So developer after conversion of HTML to PDF can write resulting PDF to the window of Internet Browser directly.

PDF Duo .Net component Key Features:

1. Conversion directions: HTML to PDF, XHTML to PDF, TXT to PDF.
2. HTML file can include formatting styles CSS those will be correct converted to PDF.
3. Makes the best use of invalid or bad formed HTML file.
4. Strict copying of HTML file formatting to PDF file in your own ASP.NET project.
5. Allows to convert either from HTML file or from HTML string stream.
6. Takes a Web Site URL instead of HTML file in order to convert to PDF.
7. Not require the installation, Microsoft Office (R) and is, Adobe Acrobat (R) for support. NET 2.0,. NET 3.0 to. NET 3.5 in

Quality of Converting HTML to PDF

PDF format duo. NET components clever conversion tables, style, graphics, images, hyperlinks, fonts, HTML to PDF, etc.

PDF format duo. NET component to help convert HTML report, HTML file, your application's HTML formatted text to PDF solid copy. This is a very fast to use components written in any ASP.NET Web or Windows applications, can be converted into one or a group of PDF format, HTML / XHTML to PDF files.

The component of HTML to PDF converting is very easy to use and is provided with 2 fully featured demos written in both C# and Visual Basic. They will help you to create your own ASP.NET web applications.
How to convert HTML to PDF in ASP.NET?
Installing package contains source code of demo program. Simple examples with source code help you using the PDF Duo .Net component to successfully convert HTML to PDF. There are examples with C# and VB source code.

It is really work! Just try it!

For more information about the component please visit the product page:
http://www.duodimension.com/html_pdf_asp.net/component_html_pdf.aspx

If you have any questions or concerns about component, let us know:
support@duodimension.com


Posted in: asp.net| Tags: Software NET Application Component asp html functionality pdf duo duodimension

Tip: jQuery AJAX calls to a WCF REST Service

06/11/2009

WCF 3.5 includes REST functionality and one of the features of the new WCF webHttp binding is to return results in a variety of ways that are URL accessible. WCF has always supported plain URL HTTP access, but it's not been real formal and had somewhat limited functionality as parameters had to be encodable as query string parameters. With the webHttp binding there's now an official WCF protocol geared towards providing ASP.NET AJAX JSON compatibility (using WebScript behavior) as well of a slightly cleaner raw JSON implementation (basic webHttp binding).

You can return XML (default), JSON or raw data from WCF REST services. Regardless of content type, natively WCF always wants to return content in a 'wrapped' format which means that both inbound parameters and outbound results are wrapped into an object.

Let's take a look at the message format for a  REST JSON service method.

[ServiceContract(Name="StockService",Namespace="JsonStockService")]    
public interface IJsonStockService
{
    [OperationContract]          
    [WebInvoke(Method="POST",
               BodyStyle=WebMessageBodyStyle.Wrapped,
               ResponseFormat=WebMessageFormat.Json
    )]
    StockQuote GetStockQuote(string symbol);

..

The input message on the wire looks like this:

{"symbol":"MSFT"}

The response looks like this:

{"GetStockQuoteResult":
        {"Company":"MICROSOFT CP",
        "LastPrice":30.00,
        "LastQuoteTime":
        "\/Date(1208559600000-0700)\/",
        "LastQuoteTimeString":"Apr 18, 4:00PM",
        "NetChange":0.78,
        "OpenPrice":29.99,
        "Symbol":"MSFT"}
}

Notice that in both cases an object is used. For the inbound data all parameters are wrapped into an object and rather than just passing the value, the name of the parameter becomes a property in the JSON object map that gets sent to the server. This is actually quite useful - if you're just sending a raw JSON structure you could only pass a single parameter to the server - and that option is also available via the Web BodyStyle=WebMessageBodyStyle.Bare option on the service method.

The outbound result set is also wrapped into an object which is a lot less useful. This is a hold over from WCF which wraps all responses into a message result object, which usually makes sense in order to support multiple result values (ie. out parameters etc.). In a Web scenario however this doesn't really buy you much. Nevertheless if you want to pass multiple parameters to the server you have to use this wrapped format along with the result value.

Calling with jQuery

If you're using jQuery and you'd like to call a WCF REST service it's actually quite easy either with bare or wrapped messages. Bare messages are easier to work with since they skip the wrapping shown above, but as I mentioned you're limited to a single input parameter. So if your service has any complexity you'll likely want to use wrapped messages.

You can opt to either call services using the ASP.NET Ajax logic (WebScriptService behavior) or using the raw service functionality which is shown above.

To call these methods with jQuery is fairly straight forward in concept - jQuery includes both low level and highlevel methods that can call a URL and return JSON data. The two methods available are $.getJSON() which automatically parses result JSON data and $.ajax(), which is a lower level function that has many options for making remote calls and returning data.

getJSON() is useful for simple scenarios where the server returns JSON, but it doesn't allow you to pass JSON data TO the server. The only way to send data to the server with getJSON is via query string or POST data that is sent as standard POST key/value pairs. In all but the simplest scenarios getJSON() is not all that useful.

The lower level $.ajax method is more flexible, but even so it still lacks the capability to pass JSON data TO the server. So little extra work and some external JSON support is required to create JSON output on the client as well as dealing with Microsoft Ajax's date formatting.

Posted in: C# and .NET| Tags: Format Tip WCF ajax jQuery REST url webhttp json functionality content

Hot Posts

Latest posts

Tags

Others

Sponsors

asp.net interview questions