Paste pdf from clipboard into a Nisus document

Everything related to our flagship word processor.
Post Reply
Axbax
Posts: 9
Joined: 2017-02-04 11:55:59

Paste pdf from clipboard into a Nisus document

Post by Axbax » 2017-05-10 10:22:49

Hi,
I am trying to copy a model from a pdf in PDF Expert into my Nisus document. It copies it as a pdf file (jpg or png is not an option) and when I paste it into Nisus it inserts this link: file:///var/folders/py/2kmw7rnj7jb2rxv855zjj5mh0000gp/T/.pdfExpertClipboard.pdf

Is there any way to make Nisus paste the pdf as an image? Word and Keynote both do this without any problems.

Thanks,
Kenneth

adryan
Posts: 205
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Paste pdf from clipboard into a Nisus document

Post by adryan » 2017-05-10 13:41:34

G’day, Kenneth et al

This is explained on Page 152 of the Nisus Writer Pro User Guide.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Sierra 10.12.6
Nisus Writer user since 1996

Axbax
Posts: 9
Joined: 2017-02-04 11:55:59

Re: Paste pdf from clipboard into a Nisus document

Post by Axbax » 2017-05-11 10:40:57

Thanks, Adrian. Very kind of you, but I don't think it quite explains my issue. The description in the user guide concerns importing images (i.e. files) and this works for me. But it is when I follow the description of importing an image using the Clipboard I experience problems. The guide simply says:

1. Select the image in another application, and choose the menu command Edit > Copy.
2. Open your Nisus Writer Pro document and choose the menu command Edit > Paste.

But this just inserts a link (see my previous post) and not the image. I could of course make a new document in PDF Expert, paste the image into this and save it as a file on my desktop, and then open Nisus and choose import image and find the file - but it would be soooo much easier to press cmd c -> cmd v.
Am I missing a setting in Nisus that would allow me to do this? Or could this be a bug to fix? Or something for the development team to consider in the future? I'd appreciate any suggestions...

Thanks,
Kenneth

adryan
Posts: 205
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Paste pdf from clipboard into a Nisus document

Post by adryan » 2017-05-11 15:46:11

G’day, Kenneth et al

I did some experiments, and Copy-and-Paste works for me — up to a point.

I copied the whole of a one-page PDF document (from Preview) and pasted it into a NWP document. The formatting was not identical, in that text that appeared to the left of an image in the PDF document appeared below the image in the NWP document. The discrepancy may not be due to NWP because there is obviously a chain of events here, and Apple’s handling of PDF documents is known to have had problems. One has to remember, too, that the whole point of a PDF document is to preserve the original formatting of the document used to create it: deconstruction is a secondary issue.

I copied and pasted just the image from the PDF document. In the PDF document, sloping straight lines led from various parts of the text on the left to various parts of a graphic image on the right. The lines and the graphic image were embedded as a single image which clearly overlaid some of the text (perhaps accounting for the discrepancy mentioned in the previous paragraph?). When this single image was copied and pasted into a NWP document, the straight lines appeared jagged.

I imported the whole PDF document into NWP via Insert > Image, with and without “Include copy of image data in document” enabled, but with “Link to file” enabled each time. The result looked like the original.

When I trashed the original PDF file, all the NWP documents retained their version of it, with the exception of the import that had “Include copy of image data in document” disabled. In this last case, it was obvious that a link had been broken.

So, apart from the above-mentioned discrepancies, all works for me as I expected, at least as far as the link situation is concerned.

With regards to Kenneth’s situation, I can only think there must be some way in which the Copy command is handled by PDF Expert that is causing his problem. But then I can’t explain the different behavior he is experiencing with Word and Keynote.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Sierra 10.12.6
Nisus Writer user since 1996

User avatar
martin
Official Nisus Person
Posts: 4384
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Paste pdf from clipboard into a Nisus document

Post by martin » 2017-05-11 15:48:30

Hi Kenneth: this looks like a bug to me. PDF Expert writes the copied PDF data to a temp file, and passes that file's path to Nisus Writer via the clipboard. Nisus Writer tries to read that PDF file, but it cannot due to sandboxing, so it inserts the link instead.

