OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 14-09-2005, 11:56
MrClark
Guest
 
Posts: n/a
Unhappy CorelDRAW 12 ExportBitmap

I'm upgrading my application from Corel DRAW 11 to 12 and exporting a Tiff file no longer works the same. I attempted to record the process of exporting a Tiff with the same options as I did manually and the files are not the same. As near as I can tell the recorded code does not include the thumbnail information.

Here is the recorded code
Code:
    Dim OrigSelection As ShapeRange
    Set OrigSelection = ActiveSelectionRange
    Dim expflt As ExportFilter
    Dim pal As StructPaletteOptions
    Set pal = New StructPaletteOptions
    With pal
        .PaletteType = cdrPaletteUniform
        .DitherType = cdrDitherNone
    End With
    Set expflt = ActiveDocument.ExportBitmap("C:\Temp\Avatar_Script.tif", cdrTIFF, cdrSelection, cdrPalettedImage, 1200, 1073, 200, 200, cdrNormalAntiAliasing, False, False, True, False, cdrCompressionLZW, pal)
    expflt.Finish
And the resultant file is attached along with the manual file.

I know the record function is lacking but I cannot find any reference to fixing the problem.

Last edited by MrClark; 14-09-2005 at 11:58.
Reply With Quote
  #2  
Old 14-09-2005, 12:50
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

What do you mean by thumbnail information? I don't think that the recording is lacking anything as far as export is concerned. It should record everything correctly. But if it doesn't then there is a problem.

Can you explain more what is the difference in the resulting file between your manual export and the one produced through automation?
Reply With Quote
  #3  
Old 14-09-2005, 14:00
MrClark
Guest
 
Posts: n/a
Default

I guess the files didn't upload.

Try these;

Avatar_Script
Avatar_Manual

You will see there is a significant difference in both the file size and if you dump it to a hex editor or even notepad you will see a significant difference in the harder of each file. Both files were exported from the same CorelDRAW source file.
Reply With Quote
  #4  
Old 14-09-2005, 15:15
MrClark
Guest
 
Posts: n/a
Default

So I went back and used my old code from CorelDRAW 11

Code:
Dim opt As New StructExportOptions

With opt
    .AntiAliasingType = cdrNormalAntiAliasing
    .Compression = cdrCompressionLZW
    .Dithered = False
    .ImageType = cdrGrayscaleImage
    .MaintainAspect = False
    .MaintainLayers = False
    .Overwrite = True
    .ResolutionX = 200
    .ResolutionY = 200
    .SizeX = 2000
    .SizeY = 1580
    .Transparent = False
    .UseColorProfile = False
End With

ActiveDocument.Export "C:\temp\Avatar.tif", cdrTIFF, cdrCurrentPage, opt
And it produces the same file automated as is does manually with all of the necessary header information.

So I'm assuming we are still seeing a problem with the record function?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to begin with CorelDRAW and VBA shelbym CorelDRAW/Corel DESIGNER VBA 2 03-04-2007 09:15
CorelDRAW 12 SP1 is available Alex CorelDRAW/Corel DESIGNER VBA 1 04-08-2004 01:43
Preview from CorelDRAW file and/or worksheet reanan CorelDRAW/Corel DESIGNER VBA 5 15-05-2003 18:29
Link in CorelDraw 11 met CorelDRAW/Corel DESIGNER VBA 0 25-03-2003 08:17
Creating macros for CorelDraw 10 in CorelDraw 11 Rick Randall CorelDRAW/Corel DESIGNER VBA 1 14-03-2003 08:00


All times are GMT -5. The time now is 13:18.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com