How to Use Table.SetCellImage DynaPDF?

Hi Christian!

I watched your examples when you Generate QR Codes, One example its simple, Generates QR with only one method and the Result is a Graphic Object.
and displays it on a Listbox.

I’m using this example, but I want to integrate to my Invoice project when I use DynaPDFTable.

So, I saw that exists "Table.SetCellImage, I read the Instructive of the Plugin, but I’m not understanding.

I want to put this “Picture Object” - The QR Code generated as a Picture Object into a Cell of this table.

Any Ideas?

Thanks

I got an idea how it works
call table.SetCellImage(rowNum, 2, true, table.kcoCenter, table.kcoCenter, 0.0, 0.0, pic, 1)

But I have a question, I’m looking that the Value of the Image must be string instead of picture.

Is it Right?

So If I wanna put the image of the QR Code, first I need to convert to string or how?

Originally in the example file get the image of a path,

SetCellImageData takes it as a String and SetCellImage wants a file path.

I could overload them to take folderitem.

just use Picture.GetData function to request a PNG and pass that as data string.

Yes, I do this:

Dim mb As MemoryBlock = pic.GetData(Picture.FormatPNG, Picture.QualityMax)
ImgStr = mb

Where pic is the picture object (QR Code)
and ImgStr is a string.

then i pass it as this way: call table.SetCellImageData(rowNum, 0, true, table.kcoCenter, table.kcoCenter, 00.0, 00.0, codigo, 1)

but nothing happens

What am I wrong?

Hi Christian, Finally I insert the generated QR but with another mode:

At Create Invoices method, editing the PDF:

test "QR Code", BarcodeGeneratorMBS.BarcodeQrcode, "Hello World"
call pdf.InsertPicture(pic, 20.00, 700.00, 90.00, 90.00)

But I’m watching that the QR is tiny. SO when I say Tiny i mean that I saw another QR codes bigger with the 3 spots more speciated and with four little squares at the center, Is there a way to get this?

[quote=201625:@Gerardo García]Hi Christian, Finally I insert the generated QR but with another mode:

At Create Invoices method, editing the PDF:

test "QR Code", BarcodeGeneratorMBS.BarcodeQrcode, "Hello World"
call pdf.InsertPicture(pic, 20.00, 700.00, 90.00, 90.00)

But I’m watching that the QR is tiny. SO when I say Tiny i mean that I saw another QR codes bigger with the 3 spots more speciated and with four little squares at the center, Is there a way to get this?[/quote]
Ok Sorry, I saw that If you add more text, the Code will growing up

Well Job Christian, its a good plugin

with insert picture you can specify a dest size. So you can make the QR code larger.

[quote=201616:@Gerardo García]Yes, I do this:
then i pass it as this way: call table.SetCellImageData(rowNum, 0, true, table.kcoCenter, table.kcoCenter, 00.0, 00.0, codigo, 1)

but nothing happens[/quote]

I don’t see imgstr in this line!?

Thanks Christian. Now I’m looking that I use another plugin for generate the QR Code.

I’m Using: BarcodeGeneratorMBS instead of DynaPDFBarcodeMBS

But I can’t find an example to Use DynaPDFBarcodeMBS :frowning:

I say this, because that If I’m continuing using it, I need to buy two licences

DynaPDFBarcodeMBS is not for generating barcodes!
It’s a very different thing to create barcode fields which require full Adobe Acrobat or a extra license from Adobe to work properly.