比如,使用Dia画流程图的时候,有时想要从pdf文件中copy一个图片直接粘贴到流程图中,但是dia不支持,只能把图片保存,才可以从文件插入dia中。这样会严重影响效率。
而且这个问题似乎是比较普遍的。notecase, kword, 等等很多办公软件都不支持直接粘贴,但是可以从文件导入图片。
本人对linux还是一知半解,不过感觉这个问题应该不是很麻烦吧。不知道能不能简单修改一下实现直接粘贴的功能?
貌似很多办公软件都不支持对图片的直接粘贴
- steelan
- 帖子: 309
- 注册时间: 2009-04-29 3:50
- steelan
- 帖子: 309
- 注册时间: 2009-04-29 3:50
Re: 貌似很多办公软件都不支持对图片的直接粘贴
mathematica 也有这个问题,然后我看到有人已经解决了。
http://groups.google.com/group/comp.sof ... 3df2d12af7
现在 Klipper 支持图片,只要开启相应选项即可,所以不安装"getclipboardimage" 应该也可以。gnome下面应该也有支持图片的剪贴板。不过我现在还不知道该如何修改一个软件的源码(比如Dia).
http://groups.google.com/group/comp.sof ... 3df2d12af7
I'm running KDE4.2, and Klipper does not paste image data, so dbus is
not an option. I settled on using Qt: you will need the command
"getclipboardimage" installed on your $PATH (Qt 4.4 source code and
instructions available at http://www.phys.ucalgary.ca/~burchill).
Perhaps someone could suggest how to do this from perl or python,
etc...
Adding the "Paste Image" to the edit menu involves editing a user-copy
of $InstallationDirectory/SystemFiles/FrontEnd/TextResources/X/
MenuSetup.tr. Caution: a typo in this file can break mathematica.
Add the following between the &Paste and Clea&r\tDelete menu items:
MenuItem["Paste &Image",
KernelExecute[{Module[{tmpFile, image, file},
tmpFile = ToFileName
[$TemporaryDirectory, "clipboardimagefileformathematica.png"];
DeleteFile[FileNames[tmpFile]];
file = Import["!getclipboardimage "
<> tmpFile, "Lines"];
If[Length[file] > 0, image = Import
[file[[1]], "Image"];
If[Head[image] === Image,
NotebookWrite[InputNotebook[],
Cell[BoxData
[ToBoxes@image],"Output"]]]];]}],
MenuKey["V", Modifiers->{"Control"}], MenuEvaluator-
>Automatic],
Restart mathematica. Try it out by opening a PDF file, selecting an
image and copying it to the clipboard. In a notebook select "Paste
Image" from the Edit menu. This inserts the image in-line.
现在 Klipper 支持图片,只要开启相应选项即可,所以不安装"getclipboardimage" 应该也可以。gnome下面应该也有支持图片的剪贴板。不过我现在还不知道该如何修改一个软件的源码(比如Dia).