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

pdfdecoder resolution

Last post 22 Sep 2008, 11:03 AM by RickM. 1 replies.
Sort Posts: Previous Next
  •  22 Apr 2008, 2:59 PM 13740

    pdfdecoder resolution

    Just some questions.

    PdfDecoder pdf = new PdfDecoder();
    pdf.Resolution = 150;
    RegisteredDecoders.Decoders.Add(pdf);

    I was unable to read 128 barcodes from a pdf until I set the pdf.Resolution to 150. My questions: what is the resolution property? what effect does the resolution property have on reading images of different resolutions?

     Thanks

  •  22 Sep 2008, 11:03 AM 15764 in reply to 13740

    Re: pdfdecoder resolution



    PDF files are documents which are defined internally in a resolution independent manner. Only when they are rasterized to an output device or image is it necessary to specify the resolution. This resolution specifies the size that resulting image will be relative to the internal page size of the PDF.

    However, in almost all cases, the actual images inside of a PDF still have an absolute resolution. When this resolution is constrained by the PdfRasterizer output resolution the resulting image will be downsampled which will cause it to be poor in quality.

    I suggest using the ExtractImages method of the Page class in PdfRasterizer which will allow you to get the barcode images without any kind of resampling. To do this make a Document object and access the pages via it's Page property. This could fail in one case: It is possible that the barcodes may be represented internally in the PDF as brush strokes which are painted onto the screen (i've seen this happen). If this is the case you will need to rasterize the whole page in order to extract it.

    Filed under: , ,
View as RSS news feed in XML