I thought I had answered it but apparently no. See answer below.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Gajdos
> Gabriel
> Sent: Tuesday, November 11, 2003 3:32 PM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] PDF417 - confused about parameters/options
>
>
> Hallo there!
>
> I am trying to generate PDF417 barcode and I am a little bit confused
> about
> setting parameters.
>
> I am not able to produce PDF417 image with x/y ratio of 2:1.
> I set the option PDF417_USE_ASPECT_RATIO, than call setAspectRatio(0.5F)
> ant
> the resulting image has following dimensions:
> width = 154, height = 27
> ErrorLevel 4 is used.
>
> I think the height should be 77 if the width is 154.
>
>
A best fit is tried but that's not always possible specially if the
data is small.
> Anyway, I have following instructions (comming from Global Transport Label
> implementation guide from our customer).
> Xdim=13mils (or 10 mils in some cases)
> Xdim/Ydim=1/3
> Error Correction Level = 4
>
> Please, can somebody explain me how to set these values?
>
> ErrorCorrection should be clear...
> code.setErrorLevel(4);
> myCode.setOptions(BarcodePDF417.PDF417_USE_ERROR_LEVEL);
>
> Xdim/Ydim ratio is confusing for me...
>
That's the pixel height in relation to the width. That's the value
by default.
> Xdim was not understood by me, too.
>
That's the absolute pixel width. When you get the PDF417 image the
pixel width is 1/72 inch and it must be scaled. Example:
float xdim = 13; //in mils
float xdimydimratio = 3;
Image img = pdf417.getImage();
float xscale = 100f * 72f * xdim * 0.001f;
img.scalePercent(xscale, xscale * xdimydimratio);
Best Regards,
Paulo Soares
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions