Get embedded graphics data

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!

Depends on your version of LL.

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

Paulchen

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!

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]

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

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]

HGLOBAL h(NULL);

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

Paulchen

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]