79496862

Date: 2025-03-10 01:59:41
Score: 1
Natty:
Report link

Thanks, it helps me. I had rectified the issue and here's the appearance stream that I need to include to my existing code:

    // Create Appearance Stream
    PdfFormXObject appearance = new PdfFormXObject(rect);
    PdfCanvas canvas = new PdfCanvas(appearance, page.GetDocument());

    canvas.SetLineWidth(strokewidth);
    canvas.SetStrokeColor(colour);
    canvas.MoveTo(points[0], points[1]);
    for (int i = 2; i < points.Length; i += 2)
    {
        canvas.LineTo(points[i], points[i + 1]);
    }
    canvas.Stroke();
    canvas.Release();

    // Set the annotation appearance
    polyline.SetAppearance(PdfName.N, appearance.GetPdfObject());
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: MiaoWin