Object Model Reference : Classes : P : PrintPostScript : Properties : PrintPostScript.JPEGCompression |
Property JPEGCompression As Boolean
Member of PrintPostScript
The JPEGCompression property returns or specifies whether to compress the bitmaps in a print job.
• |
You can use the JPEGQuality property to specify the quality of the
compression.
|
The following VBA example creates a rectangle, an ellipse, and a polygon. It fills each of them with a texture fill and converts them to bitmaps. JPEG compression is disabled, and the document is printed. Then JPEG compression is enabled, the quality of the compression is set, and the document is printed again.
Sub Test() |
Dim shRect As Shape |
Set shRect = ActiveLayer.CreateRectangle(1.114882, 10.078268, 3.030787, 8.485827, 0, 0, 0, 0) |
Dim shEllipse As Shape |
Set shEllipse = ActiveLayer.CreateEllipse(4.075827, 7.540315, 6.016614, 5.375591, 90#, 90#, False) |
Dim shPolygon As Shape |
Set shPolygon = ActiveLayer.CreatePolygon(5.842445, 2.912283, 7.758343, 0.44898, 5, 1, 1, False, 50, 100) |
With shPolygon.Fill.ApplyTextureFill("Alien Eyes", "Samples 9") |
.SetProperties 3281, 2, 0, 150, 25, 1, CreateRGBColor(25, 0, 73), CreateRGBColor(229, 255, 0), 0 |
.MaximumTileWidth = 2049 |
.TransformWithShape = True |
.MirrorFill = False |
.TileOffsetType = cdrTileOffsetRow |
.TileOffset = 0 |
.Resolution = 300 |
.RotationAngle = 0# |
.SkewAngle = 0# |
.TileHeight = 2.228083 |
.TileWidth = 1.822134 |
.OriginX = 0# |
.OriginY = 0# |
End With |
shPolygon.ConvertToBitmap , , , False, 150 |
With shEllipse.Fill.ApplyTextureFill("Disco Nightmare", "Samples 9") |
.SetProperties 4641, 0, 100, 0, 100, CreateRGBColor(51, 0, 204), CreateRGBColor(255, 102, 0), 0 |
.MaximumTileWidth = 2049 |
.TransformWithShape = True |
.MirrorFill = False |
.TileOffsetType = cdrTileOffsetRow |
.TileOffset = 0 |
.Resolution = 300 |
.RotationAngle = 0# |
.SkewAngle = 0# |
.TileHeight = 2.164724 |
.TileWidth = 1.940787 |
.OriginX = 0# |
.OriginY = 0# |
End With |
shEllipse.ConvertToBitmap , , , False, 150 |
With shRect.Fill.ApplyTextureFill("Solder", "Samples 9") |
.SetProperties 19195, 60, 0, 75, 25, 100, 50, 50, CreateRGBColor(25, 25, 255), CreateRGBColor(0, 0, 0), CreateRGBColor(255, 255, 255), 0 |
.MaximumTileWidth = 2049 |
.TransformWithShape = True |
.MirrorFill = False |
.TileOffsetType = cdrTileOffsetRow |
.TileOffset = 0 |
.Resolution = 300 |
.RotationAngle = 0# |
.SkewAngle = 0# |
.TileHeight = 2.662362 |
.TileWidth = 1.84126 |
.OriginX = 0.000008 |
.OriginY = 0.000004 |
End With |
shRect.ConvertToBitmap , , , False, 150 |
With ActiveDocument |
.PrintSettings.PostScript.JPEGCompression = False |
.PrintOut |
.PrintSettings.PostScript.JPEGCompression = True |
.PrintSettings.PostScript.JPEGQuality = 100 |
.PrintOut |
End With |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.