PDF417 rows and colums

9 posts, 2 answers
  1. Boris
    Boris avatar
    5 posts
    Member since:
    Sep 2012

    Posted 29 Mar 2013 Link to this post

    Hello, I am using Telerik WPF RadControls for generating the PDF417 barcode image. I need to specify the number of barcode image columns and rows. The code I am using is following:

    <telerik:RadBarcodePDF417 Name="barcode1" Width="480" Height="152" HorizontalAlignment="Left"  >
    </telerik:RadBarcodePDF417>

    Some other solutions I tested have properties like "NumberOfRows" and "NumberOfColumns". I would like to know whether it is possible to adjust that with RadControls.

     Please help. Thank you.
  2. Answer
    Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 02 Apr 2013 Link to this post

    Hi,

    Internally, code PDF417 renders in columns and rows. These rows and columns create a grid, which in turn accommodates all the modules of encoded data. The maximum number of columns in the code is 30, whereas the maximum number of rows is 90. Depending on the scenario, this internal behavior may influence the readability of the control.  To address this, two properties are exposed  - Rows and Columns. These two properties will allow you to pre-determine the number of rows and columns in the rendered PDF417 code. For example, when you have limited width, you can increase the number of rows. The code sample below demonstrates one possible usage:

    <Barcodes:RadBarcodePDF417 Text="Encoded data which will influence the rendered PDF417" Rows="10">
    </Barcodes:RadBarcodePDF417>

    One thing to keep in mind is that these properties are related to the data, which needs to be encoded. If there is too much data, more rows/columns will be added. If there is insufficient data, not all rows/columns will be used.
    I hope this information helps.

    Greetings,

    Yavor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Boris
    Boris avatar
    5 posts
    Member since:
    Sep 2012

    Posted 02 Apr 2013 Link to this post

    Thank you for help, but apparently, there is no "Rows" property for my RadBarcodePDF417. I get the following error:

    "The property 'rows' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'."

    I am using the following code:

    <Window x:Class="RadControlsWpfApp3.MainWindow"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    Title="MainWindow" Height="350" Width="525">
        <Grid>
            <telerik:RadBarcodePDF417 Name="pdf417" Text="some text" Rows="9"></telerik:RadBarcodePDF417>   
        </Grid>
    </Window>

    EDIT: forgot to mention, I am using the trial version of RadControls for WPF Q1 2013. Could this be the issue?
  5. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 03 Apr 2013 Link to this post

    Hi,

    Indeed, this is the source of the issue. This feature has been added recently. In order to take advantage of it, you will need to download the latest version of the controls.

    Kind regards,
    Yavor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Boris
    Boris avatar
    5 posts
    Member since:
    Sep 2012

    Posted 03 Apr 2013 Link to this post

    My current version of Telerik is 2013.1.220.40 - I believe that is the latest version. Am I wrong?
    I don't have the Rows property, which is concering. I added the following references:

    • Telerik.Windows.Data.dll,
    • Telerik.Windows.Controls.dll,
    • Telerik.Windows.Controls.DataVisualization.dll,

    as specified at http://www.telerik.com/help/wpf/radbarcode-overview.html. When I check the references in my solution, it really says that the version is 2013.1.220.40. My version of .Net is 4.0. Any further help is appreciated.


  7. Answer
    Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 08 Apr 2013 Link to this post

    Hi,

    I downloaded and tested the latest version from your account, and it did contain the properties.
    You can download it as well, and give it a try.

    All the best,
    Yavor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  8. Boris
    Boris avatar
    5 posts
    Member since:
    Sep 2012

    Posted 08 Apr 2013 Link to this post

    I deleted the existing installation, not through Telerik Control Panel, but using the .msi file, and now it works fine.
    Thank you for your support!
  9. Boris
    Boris avatar
    5 posts
    Member since:
    Sep 2012

    Posted 19 Apr 2013 Link to this post

    Hello again!

    I have a question. Is it possible to define a number of data columns? I need to have 9 data columns (13 total) in generated code. Currently, when number of columns is set to 9, the number of columns in the generated image varies, depending on the text.  
    Also, I would need to be able to set the height to width ratio of base element (small square), which should be 3:1.
    And the final question: is it possible to set text encoding  (like UTF-8, Windows-1250)?

    Thank you.
  10. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 23 Apr 2013 Link to this post

    Hello,

    Presently, the PDF417 works as follows. The user selects the number of rows and columns. This defines a ratio. If this ratio is enough to accomodate the data in the code, it is rendered like this. If that is not the case, the rows and columns are sequentially incremented, trying to preserve the ratio. Additionally, keep in mind that the rows and columns are properties, pertaining to the data codewords section of the code. There are additional sectors on the left and on the right:
    http://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/PDF417_Example.svg/496px-PDF417_Example.svg.png

    Further, the present version of the pdf417 barcode does not support additional character sets. The QR code does.
    I hope this information helps.

    Kind regards,
    Yavor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready