IronPdf Documentation
Release4.0.0
http://IronPdf.com
February02,2016
Convert pdf to grayscale tiff - SDK application API:C# PDF Convert to Tiff SDK: Convert PDF to tiff images in C#.net, ASP.NET MVC, Ajax, WinForms, WPF
Online C# Tutorial for How to Convert PDF File to Tiff Image File
www.rasteredge.com
Convert pdf to grayscale tiff - SDK application API:VB.NET PDF Convert to Tiff SDK: Convert PDF to tiff images in vb.net, ASP.NET MVC, Ajax, WinForms, WPF
Free VB.NET Guide to Render and Convert PDF Document to TIFF
www.rasteredge.com
SDK application API:How to C#: Special Effects
Firstly, call SepareteImageChannel(ChannelType.Red) to get a grayscale image which extract form the left.png image's red channel.
www.rasteredge.com
SDK application API:How to C#: Color and Lightness Effects
VB.NET How-to, VB.NET PDF, VB.NET Word, VB.NET It may be useful to convert an image to 1bpp for it will permanently modify the image to 1bpp grayscale image of
www.rasteredge.com
Contents
1 HelloWorld
3
1.1
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
i
SDK application API:How to C#: File Format Support
PDF. Write pdf. DPX. Writes 1 through 16-bit grayscale and 24-bit color. SVG. Convert all support image format to svg format. Read SVG image format as bitmap.
www.rasteredge.com
SDK application API:C# Image: How to Encode & Decode JPEG 2000 Images Using C#.NET JP2
file from local files to 8-bit grayscale, 16-bit grayscale, 48-bit We are dedicated to provide powerful & profession imaging controls, PDF document, image to
www.rasteredge.com
ii
SDK application API:DocImage SDK for .NET: Document Imaging Features
images, like SVG and XPS Convert specified page Type 6 (OJPEG) encoding Image only PDF encoding support. CMYK, RGB, ICCBased, Indexed Color, GrayScale, Lab, etc
www.rasteredge.com
SDK application API:VB.NET PDF File Compress Library: Compress reduce PDF size in vb.
Convert smooth lines to curves. Program.RootPath + "\\" 3_optimized.pdf"; 'create optimizing PDFCompression.JBIG2Decode '--Options for Grayscale Image-- 'to
www.rasteredge.com
IronPdfDocumentation,Release4.0.0
IronPDFisacommercialGradePDFGenerationlibraryforthe.Netplatform,writteninC#.
Readmoreathttp://ironpdf.com
Thekeyconceptistoavoidtime-consumingPDFgenerationAPIsbyrenderingPDFsfromHTML,CSS,Images
andJavaScript.
IronPDF’scorefeaturesare:
• GeneratingPDFdocumentsfromHTMLasastring
• GeneratingPDFdocumentsfromUrls
• RenderingASPXwebformsasPDFdocumentson-the-fly
Thebaserequirementsare.Netframework4.0onthewindowsplatform.
ItworksequallywellinFormsApplications,ServerApplicationsandServices,WebApplications,SecureIn-
tranets,ConsoleApps,WPFAppsandMVCpatternedwebsites.
Contents
1
SDK application API:.NET PDF SDK | Read & Processing PDF files
to convert PDF files to raster images (color or grayscale) in .NET Imaging SDK; Able to convert PDF documents into other formats (multipage TIFF, JPEG, etc
www.rasteredge.com
SDK application API:C# TIFF: How to Print TIFF Document File | C# Developer Guide
C# method; Enable users to print grayscale TIFF page in C:/ HP Color LaserJet 5550 PCL 6"); }; TIFF. powerful & profession imaging controls, PDF document, image
www.rasteredge.com
IronPdfDocumentation,Release4.0.0
2
Contents
SDK application API:.NET JPEG 2000 SDK | Encode & Decode JPEG 2000 Images
bit grayscale images within Microsoft .NET Framework. Offer Lossy and lossless data compression; Ability to compress 24-bit RGB color and 8-bit grayscale images;
www.rasteredge.com
SDK application API:C# PDF File Compress Library: Compress reduce PDF size in C#.net
Convert smooth lines to curves. Program.RootPath + "\\" 3_optimized.pdf"; // create optimizing JBIG2Decode; // -- Options for Grayscale Image -- // to enable
www.rasteredge.com
CHAPTER
1
HelloWorld
NuGetInstaller
PM> Install-Package e IronPdf
1LineHelloWorld
new IronPdf.HtmlToPdf().RenderHtmlAsPdf(@“<p>hello world</p>“).SaveAs(“test.pdf”);
1.1 Contents
1.1.1 WhatisIronPdf?
IronPDFisacommercialGradePDFGenerationlibraryforthe.Netplatform,writteninC#.
Thekeyconceptistoavoidtime-consumingPDFgenerationAPIsbyrenderingPDFsfromHTML,CSS,Images
andJavaScript.
IronPDF’scorefeaturesare:
• GeneratingPDFdocumentsfromHTMLasastring
• GeneratingPDFdocumentsfromUrls
• RenderingASPXwebformsasPDFdocumentson-the-fly
Thebaserequirementsare.Netframework4.0onthewindowsplatform.
ItworksequallywellinFormsApplications,ServerApplicationsandServices,WebApplications,SecureIn-
tranets,ConsoleApps,WPFAppsandMVCpatternedwebsites.
Readmoreathttp://ironpdf.com
HelloWorld
NuGetInstaller
PM> Install-Package e IronPdf
1LineHelloWorld
new IronPdf.HtmlToPdf().RenderHtmlAsPdf(@“<p>hello world</p>“).SaveAs(“test.pdf”);
3
IronPdfDocumentation,Release4.0.0
Features
IronPDFdoesn’ttrytorenderHTML.Itactuallyprintupaninstanceofarealstandardcompliantwebbrowser
behindthescenes(withoutanyadditionalsoftwareneedingtobeinstalled).
TheHTMLgetsrenderedwithcompleteaccuracy-andinavectorformatsuitableforthehigheststandardsof
commercialprinting.
• NomoreconvolutedPDFAPIs.
• JustmakeitlookrightinHTML-andthenuseIronPDFoutputyourPDFasafile,streamorbytearray.
• FullIntelliSensedocumentationwhichevenincludesembeddedcodeexamples.
• NoExternalDependancies.Just1Dll.
• Deployalmostanywhereonawindowsenvironmentwithoutspecialpermissions. NoEXEfiles, , Msior
NativeDllstoinstall.NoCOMobjectsorInterophell.
• Nospecialsecuritypermissionsrequired.
• CSS3,HTML5andJavascriptcompliance.
• Real,standardscompliantHTMLrenderingandpixelperfectPDFconversionwithvectorandfontsupport.
• JavascriptandAJAXcontentcanalsoberenderedintoyourPDFs.
• HighPerformance-PDFfromHTMLrenderingtakesabout125ms.RemoteHTTPrequestswillobviously
takelonger. Firstusagetakeextraoverheadasthebrowservirtualinstanceisinitiated. Thereafteritis
availablealmostinstantlythroughoutyourapplicationprocess.
• Lowmemoryfootprintaboutunder10MBmemory.OursmartGarbageCollectionThisallowsforinstance
likeperformancefromstaticmethods.DynamicallymakessmartchoicestominimizeimpactonCPUand
FreeRam.
• PDFrenderingcanbeachievedinparallelusingthreadsorParallel.ForEach.Thismakesbatchconversions
evenfaster.
• HTMLformsfieldscanautomagicallybecomeeditableareasinyourPDFs
• WorkingcodeExamplesonGitHub
• CustomizableWebClientfunctionallyallowsPrintingofHTMLDocumentsevenbehindloginsoronsecure
intranets.
• Wecanttogetbettereveryday. . Ifthisdocumentationorsoftwarelacksinanyway,pleasepostaGitHub
issueandwewillrespond.
1.1.2 QuickStart
GetIronPdfInstalled
UsingNugetPackagemanagerinVisualStudio
PM> Install-Package e IronPdf
OrDownloadIronPdfasDLL
• Gethttp://localhost/iron/packages/IronPdf.zip
• AddIronPdf.dlltoyourprojectasareferenceortotheGAC.
• Lazyoption-justcopythedllintoyour/Binfolderin.netwebapplications.
4
Chapter1. HelloWorld
IronPdfDocumentation,Release4.0.0
BasicUsage
HTMLStringtoPdf
using IronPdf;
HtmlToPdf HtmlToPdf f = new IronPdf.HtmlToPdf();
HtmlToPdf.RenderHtmlAsPdf("<p>html</p>"").SaveAs(@"Path\File.Pdf");
UrltoPdf
using IronPdf;
HtmlToPdf HtmlToPdf f = new IronPdf.HtmlToPdf();
HtmlToPdf.RenderUrlAsPdf(@“http://myurl.com").SaveAs(@"Path\File.Pdf");
Advancedusage-youcanalsopassaSystem.Net.WebClienttoRenderUrlAsPdf.
//...
HtmlToPdf.RenderUrlAsPdf("http://ironpdf.com", myWebClient ).SaveAs("File.Pdf");
Thisallowsyoutosetlogincredentials,proxysettings,specialheaders,cookies-tologintoprotected/secure
webpages.
PdfSettings
using IronPdf;
HtmlToPdf HtmlToPdf f = new IronPdf.HtmlToPdf();
HtmlToPdf.PrintOptions.Dpi = 300;
HtmlToPdf.PrintOptions.PDFPaperSize = System.Drawing.PaperKind.A4;
HtmlToPdf.PrintOptions.EnableJavaScript = true;
HtmlToPdf.PrintOptions.AllowScreenCss = false;
HtmlToPdf.PrintOptions.SetHeaderText = "{page} of f {total-pages}";
HtmlToPdf.PrintOptions.GrayScale = true;
YoucanalsocreateareusableinstanceofIronPDF.PdfPrintOptionsanduseitintheIronPdf.HtmlToPdfconstruc-
tor.
AspxToPdf
ChangesanyASPXwebpagetoautomaticallyrenderasaPdfdocumentinsteadofhtml.
using IronPdf;
private void Form1_Load(object sender, EventArgs s e)
{
//..
AspxToPdf.RenderThisPageAsPDF();
}
AspxToPdfwithAdvancedSettings
IronPdf.AspxToPdf.RenderThisPageAsPDF(AspxToPdf.FileBehaviour.Attachment, "MyPdfDownload.pdf"new PdfPrintOptions(){ Dpi = 300});
1.1. Contents
5
IronPdfDocumentation,Release4.0.0
PdfOutputs
HtmlToPdf.RenderUrlAsPdfandHtmlToPdf.RenderHtmlAsPdfreturnaninstanceoftheIronPdf.PdfResource
class.
Intheaboveexamples,wedirectlysaveeachPDFasafile.
ItisalsopossibletogetthePdfdocumentasaSystem.IO.MemoryStreamorabytearray(byte[])theStreamand
BinaryDatapropertiesofPdfResourcerespectively.
using IronPdf;
HtmlToPdf HtmlToPdf f = new IronPdf.HtmlToPdf();
//..
System.IO.MemoryStream stream = HtmlToPdf.RenderHtmlAsPdf("<p>html</p>).Stream;
//or
byte[] data = HtmlToPdf.RenderHtmlAsPdf("<p>html</p>"").BinaryData;
1.1.3 InstallingIronPdf
ForMicrosoftVisualStudioUsers-theeasiestwaytoinstallIronPdfisusingtheNuGetPackageManager.
PM> Install-Package e IronPdf
UsingNuGet
• RightclickonyourprojectinVisualStudio‘SolutionExplorer’
• Select“ManageNugetPackages...”
• IntheSearchBoxType“IronPDF”
• SelectThe“IronPdf”packagetoyourlowerleft.
• Clickthe“Install”buttonyourright.
Formoreinfoyoucanalsofindusat:https://www.nuget.org/packages/IronPdf/
ManualInstallation
• DownloadIronPdfasDLLfromhttp://ironpdf.com/packages/IronPdf.zip
• ExtracttheDLLtoalogicallocationinsideyourproject(orGACforadvancedusers)
• InVisualStudio‘SolutionExplorer’”:
– RightclickonyourprojectandchooseAdd>Reference....
– Select‘Browse...’andthenfindIronPDF.dllanddoubleclickonit.
1.1.4 ObjectReference
IronPdf.HtmlToPdf
HtmlToPdfisyourgo-toclassforcreatingPDFsin.Net
ItcanworkfromHTMlstringorfetchURL(withalloftheirsupportingassets).
AcustomSystem.Net.WebCientcanoptionallybeassigntomanagerequeststorenderwebpageswithspecial
securityprovisions.
6
Chapter1. HelloWorld
Documents you may be interested
Documents you may be interested