I get strange results in the Mendeley Web Importer on many of the pages in our website, lens.org. For example, this page: https://www.lens.org/lens/search shows a list of patents. I know that Mendeley doesn't really work with patents, so I wouldn't expect the Web Importer to detect anything to import. But when I click the button I get this:
Where do all those results come from?
The first result, "Room-temperature fabrication of transparent flexible thin-film transistors..." shows up in a lot of pages that it shouldn't. For example, on this page: https://www.lens.org/lens/scholar/article/091-863-869-534-178/main, clicking the Mendeley Web Importer button gives me 2 results when I expect to only get 1.
I've searched the page content for the DOI (10.1038/nature03090) but it doesn't appear to be there. There is only one .Z3988 element on the page, and that is for the article displayed on the page. Where is the extra result coming from?
Once dropped the Mendeley Web Importer will try to find any references on the page. This means that sometimes it can find references that are not immediately visible to the user.
In your case, that DOI is actually present in the html, see:
For single article page such as https://www.lens.org/lens/scholar/article/091-863-869-534-178/main, the Mendeley Web Importer would be more accurate if Highwire Press tags were included in the <head>of the page. Example:
<meta name="citation_title" content="Global and local fMRI signals driven by neurons defined optogenetically by type and wiring.">
<meta name="citation_authors" content="Lee, Jin Hyung; Durand, Remy; Gradinaru, Viviana; Zhang, Feng; Goshen, Inbal; Kim, Dae-Shik; Fenno, Lief E; Ramakrishnan, Charu; Deisseroth, Karl">
<meta name="citation_journal_title" content="Nature">
<meta name="citation_publisher" content="Nature Publishing Group">
<meta name="citation_issue" content="7299">
<meta name="citation_volume" content="465">
<meta name="citation_doi" content="10.1038/nature09108">
Cf https://www.mendeley.com/guides/information-for-publishers
Related
I am trying to add a yes/no message box to a google sheet that will display on an iPad. I have tried all the things below but none of them display the message. My goal is if the user changes a field the macro will change other fields if the user says it is ok. I can get this to work on a windows machine with no issues but when I try it on an ipad the message never appears. At this point I am just trying to get a message box to appear. This is what I have tried
1.
function onEdit(e) {
Browser.msgBox("test");
}
Result: The macros times out
2.
function onEdit(e) {
var html = HtmlService.createHtmlOutputFromFile('Page')
.setWidth(400)
.setHeight(300);
SpreadsheetApp.getUi() // Or DocumentApp or SlidesApp or FormApp.
.showModalDialog(html, 'My custom dialog');
}
Page.html:
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
Hello, world! <input type="button" value="Close" onclick="google.script.host.close()" />
</body>
</html>
I enabled the trigger for onEdit to get it to work and it works on the windows machine without issues but when run on the iPad I get:
Exception: You do not have permission to call Ui.showModalDialog. Required permissions: https://www.googleapis.com/auth/script.container.ui
So next I tried:
3.
function myFunction(){
Logger.log("myFun")
var html = HtmlService.createTemplateFromFile( 'Page' )
.evaluate()
.setWidth( 800 )
.setHeight( 400 );
SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
.showModalDialog( html, 'My page title' );
}
function onEdit(){
ScriptApp.newTrigger('myFunction')
.forSpreadsheet(SpreadsheetApp.getActive())
.onEdit()
.create();
}
Using the same page.html, this time in executions it looks like it runs but no box appears on the ipad(it does work on windows). I also tried spreadsheetApp.getUi().alert and prompt, these had the same results.
And Yes I have to use the iPad, I can not use another type of tablet.
Issue:
"Exception: You do not have permission to call Ui.showModalDialog. Required permissions: googleapis.com/auth/script.container.ui"
Fix:
What you can do is installing the trigger instead of using a simple trigger. The image below shows the difference between an installed (above) and a simple (below) trigger using the same code.
Output:
Note:
Don't use reserved function names on installed triggers to avoid it being executed twice like what's shown above. Change onEdit to something like promptUI or something else.
If the above fix isn't enough to show the dialog box, then we need to confirm if the issue might just be on the safari browser (if you are using one) since it worked on your other devices which I assumed are not using safari. You can try using an alternative browser in your device such as Google Chrome and see if the same issue persists. I recommended doing this since i'm seeing a number of issues between showModalDialog and safari
EDIT:
I have seen these related posts pointing out that there are some limitations on mobile apps. See the references below.
Also, some answers suggests that you need to access the spreadsheet via browser (google chrome desktop mode) and then trigger the script there.
References:
Add a script trigger to Google Sheet that will work in Android mobile app
google speadsheet api onOpen does not work on mobile ios
Executing Google Apps Script Functions from Mobile App
How to get scripts to work with phones and tablets
Brief about the app: The app parses html documents and load it in the app as a web view.
In the iOS app I like to show PDF files. There is a structure XML that would contain the whole structure.
Case 1: For a simple PDF file it would look like the following in the structure.xml
<node id="Nc13d37aa" node_id="82cd790d-e5f0-4ee6-a26c-a6e400af8541" type="publication" default="TEST_Pub" secured="false">
<language name="en-GB" path="X-BIKE-401/en-GB/publications/TEST_Pub-003.00.pdf">
<title>(Test-)Publication</title>
</language>
</node>
Case 2: In a more complex scenario one publication might contain a so called ATI's(Additional technical information) This would look like this:
<node id="Nd747c4dc" node_id="b4528fb8-c615-4b96-945d-a5af009325f2" type="publication" default="TEST_Pub_ATI" secured="false">
<language name="en-GB" path="X-BIKE-401/en-GB/publications/TEST_Pub_ATI-003.00.pdf">
<title>(Test-)Publication with ATI</title>
<atis>
<ati id="ati584a41ee" internal_id="af720ef4-5238-4fb4-ba8b-a5ae00debfae" code="Test_ATI" type="Service Letter" required="false" issuecode="Test_ATI_03" issuenumber="3" revisionnumber="0" href="X-BIKE-401\en-GB\ati\Test_ATI-003.00.pdf">(Test-)ATI</ati>
</atis>
</language>
</node>
The idea here is, that we have additional legacy documents accompanying a legacy publication. The idea here would be, that we show the normal legacy publication, but have an additional area in the view, that indicates the user, that there ARE ATIs, and a way for him to view the ATIs - but also get back to the original publication. An ATI is usually some information
Case 3: There is also the case, that one or many ATIs are mandatory.
This means, that the user needs to read & confirm those first, before he can read the actual publication. This will be like:
<node id="N5a3c00f" node_id="09fe8d7b-a95d-4da8-bf06-a5af00933ddc" type="publication" default="TEST_Pub_mATI" secured="false">
<language name="en-GB" path="X-BIKE-401/en-GB/publications/TEST_Pub_mATI-003.00.pdf">
<title>(Test-)Publication with MANDATORY ATI</title>
<atis>
<ati id="ati35c8ee0e" internal_id="60dfaa70-f017-44ea-9190-a5ae00df2494" code="Test_ATI_MAND1" type="Service Bulletin" required="true" issuecode="Test_mATI_03" issuenumber="3" revisionnumber="0" href="X-BIKE-401\en-GB\ati\Test_ATI_MAND1-003.00.pdf">(Test-)ATI1 (MANDATORY)</ati>
<ati id="atic771b1b6" internal_id="d1cffa4b-b1be-4bbb-8dc0-a743010cf246" code="Test_ATI_MAND2" type="Service Bulletin" required="true" issuecode="Test_mATI2_01" issuenumber="1" revisionnumber="0" href="X-BIKE-401\en-GB\ati\Test_ATI_MAND2-001.00.pdf">(Test-)ATI2 (MANDATORY)</ati>
</atis>
</language>
</node>
You can see, that two have the #required set to "true".
In this case we need to first show the first ATI, request the user to "confirm" somewhere that he read it. move on to the next required ATI and conform this as well. and once he has confirmed all the ATIs, he can view the publication itself.
Still he needs to be able to reopen the ATIs (similar to the previous point) and look them up again - without confirmation again.
The user needs to reconfirm, once the publication is closed.
Question: For case 2 & 3, how would this might look like? a mockup of it how would it be? Ideally a proposed solution best in terms of UI and UX.
I can suggest you this way , it may solve your question :
CASE 1 :
Simply Take a UIWebView and show PDF url link , then WebView will render it perfectly .
CASE 2 :
In case 2 you are first showing the case 1 where you show simple PDF and showing it by rendering the web view but then this PDF has extra information called ATI that we need to show this somehow on the web view. So for example a button that when you click on it it will show the extra information maybe in a pop up and then there should be a navigation back to the original PDF
CASE 3:
Use some Image Flipper library to show multiple pdf doc in which you can show some sort of info to acknowledge the user about there are more than one doc is there for navigation .
For Flipper follow this library : https://cocoapods.org/pods/DJKFlipper
Thanks.
I am facing an issue wherein I am unable to show annotations on my PDF on IOS device that are made from some other platforms e.g web, Windows or android. What is actually happening is if I am editing an already created annotation like an underline by changing the notes associated with it from my iOS device, then it is not reflecting on other platforms.
On further Investigation, I found that the PDF format generated by PDFTRON on iOS is different from the format generated by PDFTRON on any other platform. For example, I draw an underline annotation on a document from the web. The initial FDF received is as follows:
<squiggly subject="Squiggly" page="0" rect="275.93,656.703203,336.2084,665.759453" flags="print" name="0eabf5b2-77ab-4c04-3379-438e7a8fc714" title="testuser" date="D:20161027122930+05'30'" color="#FF0000" opacity="1" creationdate="D:20161027121425+05'30'" coords="275.93,665.76,336.21,665.76,275.93,656.7,336.21,656.7"><contents-richtext><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:spec="2.0.2" xfa:APIVersion="Acrobat:10.1.3"><p dir="ltr"><span dir="ltr" style="font-size:10.0pt;text-align:left;color:#000000;font-weight:normal;font-style:normal">under_line</span></p></body></contents-richtext><contents>under_line</contents><popup flags="print,nozoom,norotate" page="0" rect="0,692,150,792" open="no"/></squiggly>
I have entered the text under_line in the notes initially. Now when I edit this annotation from the web (Changing the text from under_line to under_lines) , the resulting FDF is as follows:
<squiggly subject="Squiggly" page="0" rect="275.93,656.703203,336.2084,665.759453" flags="print" name="0eabf5b2-77ab-4c04-3379-438e7a8fc714" title="testuser" date="D:20161027122930+05'30'" color="#FF0000" opacity="1" creationdate="D:20161027121425+05'30'" coords="275.93,665.76,336.21,665.76,275.93,656.7,336.21,656.7"><contents-richtext><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:spec="2.0.2" xfa:APIVersion="Acrobat:10.1.3"><p dir="ltr"><span dir="ltr" style="font-size:10.0pt;text-align:left;color:#000000;font-weight:normal;font-style:normal">under_lines</span></p></body></contents-richtext><contents>under_lines</contents><popup flags="print,nozoom,norotate" page="0" rect="0,692,150,792" open="no"/></squiggly>
The same annotation when edited from an iOS device produces the following FDF:
<squiggly subject="Squiggly" page="0" rect="275.93,656.703203,336.2084,665.759453" flags="print" name="0eabf5b2-77ab-4c04-3379-438e7a8fc714" title="testuser" date="D:20161027122930+05'30'" color="#FF0000" opacity="1" creationdate="D:20161027121425+05'30'" coords="275.93,665.76,336.21,665.76,275.93,656.7,336.21,656.7"><contents-richtext><body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:spec="2.0.2" xfa:APIVersion="Acrobat:10.1.3"><p dir="ltr"><span dir="ltr" style="font-size:10.0pt;text-align:left;color:#000000;font-weight:normal;font-style:normal">under_line</span></p></body></contents-richtext><contents>under_lines</contents><popup flags="print,nozoom,norotate" page="0" rect="0,692,150,792" open="no"/></squiggly>
Now you can see the difference. When I edit the text on the web, the text is changed at both points wherever it appears while when it is changed from the iOS device , the text is updated at only one place.
I believe this is causing a problem for me. How can I resolve this?
Annotation can actually have two Contents. The regular one, and a Rich Contents (essentially a minimal subset of HTML). The two are not guaranteed to be the same, which is the case here. One field got updated, the other didn't, as this actually depends on the specific PDF software used.
There is no difference between our different SDK's in this regards, so either you used two different files, or two different PDF readers. It sounds like on iOS used a 3rd party program.
At the W3C Internationalization Checker page, (http://validator.w3.org/i18n-checker/ ) I got no errors about language issues for my website fxrehber.com but when I check my website for web crawlers at a website like http://tools.seobook.com/general/spider-test/ I get the text like these:
SPK Lisansl Forex irketlerinin Kar la t rmalar ve Kullan c Yorumlar
FXrehber com Forex irketleri kar la t rma ve yorumlar Forex'te g venle
i lem yap n T rkiye'de ofisi bulunan
My website is in Turkish, so it should look like this:
SPK Lisanslı Forex şirketlerinin Karşılaştırmaları ve Kullanıcı Yorumları
FXrehber com Forex şirketleri karşılaştırma ve yorumları Forex'te güvenle
işlem yapın Türkiye'de ofisi bulunan
I'm not sure if it's normal behaviour and this is a problem for SEO.
Consider the tools.seobook.com service useless; it apparently cannot even read UTF-8 data correctly (when in document body – it seems to get the meta tag contents OK, making the behavior even more absurd).
If you search for e.g. “SPK Lisanslı Forex şirketlerinin Karşılaştırmaları” in Google, you’ll see your page well placed, with the extract of page content correctly displayed by Google. Ditto when searching with Bing, Yahoo, Yandex.
Currently, I have an issue with populating an iframe that I have with a PDF document, but this issue only occurs in IE.
Basic Layout:
I have a screen that contains a list of items (attachments), which can be images, text or pdf. When the user clicks on one of these items - it will make a call to a controller action [ViewAttachment] which will return the requested item and display it in the iframe.
This currently works for all data types with the exception of PDFs in IE. (Firefox, Chrome etc. all display the PDF in the iframe without issue.)
I previously was using Adobe Reader 9, and recently upgraded to 10 in hopes of solving this issue. I'll attach some code to see if anyone has any suggestions as to how to possibly resolve this.
Code to Populate iframe: (Moved to two lines for readability)
$(".viewattachment").live('click',function ()
{
$("iframe#test").attr("src","<%=Url.Action("ViewAttachment","Images") %>?
attachment=" + $(this).next().val());
});
ViewAttachment Controller Action:
public ActionResult ViewAttachment(string attachmentGuid)
{
Attachment attachment= imageAgent.GetAttachment(attachmentGuid);
Stream resultStream = new MemoryStream();
resultStream = StorageProviders[attachment.ProviderName]
.ReadFile(attachment.FileReference);
resultStream.Position = 0;
FileStreamResult result = new FileStreamResult(resultStream,
attachment.ContentType);
return result;
}
Notes:
I've attempted toggling the "Display PDF in Browser" in Adobe Reader without any success.
Currently testing this for IE8.
When clicking on a PDF to view - the iframe simply remains at it's previous content and doesn't change at all.
After several different methods and iterations of testing - I determined that it was a conflict between IE8-9 and versions of Adobe Reader 9-10. I added the following meta tag to the window containing the iframe and it resolved all of the issues:
<meta http-equiv="X-UA-Compatible" content="IE=7" />
This should at least work until an update / fix is made.
Have you tried hitting the pdf url directly? If it loads within the browser, then you can narrow down the problem to the iframe. If Adobe Reader pops up, then you know its a problem with the IE Plugin.
I had the same problem working with spring mvc. I releazed that if I put the Iframe inside some tag, like 'util:panel', the iframe does not load de pdf content in IE 8. When I put the iFrame out of the tag, all work fine.