DrawRecangle
DrawRecangle
Hi
I Tried to draw Rectangles on a PDF. Unfortunatelly the Coordinates are in Pixel and the SetMeasurementUnit does not have the Possibility for Pixel. What must i do to draw Rectangles with Pixel Coordinates ??
I Tried to draw Rectangles on a PDF. Unfortunatelly the Coordinates are in Pixel and the SetMeasurementUnit does not have the Possibility for Pixel. What must i do to draw Rectangles with Pixel Coordinates ??
Re: DrawRecangle
Hi Win568
It makes no sense to use pixels units to draw on a PDF.
The Pdf is a vector based format and there is no information in the pdf (usualy called dots per inches or DPI) to translate pixels to device independant units such as points,inches, millimeters and centimeters.
What you can do is to rasterizer the pdf in an image (it needs an information on dots per inches to be done), draw your rectangle in this image and then create a new pdf using this image as the page's content.
Jean-Luc
It makes no sense to use pixels units to draw on a PDF.
The Pdf is a vector based format and there is no information in the pdf (usualy called dots per inches or DPI) to translate pixels to device independant units such as points,inches, millimeters and centimeters.
What you can do is to rasterizer the pdf in an image (it needs an information on dots per inches to be done), draw your rectangle in this image and then create a new pdf using this image as the page's content.
Jean-Luc
Re: DrawRecangle
Hi,
I suggest to use points. In a PDF 1 inch = 72 points.
Kind regards,
Loïc
I suggest to use points. In a PDF 1 inch = 72 points.
Kind regards,
Loïc
Re: DrawRecangle
Hi
Thank you for your quick answers. The problemn i have is, that we make an OCRScan of a PDF Document. After this, we build out of the Characters words (with their coordinates) and mark Special words in the PDF with a Rectangle. Unforunately the Coordinates are in Pixels. Is there a Possibility to use the Image of the PDF ??
Thank you for your quick answers. The problemn i have is, that we make an OCRScan of a PDF Document. After this, we build out of the Characters words (with their coordinates) and mark Special words in the PDF with a Rectangle. Unforunately the Coordinates are in Pixels. Is there a Possibility to use the Image of the PDF ??
Re: DrawRecangle
Hi
OK, Found the Solution. Ask the PDF for its Resolution and Recalulate the OCR Results.
OK, Found the Solution. Ask the PDF for its Resolution and Recalulate the OCR Results.
Who is online
Users browsing this forum: No registered users and 2 guests