Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Problem with exporting DrawLine with endArrow to PDF

    Hi,

    We noticed the following in our app and were able to recreate a test case for you:

    http://www.smartclient.com/docs/10.0/a/system/reference/SmartClient_Explorer.html#FSdrawingExport

    Use this code and export to PDF and you'll see the arrowhead is missing:

    Code:
    var mainPane = isc.DrawPane.create({
        autoDraw: false,
        showEdges: true,
        width: 400,
        height: 400,
        canDrag: true
    });
    
    
    
    
    
    
        isc.DrawLine.create({
            autoDraw:    true,
            drawPane:    mainPane,
            lineWidth:   20,
            lineColor:"#002A68",
            linePattern: "solid", 
            lineCap:     "butt",
            startArrow: null,
            endArrow: "block",
            startPoint:  [8, 50],
            endPoint:    [118, 50]
        });
    
    
    
    
    
    var form = isc.DynamicForm.create({
        autoDraw: false,
        topPadding: 5,
        width: 300,
        numCols: 2,
        items: [{
            name: "format",
            type: "select",
            title: "Export format",
            valueMap: {
                "png": "PNG",
                "jpeg": "JPEG",
                "pdf": "PDF"
            },
            required: true,
            defaultValue: "png",
    
            changed : function (form, item, value) {
                var format = value;
    
                var qualityItem = form.getItem("quality");
                if (format == "jpeg") qualityItem.show();
                else qualityItem.hide();
    
                form.getItem("_saveButton").setTitle(format == "pdf" ? "Save" : "Save Image");
            }
        }, {
            name: "quality",
            type: "integer",
            title: "JPEG quality",
            editorType: "slider",
            minValue: 0,
            maxValue: 100,
            numValues: 21,
            defaultValue: 80,
            showIf: "form.getValue('format') == 'jpeg'",
            titleVAlign: "top",
            colSpan: 2,
            height: 50,
            required: true
        }, {
            name: "_saveButton",
            title: "Save",
            type: "button",
    
            click : function (form) {
                var format = form.getValue("format");
                if (format == "pdf") {
                    isc.RPCManager.exportContent(mainPane, {
                        exportDisplay: "download",
                        exportFilename: "masterpiece"
                    });
                } else {
                    isc.RPCManager.exportImage(mainPane.getSvgString(), {
                        exportDisplay: "download",
                        exportImageFormat: format,
                        exportImageQuality: form.getValue("quality")/100,
                        exportFilename: "masterpiece"
                    });
                }
            }
        }]
    });
    
    var layout = isc.HLayout.create({
        membersMargin: 20,
        members: [mainPane, form]
    });

    #2
    Thanks for the notification - we've assigned this to a developer for investigation

    Regards
    Isomorphic Software

    Comment


      #3
      Turned out this was an already-fixed issue in the 10.1 branch. We've now backported the fix to 10.0. Please try the next nightly build dated April 3 or above

      Regards
      Isomorphic Software

      Comment

      Working...
      X