ImageGear for .NET
Using ImageGear.Formats.PDF Namespace

The Postscript (PS) language is a simple, interpretive programming language with powerful graphics capabilities. Its primary application is to describe the appearance of text, graphical shapes and sampled images on printed or displayed pages, according to the Adobe imaging model. A program in this language can communicate a description of a document from a composition system to a printing system or control the appearance of text and graphics on a display. The description is high-level and device-independent.

The Adobe Portable Document Format (PDF) is the native file format of the Adobe Acrobat family of products. PDF relies on the same imaging model as the PostScript page description language to describe text and graphics in a device-independent and resolution-independent manner. A document can be converted straightforwardly between PDF and the PostScript language; the two representations produce the same output when printed. To improve performance for interactive viewing, PDF defines a more structured format than that used by most PostScript language programs. PDF also includes objects, such as annotations and hypertext links that are not part of the page itself but are useful for interactive viewing and document interchange. However, PDF lacks the general-purpose programming language framework of the PostScript language.

The ImageGear.Formats.PDF namespace allows you to load, save and process native PDF and PostScript documents. It also allows rasterization of PDF and PostScript documents, by converting them to bitmap, and provides you with the possibility of text extraction from loaded PDF and PostScript documents.

PDF support is compatible with Adobe PDF v1.7 as defined in the Portable Document Format Reference Manual Version 1.7, distributed by Adobe Systems, Incorporated. It provides reading capability up to the PDF v1.7 and writing of PDF v1.7 documents.

PostScript support is compatible with Adobe PostScript (TM) 3.0 language as defined in the PostScript Format Reference Manual, distributed by Adobe Systems, Incorporated. It provides reading capability up to the PostScript 3.0 Language, Level 3, and writing of the PostScript 3.0 files with Language Levels 1, 2 and 3. This includes writing of Encapsulated PostScript (EPS) files with standard and extended preview as well as without preview at all.

The ImageGear.Formats.PDF namespace provides full multi-page reading and writing support for the entire document as well as specified set of pages. You can detect, read, write, append, insert, replace, swap and delete a specified page in the PDF document as well as to edit its content.

To enable the ImageGear.Formats.PDF Namespace in your project, specify the following directive:

C#
Copy Code
using ImageGear.Formats.PDF;
  1. To ensure that you have all the required library files, please run the Deployment Packaging Wizard located at …\Accusoft\ImageGear.NET v21\Licensing\Deployment \DPW.exe or navigate to Start menu >All Programs > Accusoft > ImageGear for .NET v21 > Deployment Kit > Deployment Packaging Wizard. For more information, see Deployment Packaging Wizard, if needed.
  2. Please ensure that your Visual Studio build environment is set properly. This can be checked or changed by the following:
    1. From the project properties:
      • On the Build tab, check/change the Platform target property to the appropriate x86/x64. At the top, also make sure the Platform property is set to the same.
      • On the Build tab, in the Output section, make sure Output path property is pointing to the same location as your dlls, i.e., bin\RunTime\NET\
      • On the Debug tab, check/change the Platform property to the correct platform.
    2. Select Build from the pull down menus, and click Configuration Manager…
      • Check/change the Active solution platform property to the correct x86/x64 platform.
      • Click Close.
  3. You will also need to have the Microsoft Visual C++ CRT 10.0 (x86) installed. Corresponding links to VS2010/VS2010SP1 C++ Redistributable Packages are:

    http://www.microsoft.com/en-us/download/details.aspx?id=5555
    http://www.microsoft.com/en-us/download/details.aspx?id=14632
    http://www.microsoft.com/en-us/download/details.aspx?id=8328
    http://www.microsoft.com/en-us/download/details.aspx?id=13523

    For more information, see Distributing PDF and PS Fonts and Libraries with an Application.

  4. You can also pass in the direct location of the PDF resource files as a parameter of the CreatePDFFormat method. For a modified code example, please see the following:
     
    Copy Code
    ImGearFileFormats.Filters.Add(ImGearPDF.CreatePDFFormat(@"C:\Program Files (x86)\Accusoft\ImageGear.NET v21\Bin"));
    
    ImGearPDF.Initialize(@"C:\Program Files (x86)\Accusoft\ImageGear.NET v21\Bin");
  5. For a WEB application, you can pass the location of PDF binaries and resources directly in the web.config file of the application:
     
    Copy Code
    <appSettings>
      ......
      <add key="igPdfResources" value="C:\Program Files (x86)\Accusoft\ImageGear.NET v21\Bin" />
      <add key="igBinaries" value="C:\Program Files (x86)\Accusoft\ImageGear.NET v21\Bin" />
    </appSettings>

    For more information about working with the web.config file, see Using the ASP.NET Web.Config Editor Application for Configuring Your Web Application.

 

This section provides information about the following:

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback