OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 07-12-2013, 20:20
knowbodynow knowbodynow is offline
Senior Member
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 434
Default Export Problem

I have a file with 106 pages size around 25 mb. I have a 374 dpi bitmap on one page. When I export the single page using the following code the save file is over 1 GB for X5 format and 95 mb for X6! I'm Using X6 without any service packs:

Private Sub cmdOK_Click()

    Dim Activate As Boolean

    Activate = False

    For i = 0 To ListToExp.ListCount - 1
    If ListToExp.Selected(i) = True Then
        Activate = True
        Exit For
    End If
    Next i
    If Activate = False Then MsgBox "Select at least one layer", vbExclamation, "Oops! - Nothing to Export": Exit Sub

    ActiveDocument.Unit = cdrMillimeter
    ActiveDocument.Resolution = 300

    Dim sp As Integer, ep As Integer, pags As Integer
    Dim sr As ShapeRange
    Dim opt As New StructSaveAsOptions
    Dim expfltCDR As ExportFilter
    Dim wid As Long, hgt As Long, strnos As Long
    Dim Range As Double
    Dim ts As Shape

    Range = pageT.Value - pageB.Value

    If pageT.Value > ActiveDocument.pages.Count Or Range < 0 Or pageB.Value < 1 Then
    MsgBox "Oops!", vbExclamation, "Check your page ranges!"
    Exit Sub
    End If
    Optimization = True

    pags = sp

    For pags = pageB To pageT


        For i = 0 To ListToExp.ListCount - 1
        If ListToExp.Selected(i) = True Then
            nam = ListToExp.list(i)
            ActiveDocument.pages(pags).Layers(nam).Printable = True
        End If
        Next i

        If ActiveSelection.Shapes.Count > 0 Then
            Set sr = ActiveSelection.DuplicateAsRange
            Set sr = ActiveSelectionRange
            sr.AlignRangeToPage cdrAlignHCenter
            sr.AlignRangeToPage cdrAlignVCenter

            FilePth = cmdPath.Caption
            strName = ActiveDocument.pages(pags).name
            If TrimName Then
                strnos = InStrRev(strName, " ")
                If strnos > 0 Then strName = Mid(strName, strnos, Len(strName))
            End If
            If SaveAsX5.Value = True Then
                With opt
                    .EmbedVBAProject = False
                    .Filter = cdrCDR
                    .IncludeCMXData = True
                    .Range = cdrSelection
                    .EmbedICCProfile = False
                    .ThumbnailSize = cdr10KColorThumbnail
                    .Version = cdrVersion15
                    .Overwrite = True
                End With
                With opt
                    .EmbedVBAProject = False
                    .Filter = cdrCDR
                    .IncludeCMXData = True
                    .Range = cdrSelection
                    .EmbedICCProfile = False
                    .ThumbnailSize = cdr10KColorThumbnail
                    .Version = cdrCurrentVersion
                    .Overwrite = True
                End With
            End If
            FilePth = FilePth & "\" & strName & ".cdr"
            FilePth = Replace(FilePth, "\\", "\")
            ActiveDocument.SaveAs FilePth, opt

        End If

    Next pags

    Optimization = False

End Sub
Without the bitmap the file saves as 43 kb as an X6 file and 10 times that as an X5 file. Can anyone tell me why having the bitmap causes the file size to balloon? What can I do to keep the file size down? Thanks
Reply With Quote

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
Export Problem with PNG/Transparency and C# with X5 cracknix Macros/Add-ons 4 12-09-2010 23:43
Export to EPS problem, need more functionality Klim CorelDRAW/Corel DESIGNER VBA 0 20-05-2009 11:08
Export to GIF problem norbert_ds CorelDRAW/Corel DESIGNER VBA 1 29-08-2008 16:18
HPGL export problem Anonymous General 1 16-02-2006 10:15
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 04:48.

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