That said, PDF Expert also includes the PDF data on the clipboard, in addition to the file path. Nisus Writer should probably prioritize that in the first place, and just insert the image. I'll have us take a look at getting this fixed for some future update, thank you.

User avatar
martin
Official Nisus Person
Posts: 4384
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Paste pdf from clipboard into a Nisus document

Post by martin » 2017-05-11 15:54:10

adryan wrote:I did some experiments, and Copy-and-Paste works for me — up to a point.

I copied the whole of a one-page PDF document (from Preview) and pasted it into a NWP document.
...
With regards to Kenneth’s situation, I can only think there must be some way in which the Copy command is handled by PDF Expert that is causing his problem.
Hi Adrian: the difference is certainly due to using PDF Expert vs Apple's Preview. When Preview places some data on the clipboard it just includes the PDF data; it doesn't bother writing the copied content to a temp file and placing that temp file's path on the clipboard. PDF Expert's behavior seems a little strange to me, but they probably do it to enable compatibility with other applications, or something like that.

Vanceone
Posts: 123
Joined: 2013-05-03 07:06:31

Re: Paste pdf from clipboard into a Nisus document

Post by Vanceone » 2017-05-15 15:46:37

As a note here, I frequently have to copy and paste pages from PDF's into my document (rather laboriously, as you cannot copy more than one page at a time). So (usually using Preview here) I sometimes just get a link as well, instead of the PDF page. I've found that Nisus pastes just a "link to this document" if I don't click just right in Preview; it mostly happens if I have more than one page on the screen. So there is something a bit fiddly from Preview, perhaps the same issue comes from PDF Expert?

Axbax
Posts: 9
Joined: 2017-02-04 11:55:59

Re: Paste pdf from clipboard into a Nisus document

Post by Axbax » 2017-05-15 23:54:29

Thank you all. Hope you are able to make this run more smoothly in a future update, Martin.

adryan
Posts: 205
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Paste pdf from clipboard into a Nisus document

Post by adryan » 2017-05-16 05:14:19

G’day, all

More experiments.

If you open a PDF document in Preview, the Copy command in the Edit menu is always available (ie, it is not greyed out), even if you have selected nothing. Looking in the Sidebar, one sees that Preview seems to consider one or more pages selected anyway.

If you Copy (any number of pages) and then Finder > Edit > Show Clipboard, all you see is a path. Curiously, the path remains the same, regardless of which page(s) you copy. (But this explains some of the behavior noted below.)

A simple Paste into a Nisus Writer document results in the insertion of a clickable link which opens the Preview document when clicked. Paste Text Only results in the insertion of an explicit path.

Copy-and-Paste of any number of thumbnails from a PDF document in Preview to a Pages document results in only the first page (not a link thereto) of the Preview document’s being inserted into the Pages document; the result appears identical to the original.

Drag-and-drop of a thumbnail from a PDF document in Preview to a Nisus Writer document only results in something being inserted if the PDF document consists of a single page. (Dragging a single thumbnail from a multi-page document results in nothing being inserted.) The same is true of drag-and-drop from Preview to a Pages document. However, in the case of Nisus Writer what is inserted does not necessarily look identical to the original, whereas with Pages it does.

Drag-and-drop from Preview to a Finder window works as expected.

So, it appears that incorporating a PDF document (from Preview anyway) is more straightforward in Pages than in Nisus Writer, but only if a single page is involved. Given that this is insufficient reason to move to Pages, I can think of three ways of proceeding:–

(1) Bundle a Nisus Writer document and a Preview document in a single folder, with links or other references connecting the two.
(2) Split the Preview document into single pages (eg, using an Automator action), then Export each required page as an image file that can more easily be incorporated into a Nisus Writer document. (There are various options for this whole process, but I won’t bother elaborating here.) The result would be a single Nisus Writer document.
(3) Convert the Nisus Writer document to a PDF document and insert (in Preview) pages from the original PDF document where appropriate. The result would be a single Preview document.

Each of these methods has its advantages and disadvantages. Appropriate choice will probably be dictated by the stage of production of the manuscript and its intended use at that stage.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Sierra 10.12.6
Nisus Writer user since 1996

