WebRenderer.h


The WebRenderer class implements conversion of HTML to PDF. Using an instance of class WebRenderer one can create a PDF document using the createDocument or the createDocumentWithPaperName:orientation: method.

After creating a document, HTML pages can be converted to PDF and appended to the document by invoking the appendPageWithURL: or the appendPageWithHTMLString:baseURL: method. The closeDocument method returns the name of the file containing the PDF document and releases all related resources.

Typical usage:

#import <Foundation/Foundation.h>
#import <WebPDFReports/WebRenderer.h>
#import <AppKit/NSPrintInfo.h>


...

WebRenderer *webRenderer; NSURL *urlToPDFDocument;

webRenderer = [[WebRenderer alloc] init]; [webRenderer createDocumentWithPaperName: @"A4" orientation: NSPortraitOrientation]; [webRenderer appendPageWithURL: [NSURL URLWithString: @"http://www.apple.com/"]]; urlToPDFDocument = [NSURL fileURLWithPath: [webRenderer closeDocument]]; [webRenderer release]; [[NSWorkspace sharedWorkspace] openURL: urlToPDFDocument];




(Last Updated 3/3/2005)
HTML documentation generated by HeaderDoc