Atalasoft
Welcome to Atalasoft Community Sign in | Join | Help
in

Is there any PDFRasterizer sample code

Last post 19 Mar 2007, 11:35 PM by Bill Bither. 1 replies.
Sort Posts: Previous Next
  •  19 Mar 2007, 6:49 PM 11708

    Is there any PDFRasterizer sample code

    I got the following reply (underline) from your sales rep.

    In order to get an Image only PDF into DotImage you need the PDFRasterizer. Then the Image can be put into OCR to create Searchable PDF.

    I couldn't find any PDFRasterizer demo or sample code. Can you give me the directions?

    My goal is to convert from an image only PDF file into a searchable PDF file by using OCR.

    http://www.codeproject.com/showcase/SearchablePDFs.asp does not use PDFRasterizer.

    Thanks

    Filed under: , ,
  •  19 Mar 2007, 11:35 PM 11709 in reply to 11708

    Re: Is there any PDFRasterizer sample code

    The PdfViewer demo available in both C# and VB.NET shows you how to use it. 

    This is code from the object reference in the documentation.  Once you add the decoder to the registered decoders you can open a PDF as you would any other image.

    using Atalasoft.Imaging;
    using Atalasoft.Imaging.Codec;
    using Atalasoft.Imaging.Codec.Pdf;
    ...
    PdfDecoder pdf = new PdfDecoder();
    pdf.Resolution = 150;
    RegisteredDecoders.Decoders.Add(pdf);
    Workspace myWorkspace = new Workspace();
    myWorkspace.Open("document.pdf");

    Imports Atalasoft.Imaging
    Imports Atalasoft.Imaging.Codec
    Imports Atalasoft.Imaging.Codec.Pdf
    ...
    Dim pdf As PdfDecoder = New PdfDecoder()
    pdf.Resolution = 150
    RegisteredDecoders.Decoders.Add(pdf)
    Dim myWorkspace As Workspace = New Workspace()
    myWorkspace.Open("document.pdf");


    Bill Bither
    Atalasoft
    Filed under:
View as RSS news feed in XML