Translation barcode in pdf file

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Translation barcode in pdf file

Postby Obernier » Wed Jun 25, 2008 1:22 pm

When I use the barcode method, the quality of the barcode generated in the pdf file is very low. Consequently the result cannot be used.

Is there a method to increase the result of the barcode in the pdf file ?

If I use the CodeType 6 the quality is lower than if i use the CodeType 26
Obernier
 
Posts: 25
Joined: Thu Jul 12, 2007 10:28 am

Postby IDEAL Software Support » Thu Jun 26, 2008 8:46 am

The quality is not low - we use a virtual resolution of 2.400 DPI for PDF export - and we can scan the barcodes without problems.

I rather assume you are using a too low width for the whole barcode. I recommend to read the chapters about 1D and 2D barcodes in the help file titled "Programmer's Manual".
IDEAL Software Support
 
Posts: 1625
Joined: Thu Nov 18, 2004 4:03 pm

Translation code barre in pdf ("3 of 9 Barcod")

Postby Obernier » Wed Aug 27, 2008 10:25 am

For the code barre I need to use the police "3 of 9 Barcode".

With the VPE viewer the code barre appears clearly.

But when i generate the pdf file, instead of having a code barre, i get squares.

thank you to tell me if there is a solution .

NB: I use this methods
EmbedAllFonts = TRUE
SubsetAllFonts = TRUE
Obernier
 
Posts: 25
Joined: Thu Jul 12, 2007 10:28 am

Postby IDEAL Software Support » Thu Aug 28, 2008 9:04 am

The quality is not low, but Acrobat Reader does display it in blocks on the screen but prints it fine.

If you are of the opinion that the printout is not scanable by your barcode reader, please contact our tech support by e-mail and create a support case.

We then need the original .VPE document file - created through WriteDoc("test.vpe") - and the PDF document - created through WriteDoc("test.pdf").
IDEAL Software Support
 
Posts: 1625
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Sep 04, 2008 9:32 am

Update: after e-mail conversation with the client, we found out that he is not using the barcode functions which are implemented into VPE, but a barcode font.

Without further investigation, reasons for the problem might be a defective font, and / or the client did use a wrong character set. We did recommend to use the barcode functions which are implemented into VPE.
IDEAL Software Support
 
Posts: 1625
Joined: Thu Nov 18, 2004 4:03 pm

barcode

Postby Obernier » Thu Sep 04, 2008 9:41 am

I had tested the barcode function, but i have not been able to get a good resolution with this method. That's the reason why i have tested differents fonts.

so far, i have gotten the best resolution with the font C39T30lfz.
Obernier
 
Posts: 25
Joined: Thu Jul 12, 2007 10:28 am

Postby IDEAL Software Support » Thu Sep 04, 2008 12:21 pm

I don't understand "good resolution". Again, the resolution is 2.400 DPI, how much higher do you wish the resolution to be? I rather think you mean that your barcode might not fill the whole area you have specified for the barcode. If you read in the Programmer's Manual the chapter about 1D-Barcodes you will find the explanation there: since the module widths (the black bars and the white gaps) have fixed aspect ratios - say 2:3 - as laid down in the specification for each barcode type, considering this aspect ratio, a barcode can not be sized into any width you would like to have.

I would like to stress that a barcode font is always a bad choice compared to the built-in barcode functions of VPE.

a) You need to license it, and you need to ship and install the barcode font on your customer's site.

b) Especially for PDF generation: a barcode font has to be embedded into the PDF. This costs time and blows up the document. In contrast a barcode generated by VPE is a true vector-graphics, which is directly painted into the PDF using the PDF paint-operators.
IDEAL Software Support
 
Posts: 1625
Joined: Thu Nov 18, 2004 4:03 pm

Postby Obernier » Thu Sep 04, 2008 5:21 pm

As your advice, i tested the use of the barcode function.

when i do the following test:

CHReport:ROTATION = 900.
chreport:Encryption = 1.
chreport:protection = {&PDF_ALLOW_HIQ_PRINT} + {&PDF_ALLOW_PRINT} .
chreport:BarcodeThinBar = 1.
chreport:BarcodeThickBar = 2.5 .

chreport:nopen.

/* spécifie la position du texte et la position du texte en clair */
chreport:SetBarcodeParms(0,0).

li_compression = {&DOC_COMPRESS_NONE}.
largeur = -100.

chreport:Compression = li_compression.
Li_code = {&BCT_CODE39}.

chreport:BarcodeAutoChecksum = TRUE.

chreport:barcode(100,chreport:ntopmargin + 200 ,-800,-100,Li_code, "PRIDVET156180405255454-3" , "" ).
chreport:barcode(300 ,chreport:ntopmargin + 200 ,- 800,- 100,Li_code, "PRIDVET156180405255454-3" , "" ).
chreport:barcode(600 ,chreport:ntopmargin + 200 ,- 800,- 100,Li_code, "PRIDVET156180405255454-3" , "" ).
chreport:barcode(1000 ,chreport:ntopmargin + 200 ,- 800,- 100,Li_code, "PRIDVET156180405255454-3" , "" ).
chreport:barcode(1800 ,chreport:ntopmargin + 200 ,- 800,- 100,Li_code, "PRIDVET156180405255454-3" , "" ).

Once i generate the pdf file, for each codebarre the width and the heigth are differents (the results seem to depend on the coordinates of the element).


height 7,7 > > > 7,82

It's difficult to use it, if the result cannot be stable.

And the result is still less clear and less readable than using the other method:
chreport:WRITE(100,1300 ,-100,-800 ,"[N L 'C39T30lfz' IO S 24 BC WHITE ]" + "*PRIDVET156180405255454-3*").
Obernier
 
Posts: 25
Joined: Thu Jul 12, 2007 10:28 am

Postby IDEAL Software Support » Fri Sep 05, 2008 12:19 pm

I do not know what you are doing, but from a technical point of view, it is impossible that the barcodes have different widths or heights, when the barcode text is identical.

To be on the save side, we tested your source-code and - as expected - the widths and heights of the generated barcodes are not different.

Hint (which does not affect the problem you describe):
ThinBar and ThickBar are integer properties. When you assign the floating-point value 2.5 to ThickBar, it is truncated to the integer value 2. If you take a look at the Reference Manual, the sample code demonstrates exactly how to achieve a ratio of 1 : 2.5.

Set ThinBar = 2 and ThickBar = 5.

Again, this does not affect the problem you describe, but it is important to make your barcodes readable by scanners. BTW, I do not have the specification of Code 3 of 9 at hands, so I do not know which ratios are allowed for this type of barcode.

Final question: we performed our test with VPE v4.0. What version of VPE are you using? I can not see anywhere in your sample code that you set UnitTransformation = VUNIT_FACTOR_MM10, but you are using 1/10th mm coordinates.
IDEAL Software Support
 
Posts: 1625
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 5 guests