The following example shows the effect that this parameter has
on PDF rendering.
[C#]
Doc theDoc = new Doc();
XImage image = new XImage();
image.SetFile(Server.MapPath("../mypics/Shuttle.jpg"));
theDoc.Rect.String = image.Selection.String;
theDoc.AddImage(image);
// Save rendered image as black and white picture using Line spot
function
theDoc.Rendering.UseEmbeddedHalftone = false;
theDoc.Rendering.DotsPerInch = 50;
theDoc.Rendering.ColorSpace = XRendering.ColorSpaceType.Gray;
theDoc.Rendering.BitsPerChannel = 1;
theDoc.Rendering.DefaultHalftone = "Spot,30,100,Line";
theDoc.Rendering.Save(Server.MapPath("RenderingHalftoneLine.png"));
// Save rendered image as black and white picture using Diamond
spot function
theDoc.Rendering.DefaultHalftone = "Spot,0,100,Diamond";
theDoc.Rendering.Save(Server.MapPath("RenderingHalftoneDiamond.png"));
theDoc.Clear();
[Visual Basic]
Dim theDoc As Doc = New Doc()
Dim image As XImage = New XImage()
image.SetFile(Server.MapPath("../mypics/Shuttle.jpg"))
theDoc.Rect.String = image.Selection.String
theDoc.AddImage(image)
' Save rendered image as black and white picture using Line spot
function
theDoc.Rendering.UseEmbeddedHalftone = False
theDoc.Rendering.DotsPerInch = 50
theDoc.Rendering.ColorSpace = XRendering.ColorSpaceType.Gray
theDoc.Rendering.BitsPerChannel = 1
theDoc.Rendering.DefaultHalftone = "Spot,30,100,Line"
theDoc.Rendering.Save(Server.MapPath("RenderingHalftoneLine.png"))
' Save rendered image as black and white picture using Diamond spot
function
theDoc.Rendering.DefaultHalftone = "Spot,0,100,Diamond"
theDoc.Rendering.Save(Server.MapPath("RenderingHalftoneDiamond.png"))
theDoc.Clear()
RenderingHalftoneLine.png
RenderingHalftoneDiamond.png
|
|
|