+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Get embedded graphics data


(Guest) #1

Hi

I have a question about exporting from List and Label. We use the L&L designer to design labels and we want to print them on Laser marker, which have it’s own special format. By iterating over the Objects collection, I’ve managed to convert everything except the embedded graphics.
Can you help me how to get access to the uncompressed drawing data?

I’ve tried getting them directly from the file, but after base64 decoding I end up with a ChK_Packed format.

Is there a way for decompress this format? or can I get the data otherwise using the API, I’m using the .Net version.
Thanks a lot!


(Guest) #2

Depends on your version of LL.

Ever found LlConvertStringToStream(), LlConvertStringToHGLOBAL() or LlConvertStringToBLOB() in your declaration file?

Paulchen


(Guest) #3

Sorry, I forgot that it’s ver. 15.
I can only find LlConvertStringToHGLOBAL in the .Net assembly using Reflector, it points to cmll15.dll where I also can find the two other methods.
I have to go now for today, I’ll look at it tomorrow.

Thanks a lot!


(Guest) #4

Hi again

I have tried the various methods, but have been unable to make any of them work. Could you elaborate a bit about how they should work? Should I input the base64 decode string or the contents directly from the .lbl file, which seems to have a @2@ prefix, should it be left out.
I’m using .Net so I can’t directly use the C++ header file, which could introduce new problems in the translation. So the more information I have the better.
I really appreciate your help !

[quote=Paul Schmidt]Depends on your version of LL.

Ever found LlConvertStringToStream(), LlConvertStringToHGLOBAL() or LlConvertStringToBLOB() in your declaration file?

Paulchen
[/quote]


(Guest) #5

AFAIK, you pass the Base64 encoded string (everything behind the ‘=’ in the project file) and get back the contained data.

You can use any LL function even in .NET, but you need to declare the function and its parameter types to the marshaller. So you should be able to choose one of these three which fits best.

Paulchen


(Guest) #6

Thank you for your reply.

Using LlConvertStringToHGLOBAL I’ve been able to get a hGlobal handle, but when I want to read the data, I’m unsure how much data there is?

If you have a sample, any language would do, it doesn’t have to be C#, I would be grateful to see it :slight_smile:

[quote=Paul Schmidt]You can use any LL function even in .NET, but you need to declare the function and its parameter types to the marshaller.
Paulchen[/quote]


(Guest) #7
HGLOBAL h(NULL);

::LlConvertStringToHGLOBAL(".....",&h);
File(...).Write(::GlobalLock(h),::GlobalSize(h));
::GlobalUnlock(h);
::GlobalFree(h);

Paulchen


(Guest) #8

Thank you very much!!! :slight_smile:

[quote=Paul Schmidt][code]
HGLOBAL h(NULL);

::LlConvertStringToHGLOBAL("…",&h);
File(…).Write(::GlobalLock(h),::GlobalSize(h));
::GlobalUnlock(h);
::GlobalFree(h);
[/code]

Paulchen
[/quote]