I need to warm this thread up again - I am s close...
As explained before I was able to use the .NET Bitmap's save method to save an
image:
cfobject type=.NET name=presentation class=Aspose.Slides.Presentation
assembly=#slidesDLL#
cfset presentation.init(#Expandpath('./')#ppt\test2.ppt)
I've now worked around this to some degree by saving the initial image with a
.png extension and then re-saving it using cfimage. This seems to work.
I'd still like to find out why the other approach with .NET classes didn't
work. It's so confusing...
Cheers
Stefan
The resulting image appears to be a valid JPG image. I say appears
because the CFIMAGE tag falls over if I try to read it back into CF.
Yes, as you guessed you have to convert the bitmap to jpeg format first.
I'd still like to find out why the other approach with .NET
classes didn't
Hi all,
I'm back working with the Aspose .NET ddls and have a question.
First I do this:
cfobject type=.NET name=presentation class=Aspose.Slides.Presentation
assembly=#slidesDLL#
cfset presentation.init(#pptFile#)
Now in order to save this presentation in another format the docs state that I
If the documentation can be believed:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=dotNet_04.html
...enumerator elements can be accessed directly by using the format
Enumerator_variable.enumerator, as in MyColor.Red
So try grabbing a reference to the
So try grabbing a reference to the Aspose.Slides.Export.SaveFormat.
Then use: YourReference.Pdf
Awesome, that worked!
Many thanks. I now only need to figure out how to convert/cast a .NET instance
of System.Drawing.Bitmap to something I can save in CF as a JPG or similar.
Cheers
Many thanks. I now only need to figure out how to convert/cast a .NET
instance of System.Drawing.Bitmap to something I can
save in CF as a JPG or similar.
http://msdn.microsoft.com/en-us/library/system.drawing.image.save%28VS.80%29.aspx
Dave Watts, CTO, Fig Leaf Software
Thanks Dave but how do I do this in CF?
When I dump the object of type System.Drawing.Bitmap it does not show me a Save
method.
I'm not a backend programmer and C# is pretty alien to me. I understand this
would all be much simpler in pure C# I guess but I feel I'm close now, all
that's left
When I dump the object of type System.Drawing.Bitmap it does not show me a
Save method.
Nevertheless, it should be in there. Image is an abstract class from
which Bitmap is descended. I suspect that CFDUMP doesn't show you the
methods of this abstract parent.
I'm not a backend programmer
Thanks again.
Do you know how to instantiate System ddls? I keep getting errors when I try
either
cfobject type=.NET name=image class=System.Drawing.Image
assembly=C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Drawing.dll
or
cfobject type=.NET name=image class=System.Drawing.Image
BTW you were right, I can call Save() on Bitmap :-)
Thanks!
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
Do you know how to instantiate System ddls? I keep getting errors when I try
either
cfobject type=.NET name=image class=System.Drawing.Image
assembly=C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Drawing.dll
or
cfobject type=.NET name=image class=System.Drawing.Image
Class
Well as Dave said, System.Drawing.Bitmap descends from System.Drawing.Image. So
it should have access to everything in the Image class. Since you already have
a reference to a Bitmap, try using it instead.
Do you know how to instantiate System ddls?
class=System.Drawing.Image
Well
But in general, if you have a non-abstract class in
System.*, you
should be able to instantiate it without specifying an
assembly path
as it'll be in the Global Assembly Cache.
Dave,
Do you know any common reasons why you might have to specify an assembly in
this case? Because I can see
Do you know any common reasons why you might have to specify an assembly in
this case? Because I can see System.Drawing
in the GAC. But was unable to reference any of the classes unless I supplied
a path. So I was curious as to what might cause
that.
Not really. Are you able to reference
No. I needed to supply a path for System.Diagnostics too. But my test machine
has multiple versions installed. So maybe that has something to do with it.
-Leigh
~|
Order the Adobe Coldfusion Anthology now!
No. I needed to supply a path for System.Diagnostics too. But my test machine
has multiple versions installed. So maybe that
has something to do with it.
That's almost certainly the problem - you're in the newest version of
DLL Hell.
Dave Watts, CTO, Fig Leaf Software
the newest version of DLL Hell.
Darn, and here I thought we had graduated to purgatory ..
-Leigh
~|
Order the Adobe Coldfusion Anthology now!
18 matches
Mail list logo