PDF as byte[] => DataSource

I suggest to implement the following feature:

The possibility to assign a byte from a passed datasource to a PDF object.

example:

List<MyLabel> myLabels = new List<MyLabel>(); 

listLabel.DataSource = myLables;

class MyLabel
{

    public int Id { get; set; }

    public string AdditionalInformation01 { get; set; }

    public string AdditionalInformation02 { get; set; }

    public byte[] PdfBin { get; set; }
}

A typical use case might be:

It happens that I save small PDFs, for example of a shipping label, as a byte in a database in order to then print them with additional information.
If I could assign the byte directly to a PDF object. I could save myself the file handling

Basically, the ObjectDataProvider already has built in support for a similar feature - using the FieldType attribute. For your class, the usage would look like

class MyLabel
{

    public int Id { get; set; }

    public string AdditionalInformation01 { get; set; }

    public string AdditionalInformation02 { get; set; }

    [FieldType(LlFieldType.PDF)]
    public byte[] PdfBin { get; set; }
}

However this will not work OOTB, as the byte array is currently not a supported base type for PDF. We’ll tackle this in version 30 and support both byte[] and Stream.