用Visio画图,保存为pdf,只保存图部分,不含多余空白区域。

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_33783896/article/details/86174579

通过以下方式导出只包含绘图部分的:

1. 设计->大小,适应绘图。


2. 文件->导出,导出为pdf格式。

上面两部即可得到只包含图的部分的pdf格式。

 

 

一般就满足要求了,但是里面默认有6mm上下左右的白色部分。可以通过以下方式设置:


1. 文件->选项->自定义功能区->主选项卡,勾选开发工具,点击确定。

2. 制图完毕后,点击开发工具->显示ShapeSheet->页,将Print Properties,PageLeftMargin,PageRightMargin,PageTopMargin,PageBottomMargin全部设置为0。

 

 

展开阅读全文

visio 画图

03-24

我第一次用代码画visio图形,不熟。想用代码在visio里画一个带有三个拐点的折线,但是画出来只有一个拐点,只有起止点跟第二个点,其他的都没有,请大侠指点。我的部分代码如下:rnpublic void Line()rn rn //long UndoScopeID2;rn //UndoScopeID2 = visApplication.BeginUndoScope("手动编辑");rnrn this.visApplication.Documents.OpenEx(@"F:\Data\Temp\绘图2.vsd", (short)Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visOpenDocked + (short)Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visOpenRO);rn Master master = visApplication.Documents[@"F:\Data\Temp\绘图2.vsd"].Masters.get_ItemU("Dynamic connector");rn rn // Master master = this.visApplication.ActiveDocument.Masters.get_ItemU("Dynamic connector");rn rnrn Microsoft.Office.Interop.Visio.Shape connector = this.visApplication.ActivePage.Drop(master, 0.0, 0.0);rn //TODO 坐标转换rn //设置如果两条线相交错开rn connector.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowShapeLayout, (short)VisCellIndices.visSLOConFixedCode).FormulaForceU = "3";rn rn //宽度rn //connector.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowXFormOut, (short)VisCellIndices.visXFormWidth).FormulaForceU = "GUARD(1.0433070866142)";rn ////高度rn //connector.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowXFormOut, (short)VisCellIndices.visXFormHeight).FormulaForceU = "GUARD(-0.80708661417323)";rn //设置起始点X轴坐标位置rn connector.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowXForm1D, (short)VisCellIndices.vis1DBeginX).FormulaForceU = "75 mm";//"57 mm";rn //设置起始点Y轴坐标位置rn connector.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowXForm1D, (short)VisCellIndices.vis1DBeginY).FormulaForceU = "140 mm";//"243.5 mm";rn //设置终点X轴坐标位置rn connector.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowXForm1D, (short)VisCellIndices.vis1DEndX).FormulaForceU = "125 mm";//"83.5 mm";rn //设置终点Y轴坐标位置rn connector.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowXForm1D, (short)VisCellIndices.vis1DEndY).FormulaForceU = "103.5 mm";//"213 mm";rnrn //connector.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowTextXForm, (short)VisCellIndices.visXFormPinX).FormulaForceU = "0.17339654204";rnrn //connector.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowTextXForm, (short)VisCellIndices.visXFormPinX).FormulaForceU = "-0.99737991956634";rn //设置连接线rn connector.get_CellsSRC((short)VisSectionIndices.visSectionFirstComponent, 1, 0).FormulaForceU = "0";rn connector.get_CellsSRC((short)VisSectionIndices.visSectionFirstComponent, 1, 1).FormulaForceU = "0";rn connector.get_CellsSRC((short)VisSectionIndices.visSectionFirstComponent, 2, 0).FormulaForceU = "0.59055118110236";rn connector.get_CellsSRC((short)VisSectionIndices.visSectionFirstComponent, 2, 1).FormulaForceU = "-0.71850393700787";rn connector.get_CellsSRC((short)VisSectionIndices.visSectionFirstComponent, 3, 0).FormulaForceU = "-8.8817841970013e-16";rn connector.get_CellsSRC((short)VisSectionIndices.visSectionFirstComponent, 3, 1).FormulaForceU = "-1.4370078740157";rn connector.get_CellsSRC((short)VisSectionIndices.visSectionFirstComponent, 4, 0).FormulaForceU = "0.98425196850394";rn connector.get_CellsSRC((short)VisSectionIndices.visSectionFirstComponent, 4, 1).FormulaForceU = "-1.7716535433071";rn connector.get_CellsSRC((short)VisSectionIndices.visSectionFirstComponent, 5, 0).FormulaForceU = "1.9685039370079";rn connector.get_CellsSRC((short)VisSectionIndices.visSectionFirstComponent, 5, 1).FormulaForceU = "-1.4370078740157";rnrn 论坛

没有更多推荐了,返回首页