User avatar
martin
Official Nisus Person
Posts: 4384
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Paste pdf from clipboard into a Nisus document

Post by martin » 2017-05-16 16:37:23

Thanks for the additional feedback on moving PDF pages from Preview to Nisus Writer. We'll take a look at fixing situations where links are incorrectly inserted there too.
adryan wrote:Drag-and-drop of a thumbnail from a PDF document in Preview to a Nisus Writer document only results in something being inserted if the PDF document consists of a single page. (Dragging a single thumbnail from a multi-page document results in nothing being inserted.) The same is true of drag-and-drop from Preview to a Pages document. However, in the case of Nisus Writer what is inserted does not necessarily look identical to the original, whereas with Pages it does.
Dragging a PDF page thumbnail to Nisus Writer will result in textual extraction, instead of a PDF image. That's why the inserted content does not appear identical. It's actually regular editable formatted text.

adryan
Posts: 205
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Paste pdf from clipboard into a Nisus document

Post by adryan » 2017-05-16 20:03:51

G’day, all

Thanks, Martin.

Link, extracted text, PDF image: there are probably uses for all of these. For a word processor, textual extraction is probably the most important. PDF image starts to get into the area of desktop publishing. It would be nice to be able to choose the form of importation appropriate for the purpose at hand.

At the risk of repeating myself, though, it is far more important for a word processor to offer split view into a single word processor document than it is to offer many (or even any!) ways of importing content from a PDF document.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Sierra 10.12.6
Nisus Writer user since 1996

Vanceone
Posts: 123
Joined: 2013-05-03 07:06:31

Re: Paste pdf from clipboard into a Nisus document

Post by Vanceone » 2017-05-23 04:44:36

Adryan's results suggest that you cannot copy say, page 4 of a PDF from Preview and insert that into a Nisus document. I've found that it is tricky, but in fact it can be done.

So here's what I've found in my attempts to copy multiple pages of a PDF document into a Nisus one.

In Preview, what you get copied all depends on what is visible on the page. Note: I am on El Capitan, and I know that Sierra's PDFKit was broken, so there may well be bugs I don't know about.

But for me, if the Preview window is showing parts of two pages, I cannot click on the second page--the bottom one of the two-- and hit copy. If I do, I get the text link. Selecting any thumbnail page in the sidebar gets me a text link. Selecting any text, graphics, etc on the PDF either copies the text or graphic, or it gives me the text link if I try to drag and drop. Drag and drop always gives me a text link.

However, if I have one page and one page only visible, or it's the top page and like 80% visible, a single click in the margin of the PDF and then command-c for copy does in fact copy the page and I can insert it via the paste command into Nisus. Sometimes it is tricky to arrange the page on the screen in Preview just right--anything wrong will just give you the text link.

So my method for copying a multiple page PDF is to start with page one, click and copy and paste, then in Preview scroll the screen so that page 2 is only on the screen, then click and copy and paste, and then move to page 3, etc.

It's finicky but so far it works. Laborious, though. I've noticed that usually the first copy is the hardest -- it's the one most likely to give a text link. Once Preview seems to figure out I want a copy of the page it goes smoother--but that may well be a placebo effect.

I'd love a "Insert PDF" command that just inserted a PDF file into the Nisus document, page by page. It may be something that can be achieved via a Macro that uses Applescript? Or would sandboxing prevent it?

adryan
Posts: 205
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Paste pdf from clipboard into a Nisus document

Post by adryan » 2017-05-23 06:13:27

G’day, Vanceone et al

As in all computer(life?)-related things, if you can find a procedure that works for you, that’s good.

I previously wrote: “Dragging a single thumbnail from a multi-page document results in nothing being inserted.”

I have just checked this again with a different multi-page PDF document in Preview. This time, dragging a single thumbnail into a NWP document does work as expected. Multiple thumbnails still don’t.

It’s all just too unpredictable.

I think I’d try drag-and-drop first. If it worked, and I was sure the result was a “proper” insertion and not just a link, I’d count myself lucky that time and continue on, as it’s so easy. If it didn’t work, I’d consider which of my “three ways of proceeding” seemed most appropriate for the occasion.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Sierra 10.12.6
Nisus Writer user since 1996

Post Reply