Hello,
is it possible to create an 2D-Barcode by assigning an outlook contact file (*.vcf) to the barcode writer?
Greetings from Germany
Volker
2D-Code from Outlook contact
Moderator: Alex
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: 2D-Code from Outlook contact
Hello Volker,
Yes, this is possible. You need get content of an outlook contact file as binary data and create 2D barcode from the binary data.
Best regards, Alexander
Yes, this is possible. You need get content of an outlook contact file as binary data and create 2D barcode from the binary data.
Best regards, Alexander
-
- Posts: 2
- Joined: Mon Mar 04, 2013 2:10 pm
Re: 2D-Code from Outlook contact
Hello Alex,
thanks for your reply. I tried the following code:
If I copy the returned string into the BarcodeWriter's <value> property, I get an error "Data region is too large". The string has got more than 7.000 characters. Is this too long for any Barcode or is anything wrong in my code? I tried QR, Aztec, DataMatrix, MaxiCode
Best regards,
Volker
thanks for your reply. I tried the following code:
Code: Select all
Friend Shared Function GetStringFromVCard() As String
Dim inFile As System.IO.FileStream
Dim binaryData As Byte()
inFile = New System.IO.FileStream(<filename>.vcf,
System.IO.FileMode.Open,
System.IO.FileAccess.Read)
ReDim binaryData(CInt(inFile.Length))
Dim bytesread As Integer = inFile.Read(binaryData, 0, CInt(inFile.Length))
inFile.Close()
Dim base64string As String = System.Convert.ToBase64String(binaryData, 0, binaryData.Length)
Return base64string
End Function
Best regards,
Volker
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: 2D-Code from Outlook contact
Hello Volker,
2D barcode can contain maximum 2.5K characters.
You can go 2 ways if you have more than 2.5K characters:
http://www.vintasoft.com/docs/vsbarcode ... acter.html
Best regards, Alexander
2D barcode can contain maximum 2.5K characters.
You can go 2 ways if you have more than 2.5K characters:
- Compress your data. I think the contact information can be well compressed. This is the best way.
- Use the structure append feature and combine up to 16 2D barcodes in one 2D barcode. This is not the best way, because the structure append feature must be used in very special cases.
http://www.vintasoft.com/docs/vsbarcode ... acter.html
Best regards, Alexander