[R-SIG-Mac] Embedding PDF documents created in R in Word documents

Marc Schwartz marc_schwartz at me.com
Tue Mar 27 19:56:38 CEST 2018


Hi Dennis,

Sounds like it is time to shift the communications to MS support. Perhaps providing them with application/OS version details and copies of the relevant files will enable some debugging on their end.

Still not sure why I am not experiencing the behavior...

Regards,

Marc


> On Mar 27, 2018, at 1:43 PM, Dennis Fisher <fisher at plessthan.com> wrote:
> 
> Mark
> 
> The two computers that exhibit this are both from 2017.  The one that works correctly is a bit older. 
> Now that it is reasonably clear that R is doing the right thing, the question is how to fix this in Office.
> 
> I just tried one more thing — I have an RTF document with embedded JPEGs that was created on one of the problem computers.  I just opened the document on a fourth computer (purchased in 2013) running El Capitan.   In Word 2016, half-size; in Word 2008, full size.  So, Word appears to be the culprit, although not consistently.
> 
> Dennis
>  
> Dennis Fisher MD
> P < (The "P Less Than" Company)
> Phone / Fax: 1-866-PLessThan (1-866-753-7784)
> www.PLessThan.com <http://www.plessthan.com/>
> 
> 
> 
> 
>> On Mar 27, 2018, at 5:25 PM, Marc Schwartz <marc_schwartz at me.com <mailto:marc_schwartz at me.com>> wrote:
>> 
>> Interesting.
>> 
>> Given that I am not [yet] experiencing this behavior, which has a retina display (mid 2014 15-inch MBP), it makes me wonder if there was some level of corruption in the upgrade to Office via the Autoupdate tool from MS. Unless both of you have much more recent hardware by chance...
>> 
>> Dennis, have you tried to do an uninstall of Office and a clean re-install?
>> 
>> Regards,
>> 
>> Marc
>> 
>> 
>>> On Mar 26, 2018, at 10:38 PM, Colin A. Smith <colin at colinsmith.org <mailto:colin at colinsmith.org>> wrote:
>>> 
>>> Hello,
>>> 
>>> I’m seeing the exact same behavior on my version of Word (16.11.1 - 180319). It only happened in the last month or two, so I was suspecting it had something to do with this recent change:
>>> 
>>> https://arstechnica.com/gadgets/2018/01/office-for-mac-finally-has-real-time-collaboration-in-16-9-0-update/ <https://arstechnica.com/gadgets/2018/01/office-for-mac-finally-has-real-time-collaboration-in-16-9-0-update/> <https://arstechnica.com/gadgets/2018/01/office-for-mac-finally-has-real-time-collaboration-in-16-9-0-update/ <https://arstechnica.com/gadgets/2018/01/office-for-mac-finally-has-real-time-collaboration-in-16-9-0-update/>>
>>> 
>>> It seems like that could be pretty a pretty major under the hood change to me. I thought it could have something to do retina/non-retina 2X scaling.
>>> 
>>> Cheers,
>>> 
>>> Colin
>>> 
>>>> On Mar 26, 2018, at 16:49, Marc Schwartz <marc_schwartz at me.com <mailto:marc_schwartz at me.com>> wrote:
>>>> 
>>>> Hi Dennis, 
>>>> 
>>>> Very strange.
>>>> 
>>>> Perhaps you might consider completely removing all Office components and doing a fully clean install? 
>>>> 
>>>> If the PDF that I sent exhibited the same behavior as one you create locally, that would tend to suggest that the problem is not your R installation.
>>>> 
>>>> More info here:
>>>> 
>>>> https://support.office.com/en-us/article/uninstall-office-2016-for-mac-eefa1199-5b58-43af-8a3d-b73dc1a8cae3 <https://support.office.com/en-us/article/uninstall-office-2016-for-mac-eefa1199-5b58-43af-8a3d-b73dc1a8cae3> <https://support.office.com/en-us/article/uninstall-office-2016-for-mac-eefa1199-5b58-43af-8a3d-b73dc1a8cae3 <https://support.office.com/en-us/article/uninstall-office-2016-for-mac-eefa1199-5b58-43af-8a3d-b73dc1a8cae3>>
>>>> 
>>>> 
>>>> Regards,
>>>> 
>>>> Marc
>>>> 
>>>>> On Mar 26, 2018, at 3:06 PM, Dennis Fisher <fisher at plessthan.com <mailto:fisher at plessthan.com>> wrote:
>>>>> 
>>>>> Marc
>>>>> 
>>>>> Office is fully updated (see version as yours)
>>>>> Original size is 1/2 of the intended size.
>>>>> When the drag the file to TextEdit, the size is as intended!
>>>>> So, the mystery continues.
>>>>> 
>>>>> Dennis
>>>>> 
>>>>> Dennis Fisher MD
>>>>> P < (The "P Less Than" Company)
>>>>> Phone / Fax: 1-866-PLessThan (1-866-753-7784)
>>>>> www.PLessThan.com <http://www.plessthan.com/> <http://www.plessthan.com/ <http://www.plessthan.com/>>
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Mar 26, 2018, at 10:21 AM, Marc Schwartz <marc_schwartz at me.com <mailto:marc_schwartz at me.com> <mailto:marc_schwartz at me.com <mailto:marc_schwartz at me.com>>> wrote:
>>>>>> 
>>>>>> Hi Dennis,
>>>>>> 
>>>>>> I reviewed the Preference settings in Word and did not see anything that to my eye would be relevant to default embedded object sizes.
>>>>>> 
>>>>>> You might check to be sure that your Office installation is fully updated. There have been several updates of late. My Word is showing version 16.11.1 (180319) in the About Word dialog.
>>>>>> 
>>>>>> Also, right click on the embedded PDF in Word and check "Size and Position...". On the "Size" tab, see what the dialog box is showing for "Original size" at the bottom, and be sure that "Scale" is set to 100% for both height and width.
>>>>>> 
>>>>>> Regards,
>>>>>> 
>>>>>> Marc
>>>>>> 
>>>>>>> On Mar 26, 2018, at 12:01 PM, Dennis Fisher <fisher at plessthan.com <mailto:fisher at plessthan.com> <mailto:fisher at plessthan.com <mailto:fisher at plessthan.com>>> wrote:
>>>>>>> 
>>>>>>> Marc
>>>>>>> 
>>>>>>> Thanks for trying this.  
>>>>>>> 
>>>>>>> Your PDF exhibited the problematic behavior (half-size).  It appears that we are using the same version of the OS.  We are using the same generation of Word (Office Home & Business 2016 for Mac (Work At Home)) although there are probably several versions of Office floating around.  This left the version of R — but I can confirm the same problematic behavior with R 3.4.4.
>>>>>>> 
>>>>>>> Of note, this behavior exists on two different OS X machines but a third computer with OS X 13.2 works correctly.  
>>>>>>> Also, when I use R to create an RTF document that contains JPEG images, the same problem happens.  
>>>>>>> 
>>>>>>> I am at a loss — perhaps there is something weird about my version of Office or some preference that is set incorrectly.
>>>>>>> 
>>>>>>> Dennis
>>>>>>> 
>>>>>>> Dennis Fisher MD
>>>>>>> P < (The "P Less Than" Company)
>>>>>>> Phone / Fax: 1-866-PLessThan (1-866-753-7784)
>>>>>>> www.PLessThan.com <http://www.plessthan.com/> <http://www.plessthan.com/ <http://www.plessthan.com/>>
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>> On Mar 26, 2018, at 8:33 AM, Marc Schwartz <marc_schwartz at me.com <mailto:marc_schwartz at me.com> <mailto:marc_schwartz at me.com <mailto:marc_schwartz at me.com>>> wrote:
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> On Mar 26, 2018, at 11:11 AM, Dennis Fisher <fisher at plessthan.com <mailto:fisher at plessthan.com> <mailto:fisher at plessthan.com <mailto:fisher at plessthan.com>>> wrote:
>>>>>>>>> 
>>>>>>>>> R 3.4.3
>>>>>>>>> OS X 13.3
>>>>>>>>> 
>>>>>>>>> Colleagues
>>>>>>>>> 
>>>>>>>>> I have encountered surprising behavior in the following circumstance:
>>>>>>>>> 
>>>>>>>>> 1.  I create a one-page PDF in R.  The command might be:
>>>>>>>>> 	pdf(“/path/to/file”, width=5, height=3.5)
>>>>>>>>> 
>>>>>>>>> 2.  When I open the PDF in Preview, the “inspector” confirms the intended size.
>>>>>>>>> 
>>>>>>>>> 3.  I embed the PDF into Word for Mac (the newest version).  I accomplish this in one of several ways, all leading to the same outcome:
>>>>>>>>> 	a.  I drag the icon into Word
>>>>>>>>> 	b.  I copy the thumbnail and paste into Word
>>>>>>>>> 	c.  I drag the thumbnail into Word
>>>>>>>>> 
>>>>>>>>> 4.  Previously, after the page was embedded, the size matched the specifications (5 x 3.5, in this instance). Now, the width is one-half of the intended size.
>>>>>>>>> 
>>>>>>>>> 5.  Interestingly, when I drag the thumbnail into Word, the image appears twice
>>>>>>>>> 
>>>>>>>>> I suspect that the problem is in Word, rather than R, but I am curious as to whether anyone has encountered this and has a solution.
>>>>>>>>> 
>>>>>>>>> Dennis
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Hi Dennis,
>>>>>>>> 
>>>>>>>> Try it with the attached PDF, created with:
>>>>>>>> 
>>>>>>>> pdf("test.pdf", width = 5, height = 3.5)
>>>>>>>> plot(1:5)
>>>>>>>> dev.off()
>>>>>>>> 
>>>>>>>> I am using R 3.4.4 on macOS 10.13.3, with Word 2016.
>>>>>>>> 
>>>>>>>> When I drag the pdf file from my desktop into Word, or the thumbnail from Preview, the size of the embedded object is correct and I get the correct preview image of the plot in Word.
>>>>>>>> 
>>>>>>>> If I copy and paste the thumbnail into Word, it has the correct size, the but preview image in Word appears to be bitmapped, instead of vector, so the quality of the image in Word is not as good. Similar to what one might see embedding an EPS file in Word.
>>>>>>>> 
>>>>>>>> Also, if I "Insert" object from the Word menu, and select the PDF file, I get the correct size and the vector based image.
>>>>>>>> 
>>>>>>>> Regards,
>>>>>>>> 
>>>>>>>> Marc Schwartz
>>>>>>>> 
>>>>>>>> 
>>>>>>>> <test.pdf>
>>>>>>> 
>>>>>> 
>> 
> 


	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list