On 2013-09-05 22:06, "Georg Baum" <georg.b...@post.rwth-aachen.de> wrote:

>Anders Ekberg wrote:
>
>> Thanks Patrick
>> I think you are on to the reason (see my previous post sent just as I
>>got
>> your reply). But I don't see how to save as a pdf. In the beta1 the only
>> options are png and jpeg and both give 72 dpi resolutions (setting the
>> suffix as pdf results in a file that Preview can't open, but that works
>> with low res in LyX; probably a png).
>
>Patricks finding looks very reasonable to me as well. If PDF is not
>offered 
>for pasting this means that LyX dos not see any PDF on the clipboard. If
>you 
>call LyX with
>
>lyx -dbg action
>
>in a terminal and look for "Found format" you should see whether it finds
>PDF or not. If that does not give any new insight you'd need to run LyX
>in a 
>debugger. The place to look at would be
>GuiClipboard::hasGraphicsContents().

Seems like LyX indeed finds both formats:

frontends/qt4/GuiClipboard.cpp (493): We found 2 formats
frontends/qt4/GuiClipboard.cpp (495): Found format application/pdf
frontends/qt4/GuiClipboard.cpp (495): Found format application/x-qt-image
frontends/qt4/GuiClipboard.cpp (493): We found 2 formats
frontends/qt4/GuiClipboard.cpp (495): Found format application/pdf
frontends/qt4/GuiClipboard.cpp (495): Found format application/x-qt-image
frontends/qt4/GuiClipboard.cpp (493): We found 2 formats
frontends/qt4/GuiClipboard.cpp (495): Found format application/pdf
frontends/qt4/GuiClipboard.cpp (495): Found format application/x-qt-image
frontends/qt4/GuiClipboard.cpp (493): We found 2 formats
frontends/qt4/GuiClipboard.cpp (495): Found format application/pdf
frontends/qt4/GuiClipboard.cpp (495): Found format application/x-qt-image
frontends/qt4/GuiClipboard.cpp (493): We found 2 formats
frontends/qt4/GuiClipboard.cpp (495): Found format application/pdf
frontends/qt4/GuiClipboard.cpp (495): Found format application/x-qt-image
frontends/qt4/GuiApplication.cpp (1263): dispatch msg is Klistra

The pasting in itself does not work when LyX is opened in this way (no
dialogue to save the picture that is pasted is offered).

And I just noticed something interesting:
If I open LyX, go to Preview, copy the image, and then paste there is
indeed a pdf option which gives a high resolution (and for me a low-res
preview).

If I then close LyX, reopens it and pastes the clip (that is still in
memory), there is only the png and jpeg options to paste, and the output
is:
Text3.cpp (470): Text::dispatch: cmd:  action: 13 [paste]  arg: '' x: 0 y:
0
frontends/qt4/GuiClipboard.cpp (493): We found 1 formats
frontends/qt4/GuiClipboard.cpp (495): Found format application/x-qt-image
frontends/qt4/GuiClipboard.cpp (493): We found 1 formats
frontends/qt4/GuiClipboard.cpp (495): Found format application/x-qt-image
frontends/qt4/GuiClipboard.cpp (493): We found 1 formats
frontends/qt4/GuiClipboard.cpp (495): Found format application/x-qt-image
frontends/qt4/GuiClipboard.cpp (493): We found 1 formats
frontends/qt4/GuiClipboard.cpp (495): Found format application/x-qt-image
frontends/qt4/GuiClipboard.cpp (493): We found 1 formats
frontends/qt4/GuiClipboard.cpp (495): Found format application/x-qt-image
frontends/qt4/GuiApplication.cpp (1263): dispatch msg is Klistra

Perhaps this has to do with that I get a SIGSEGV-error when quitting:

lyx(1713,0x7fff76590180) malloc: *** error for object 0x102076338: pointer
being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6


So, in conclusion, with LyX 2.1 the issue is indeed solved if the image is
copied after LyX is opened and the pasted image is saved as a pdf.

Many thanks!

/Anders

 



Reply via email to