Preview issue (native and embedded via Safari) wth cut-paste and nested curly braces

Environment:
    OS X 10.6.8
    Preview 5.0.3 (504.1)
    Updates:  current as of 0800 CDT 24 Jul 2011
         -- updates issued on 24 Jul 2011 are being applied but the changelog(s) do not mention this issue
    Any PDF document containing code fragments which have more than 1 level of curly-brace
Issue:
    Pasted text copied from PDF files is produced with lines out of order, line wrap and string breaks
    in unexpected locations, and partial lines appended in unexpected ways.  This appears to be an
    issue with Preview since it can be reproduced by opening appropriate PDF content either in Preview
    or Safari with the canonical Preview support for PDF documents.
To Reproduce:
    1.  Open the PDF with Preview or Safari
     2.  Position and size the viewing window to avoid any display-pane-induced line wrapping.
    2.  Drag-select the code block and paste into another document, the following have been tried with identical results:
        - OpenOffice (writer) 3.3.0 (OOO330m20 Build 9567)
         - Terminal 2.1.2 (273.1) (into a vi session in "insert" mode)
Results:
    1.  Original end-of-line positions are not preserved.
    2.  Line-wrap not preserved in original *or* visual aspects.
    3.  Lines trailing the first closing curly brace for the first curly brace pair at greater than nesting=2 are out of order.
Example:
    original text:  PDF download of O'Rielly document "JavaScript Cookbook"
     origin:  downloaded from O'Rielly web site, 2011-07-24@15:49
        MD5 (JavaScript_Cookbook.pdf) = 9c6463ac28377bb69230536266369ccb
     source lines:  page 335, lines 5-30
          <body>
          <svg:svg width="600" height="600">
               <script type="text/ecmascript">
                     <![CDATA[
                         // set element onclick event handler
                          window.onload=function () {
                              var square = document.getElementById("square");
                              // onclick event handler, change circle radius
                               square.onclick = function() {
                                   var color = this.getAttribute("fill");
                                   if (color == "#ff0000") {
                                        this.setAttribute("fill","#0000ff");
                                   } else {
                                        this.setAttribute("fill","#ff0000");
                    ]]>
               </script>
               <svg:rect id="square" width="400" height="400" fill="#ff0000"
               x="10" y="10" />
          </svg:svg>
          <body>
Copying this text from PDF form -- either in Preview or in Safari wth Preview doing the heavy lifting -- and pasting into a Terminal window running 'vi' in "insert" mode yields this:
          <body> <svg:svg width="600" height="600">
          <script type="text/ecmascript"> <![CDATA[
          // set element onclick event handler window.onload=function () {
          } ]]>
          </script>
          var square = document.getElementById("square");
          // onclick event handler, change circle radius square.onclick = function() {
          var color = this.getAttribute("fill"); if (color == "#ff0000") {
          this.setAttribute("fill","#0000ff"); } else {
          this.setAttribute("fill","#ff0000");
          <svg:rect id="square" width="400" height="400" fill="#ff0000" x="10" y="10" />
          </svg:svg> </body>
NOTE THAT LINE SEQUENCE 3-4-5-6 OF THE PASTED TEXT CORRESPONDS TO LINES 6-21-20-22 OF THE ORIGINAL TEXT.

Shocking.
But best to let Apple know of any issues. We're just users here.
If your part of the ADC then bugreporter.

Similar Messages

  • Ios7 bookamrking web application to home screen via Safari crashes after login and when we try to open any link inside. Can anyone please tell me if there is any scheduled fix for this bug in safari?

    ios7 bookmarking web application to home screen via Safari, crashes after login and when we try to open any link inside from the icon that gets created on the home screen. Can anyone please tell me if there is any scheduled fix for this bug in safari?
    From what i understand i see that - Cookies are not transferred between your website and your webapp when installing the icon on the home screen (for authentication purposes for example). It was working until 6.1 and now it’s not working anymore.
    Can someone please tell me if this bug will be fixed in any future release, if so the ticket number of some kind that i can track, or if there is a workaround for this issue?

    ios7 bookmarking web application to home screen via Safari, crashes after login and when we try to open any link inside from the icon that gets created on the home screen. Can anyone please tell me if there is any scheduled fix for this bug in safari?
    From what i understand i see that - Cookies are not transferred between your website and your webapp when installing the icon on the home screen (for authentication purposes for example). It was working until 6.1 and now it’s not working anymore.
    Can someone please tell me if this bug will be fixed in any future release, if so the ticket number of some kind that i can track, or if there is a workaround for this issue?

  • I have Maverick installed and my mail, Safari, Mac App Store, and iMessages apps all say that they quit unexpectedly and will not open.  Any suggestions?

    I have Maverick installed and my mail, Safari, Mac App Store, and iMessages apps all say that they quit unexpectedly and will not open.  Any suggestions?
    Process:    
    Mail [605]
    Path:       
    /Applications/Mail.app/Contents/MacOS/Mail
    Identifier: 
    com.apple.mail
    Version:    
    7.2 (1874)
    Build Info: 
    Mail-1874000000000000~1
    Code Type:  
    X86-64 (Native)
    Parent Process:  launchd [164]
    Responsible:
    Mail [605]
    User ID:    
    501
    Date/Time:  
    2014-05-01 22:11:44.754 -0500
    OS Version: 
    Mac OS X 10.9.2 (13C64)
    Report Version:  11
    Anonymous UUID:  5D0F67F3-4D58-F054-66B6-24017FD68ADC
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
    VM Regions Near 0:

    I will check.  Can the security update be installed if you can no longer open the Mac App Store app?
    I was listening to the MacCast podcast and the host had a similar issue and did something similar to the link below.  I am concerned that I may mess something up by doing this.
    http://macs.about.com/od/usingyourmac/qt/Fix-Spod-How-To-Fix-A-Spinning-Pinwheel -Of-Death.htm

  • Statically referencing the default JTextPane Cut, Paste, and Copy actions

    If all JTextPanes share the same default keymap, which includes the Cut, Paste, and Copy, how do I modify those actions statically so those modifications are available to all JTextPanes before one is instantiated?
    Also, it seems that the key bindings are linked to the UI....an HTMLEditorKit has different actions than a RTFEditorKit (except for the default actions they share), but when you swap out an editor kit, only the ActionMap is updated...why not the InputMap as well?

    The JDK 1.4 use read/write methods of editor kit for paste/copy operations. So if you set your editor kit it will be call your read/write functions.
    best regards
    Stas

  • Recently PopClip stopped showing "Cut," "Paste," and other similar options

    Hello,
    Recently, PopClip stopped showing "Cut," "Paste," and other similar options. I haven't changed anything in the settings. Maybe this will help:
    2013-06-04 18:55:22.886 PopClip[1167:707] [INFO] PopAppDelegate: PopClip Initializing.
    2013-06-04 18:55:23.089 PopClip[1167:707] Could not find image named 'BuyLabel'.
    2013-06-04 18:55:23.093 PopClip[1167:707] Could not find image named 'BlueTick'.
    2013-06-04 18:55:23.162 PopClip[1167:707] NSWindow does not support nonactivating panel styleMask 0x80
    2013-06-04 18:55:23.164 PopClip[1167:707] [INFO] PopAppDelegate: PopClip will wait 0.500000 seconds to start.
    2013-06-04 18:55:26.591 PopClip[1167:707] .sdef warning for argument 'FileType' of command 'save' in suite 'Standard Suite': 'saveable file format' is not a valid type name.
    2013-06-04 18:55:26.623 PopClip[1167:707] Bartender Loaded
    logout
    Thank you in advance for the help!

    This is something you'll want to address with the developer of PopClip.

  • I've updated my iphone and then the sound is cut off and sms what should i do ?

    i've updated my iphone and then the sound is cut off and sms what should i do ?

    You can try resetting your iPad by simultaneously pressing and holding the Home and Sleep/Wake buttons until you see the Apple Logo. This can take up to 15 seconds so be patient and don't release the buttons until the logo appears.
    Try again to see if the problem persists.

  • Safari5.1.x Cut/Paste and Copy/Paste don't work

    Please reconsider the severity of this bug!
    It may be related to something more fundamental in the Safari cut-n-paste functionality. It seems that Safari ALWAYS pastes an instance of the parent macro when copying content wrapped in a macro. The same behaviour is seen when copying and pasting text wrapped in the "Numbered headings" macro.
    I believe the problem is mainly related to the cut and copy function rather than the paste function, since the instance of the parent element is also pasted when attempting to place the cut content outside the parent element. This effectively means that there is no way to move content out of a macro, since deleting the wrapper macro will also delete the contents.
    All in all this makes Safari 5.1.x pretty much useless as a client to Confluence, since basic editing will have to involve pasting to and recutting from some external program to perform the most basic of editing operations. In a corporate environment users may not be allowed to install (or use) an alternative browser.

    I have this problem using Safari 5.1.7 on OS 10.6.8. I believe the issue exist with much before versions as well. Please someone reconstruct the issue and confirm it. Thanks. this is making Safari useless.

  • QUICKTIME: what program to cut, paste, and rearrange parts of an mpg?

    Hi,
    This is a complete newbie question.
    I have an mpg.
    I want to cut, delete, and paste parts of it
    to change the order of the clips to create a new mpg.
    What is the cheapest program that makes this possible?
    Thanks!

    This is the app you need and it's FREE.
    MPEG StreamClip
    http://www.squared5.com/svideo/mpeg-streamclip-mac.html

  • I phone feautres cut paste and mail search

    I am looking for help with the following, and since my research has not found them so far, please take these as suggestions for improvements.
    1. cut and paste please.
    2. a bar in the bottom of the mail box that lets you search and page to top of message folder. (i.e. if i find my message, after wards rather than thumb up, I can just jump to the top of the mail box.)
    3. a way to view gmail mail box as conversations not individual message.
    If you know any shortcut to these please let me know.

    1. Can't be done at this time.
    2. Tap the top bar where the time is displayed. (Also works in Safari for web pages.)
    3. Can't be done at this time.
    There's nobody here but fellow users. If you want to make a suggestion to Apple, use the form on this page: http://www.apple.com/feedback/iphone.html

  • HT1688 Traveling in Europe and iphone 5 has NO SERVICE.  I have had other iPhones and other cell phones in the past and never had this problem

    I am traveling in Europe and for the first time in over 10 years I am not able to use my cell phone.  This is my third iPhone and I have never had any trouble in the past in connecting as soon as off the plane!!!!  I have tried everything to fix it.  Chatted with AT&T and couldn't help me either.  Resetted settings, network settings, turned off and rebooted at least ten times.  Removed Sim card and still NOTHING.  NO SERVICE and SEARCHING is all I can get.

    Tracy, first you should restart the iPhone by holding down the on/off and the home buttons at the same time until you see the Apple logo.  This process could solve some of your problems.  Also make sure you have the latest update, go into  our settings>general>software update.  On the wifi issue try restarting your router, if you are still having problems try resetting your network settings, go into your settings>general>reset then tap reset network settings. 
    The battery issues seems normal, the battery will not last 24 hours. 

  • Opening new window when performing cut, paste and delete on Audio Files

    This is 100% reproducible:
    When performing one of the following actions when editing audio files (not multitrack projects), it will open a new window with the same file:
    - Cut
    - Delete
    - Paste
    This happens on new files as well as opened files.
    The new window looks like this:
    This did not happen in SP2. Can anyone else confirm?
    Message was edited by: Erik K Veland

    Hi,
    Really??!! This solved it for you, your window no longer pops up when you perform an action?
    Did you move the layouts to another location and then SP3 created new layout files in that default location or did you set a preference for another location? Or did you just rename the existing layout?
    I am probably making this solution more complicated than it is, but those are my questions.
    Thank you, Ken

  • Can't login to Hotmail via Safari since upgrading to OS X Yosemite

    Has anyone else had a problem logging into Hotmail.com or Outlook.com via Safari (or Firefox, Chrome and any other browser) since upgrading to OS X Yosemite?  I can log in via Safari on my iPad and iPhone, but not on my 2008 iMac running Yosemite.
    Thanks.

    The Canon MG series uses two protocols - Apple's Bonjour and Canon's own "canonijnetwork". Bonjour is used by the printer and scanner component, while the Canon protocol is used by the printer only. Given that you cannot locate either via the Add printer window and I'm assuming the printer is networked, then open Safari and then its preferences and select the Advanced tab. You will see an entry of Bonjour and the option to enable it in the Favorites bar or Bookmarks menu bar. Enable one of these and then close the Safari Preferences window. Now open the Bonjour bookmark (via the Favorites bar or Bookmarks menu). Do you see the MG5220?
    If not, then check what IP address it is using by printing a network data list. If you then enter the IP address into Safari (for example http://10.0.1.10) this should connect to the internal web page of the printer. Does this happen? If yes, then it at least shows that you have a working connection between your Mac and the printer. If it does not connect to the MG5220 web page, then check what IP address your Mac is using and compare that to the MG. Typically for a home network the first three sets of numbers in the IP address (known as the subnet) are the same and the last number (known as the network address) is different for each device on the local network.

  • Itunes, App store, Facebook App and Facebook on Safari are not working...can not connect to app store is the message I get.

    Since Sunday I can not access Itunes or App store with my Ipad 2. I can not use the facebook app, it will log in, but will not load up the newsfeed, I can not use it in Safari either. Also can not use apps like Draw Something.  The same thing has happened to my husbands Ipad. On occasion it will allow the app store or itunes to work. Any ideas?

    I have the itunes and app store working now, but my FB app and FB on Safari will not work and other websites are not working very well on Safari...any ideas?

  • Safari 3.2.1 and 4 log in problem - developer

    I am developing a web site using asp.net and since the update to safari 4 (and 3.2.1 and 10.5.6 on a mac) i am unable to log into the site, it doesnt appear to be saving the cookies, so it just redirects you back to the log in site every time.
    I am using formsauthentication, and configuring cookies using Response.Cookies("Admin")("username") etc..
    Has anyone else had the same problem? When i click the log in button (on default.aspx, it simply redirects me back to the same page, with the url
    default.aspx?ReturnUrl=%2fAdmin%2fdefault.aspx
    it should redirect to a folder called admin, which has a page called default.aspx.
    This works fine on IE/FireFox and versions of Safari on the mac and windows before 4.
    Does anyone have any idea how i can fix this, and regain normal log in ability.

    hehe... he's trying to help you. He said "Debug menu and User Agent?".
    This will show you what Safari is doing. Unfortunately you have not provided enough information for us to troubleshoot this problem.
    This is a common problem; web developers do not understand how browsers work, so they do not have the expertise to develop for "BrowserX".
    Try the Apple Developer's Connection if you are programming a website for Safari. This forum is primarily for end-users of the Safari browser. The response we usually give is to "Check with the web developer to be sure that Safari is a supported browser".

  • How do you uninstall safari 5.0.5 and revert to 5.0.4?

    Hi,
    Sorry if this has been answered before. 
    Safari 5.0.5 crashes on javascript audio player calls that worked fine in 5.0.4 and every other browser.  I couldn't find an un-install in the package. Is it possible to revert to 5.0.4?
    tkzic

    Download Pacifist for Mac OS X and re-download Safari 5.0.4 and when It.s downloaded, drag the box icon into Pacifist and click the Install button

Maybe you are looking for

  • How do I separate the inboxes on my 2 email accounts.

    I have office and personal accounts on my Iphone. under the old version of the operating system, I could keep them completely separate. Now, my home emaill is merged in the inbox...the deleted items are separated into two accounts, however. If it isn

  • VTrak E/J-Class for OS X Max Capacity

    Hi all Recently I cam to own a "VTrak E-Class for OS X". What is the maximum HDD size I can use on it? The web-site is not clear about it. The only information I could find is the maximum number of bays (HHDs) I can have attached to it (using a Class

  • Continious beeping sound when booting up Satellite L350-235

    Hi everyone, I have an issue on one of our Toshiba's. it gives me now a Continious beeping sound when booting up the machine after giving in the bootpw. If i remove the battery and plug it back in it boots normally. But After the next reboot the prob

  • Upgrading Windows 2003 Ent and Exchange 2000 to SBS?

    Hi.  I'm wondering the best course of action from a planning standing. I have a single domain Windows 2003 R2 Enterprise Server.  This has VMware 2.0 Server, SQL Server and TFS.  The VMware is hosting Exchange 2003 and a second Domain Controller.  (y

  • Nokia 616 cannot connect to iphone

    Hi, i have a brand new nokia 616 and it cannot connect with my iphone, i have tried everything to make them work together but nothing works... please help! E.