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 08-02-2006, 13:26
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default JPEG export in X3 is screwy.

In the code below I am exporting a JPEG and an AI of every page in my current document. I use this code several times a day and it worked perfect in 12. Now in X3, it seems that any graphics that are taller than they are wide are exported to a strange looking JPEG. The AI is fine, but the JPEG is squashed from left to right. Can anyone see in my code where I may be doing something wrong from 12 to X3?
Code:
Sub cmdGo_Click()
    Me.Hide
    Dim JF As ExportFilter
    Dim d1 As Document
    ' Check for Jpeg
    Set JF = Nothing
    Set d1 = ActiveDocument
    If cbxJPG.Value = True Then
        Dim sx As Double, sy As Double
        ActivePage.Shapes.All.GetSize sx, sy
        Set JF = d1.ExportBitmap("c:\Documents and Settings\Artist\Desktop\" & txbFile.Text & _
        ".jpg", cdrJPEG, cdrCurrentPage, cdrRGBColorImage, sx * 300 / sy, 300, 72, 72)
    
    With JF
        .Compression = 0
        .Optimized = True
        .Smoothing = 0
        .SubFormat = 1
        .Progressive = False
        .Finish
    End With
    Set JF = Nothing
    End If
    
    If cbxAI.Value = True Then
        Set JF = d1.ExportEx("c:\Documents and Settings\Artist\Desktop\" & txbFile.Text & _
        ".ai", cdrAI, cdrCurrentPage)
        
    With JF
        .ConvertSpotColors = False
        .IncludePreview = False
        .IncludePlacedImages = False
        .Platform = 1
        .SimulateFills = True
        .SimulateOutlines = False
        .TextAsCurves = True
        .UseColorProfile = False
        .Version = 0
        .Finish
    End With
    Set JF = Nothing
    End If
    Unload Me
End Sub
I would upload a picture of this, but the upload still doesn't work for me.
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
  #2  
Old 13-02-2006, 11:17
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Sean,

Seems to work fine here. Here is a bit simplified code I used for exporting JPEGs. Both tall and wide images seem to work fine. Do you have more than one object on the page? Are they all on the same layer? Do you have any other layers which are non-printable or invisible?

Code:
Sub DoJPEG()
    Dim JF As ExportFilter
    Dim d1 As Document
    Set JF = Nothing
    Set d1 = ActiveDocument
    
    Dim sx As Double, sy As Double
    ActivePage.Shapes.All.GetSize sx, sy
    Set JF = d1.ExportBitmap("c:\image.jpg", cdrJPEG, cdrCurrentPage, cdrRGBColorImage, sx * 300 / sy, 300, 72, 72)
    
    With JF
        .Compression = 0
        .Optimized = True
        .Smoothing = 0
        .SubFormat = 1
        .Progressive = False
        .Finish
    End With
    Set JF = Nothing
End Sub
Reply With Quote
  #3  
Old 14-02-2006, 08:51
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default

No layers, but I do have multiple objects on the page. I'm starting to think that Iin my customization there is something wrong. I imported my customizations from the Beta cycles and I think that may be causing the problem. Going to try F8 and rebuild my shortcuts and stuff. Let you know how it turns out.
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
  #4  
Old 15-02-2006, 08:59
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default

F8 seemed to work for this problem. I will have to recreate most of my custom icons for my macros, but c'est la vie!
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
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
DXF export for CAD / CAM / CNC jemmyell CorelDRAW/Corel DESIGNER VBA 5 23-02-2006 11:28
HPGL export problem Anonymous General 1 16-02-2006 10:15
draw 11 export collection to psd xombie Code Critique 5 23-11-2005 12:02
Export to JPG (I need serious help) liviazornio CorelDRAW/Corel DESIGNER VBA 14 14-11-2005 09:59
Problem with Export (or Save as) in AI-Format LOT CorelDRAW/Corel DESIGNER VBA 3 10-02-2004 15:28


All times are GMT -5. The time now is 00:19.


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