new google site - How to upload a pdf - upload

I would like to upload the pdf of a paper on my new google site. Specifically, I want that people can click on, say, "paper_title" and can visualize the pdf and, if they want, download it.
I would like if possible a step-by-step explanation.
Thanks!

This is fairly straightforwards:
Firstly, store the PDF files on Google Drive and, set the link sharing as appropriate (e.g. anyone with link can view) so even anonymous internet users can see the file.
To make the PDF available via Google Sites you can either:
From Drive, copy the link to the file, and in new Sites insert a text box and
include the hyperlink to the PDF file in the text box.
in new Sites Insert (From Drive) and select the PDF file from the Google Drive; gives the same result as above, but with a re-sizable thumbnail picture of the PDF file instead of a link.
Exactly what happens after they click on the link is going to depend upon what browser the user is using, and what (if any) PDF viewer plugin is installed. Chrome, pretty much does what you want: it opens the PDF file in a viewer, from where you can download it.
Even if you don't store the PDF on Google Drive, what is described above should still work, as long as you have a hyperlink to the PDF file.

Related

How to convert PDF web links to file open actions with python pdfrw library

I'm using pdfkit to convert html to pdf which works great, but the external links in the pdf are web links.
The pdf viewer that we are using does not recognize the pdf web links, but file open actions do work.
I've been trying to change the pdf link annotation from a web link to a file open action with the pdfrw library.
I tried to edit the pdf annotation with the following code, but it's not working.
annot.A.update(pdfrw.PdfDict( S='/Launch'))
annot.A.update(pdfrw.PdfDict( F={}))
annot.A.F.update(pdfrw.PdfDict( Type='/Filespec'))
annot.A.F.update(pdfrw.PdfDict( F='(part-1.pdf)'))
annot.A.pop('/Type')
annot.A.pop('/URI')
The link shows up in the new pdf, but there is no action or destination file associated with it.
So after a similar battle today...
you can't define S='/Launch' as string like that. You have to use:
annot.A.update(pdfrw.PdfDict( S=pdfrw.PdfName('Launch')))
Similarly with filespec etc. You may also need to take the () off the filename - as that seemed to break it, at least in Apple Preview.

How do i display files from a users OneDrive using the Microsoft Graph Api

I'm currently working with the OneDrive API to get files from a users OneDrive.
I need to be able to display a file from OneDrive dynamically, depending on what element a user clicks on.
I Know that I can go into my OneDrive and get a Embedded Link that I can use to display a file from my OneDrive, but this is not what I need. I attempted to use the Embedded Link combined with data binding but the link requires a authorization token unique the initial embedded link.
Essentially I want a user to click on a element corresponding to a OneDrive element (eg a file or pdf). Then have file will display in a IFrame on the page.
For Office documents, you can use the webUrl property from a DiveItem. This URL will open the document in the editor associated with that file type. For example, navigating to the webUrl for a .ppt file will open that document in PowerPoint Online.
For other files, the webUrl property simply points to the file itself. What happens when you navigate to that address will depend on the file type and what applications you have installed. Navigating to a .pdf generally will show that file in the browser (most browsers support PDF) but other files may not have an application and therefore just download to the local machine.
You can open the URLs into an iframe but be careful to ensure you're UI is taking up minimal screen area. Also make sure you're page is responsive so users can use the app in a smaller window and/or mobile device without your UI eating up so much canvas that they can't see/use the document itself.
here is an example of a creation of an edit link in onedrive, you can change the type of edit to embeed to get what you want, this is in php utilizing laravel, the graph api with the docs https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/item_createlink
public function getEditableEmbeed($itemid){
$this->refresh();
$file = $this->getGraph()->createRequest("POST", "/me/drive/items/".$itemid."/createLink")->attachBody('{ "type": "edit", "scope": "anonymous"}')->execute();
return $file;
}

Display docx or ppt in browser with ruby

I'm currently working on a intranet webapp for a company.
I've created it so the administrators of the site are able to upload files
(.docx, .pdf, .xlsx, .ppt etc) up to the webapp, to provide easier access
to documents for the employees. It works very well, however my client wasn't
too fond of having to download the files, and wanted it to pop up in the browser,
or open up the file-spesific program instead of download.
I was playing with some ideas:
1. Somehow parse the files to JSON at upload, and then show the content in browser with html.
2. Generate a pdf from the uploaded file (which automatically launches in the browser).
3. Somehow use a previewer to show the filecontent in the browser
4. Clients computer launches the uploaded file automatically on download, however I think this is a bit more tricky...
What would be the best and most time-efficient way to go about this?
It feels like what you actually want/need is a javascript document viewer (only) such as http://viewerjs.org/.

What is the best way to manipulate an existing PDF-Document under iOS?

I need to individualize documents within an iOS-App. I could provide the origin-documents as DOCX, PDF, PPT etc. The output-format has to be PDF.
My minimun requirement is to fill some text-fields. Nice to have would be to replace an image, too.
I´m quite used to generate PDFs programmatically using UIGraphicsBeginPDFContextToFile etc. But in my current case I don´t want to create the whole document programmatically, I just want to replace some content.
Any hints / tipps?
Thank you in advance.
DOCX is a zip - format file so you can process the contents programmatically and the reconstruct the zip file. PPT is a binary format though newer versions of PowerPoint might also construct zip-oriented versions that you can programmatically process. You mentioned though that you need don't want to programmatically process these documents - which I would probably also do only as a last resort.
For your DOCX origin/source documents (or doc,odt,rtf but not ppt/pdf) you could use Docmosis cloud services if your app can have the external dependency. You would upload your DOCX origin documents with placeholders for text-fields or images as a one-off/occasional task. Your iOS app then calls Docmosis sending instructions and data to create the output PDF and either stream it back to the app or email/store it or both.
The upside is it takes all the load and coding away from the iOS application (there is an SDK). The downside is it is an external depdendency. Please note I work for the company the created Docmosis.
Hope that helps.
Why not just load a page in a webView modal that points to a URL of a page you create? The main parts of the page would be static, and then the fields you need to customize would be populated via Javascript or PHP.
For example, we have a contact form in our app that gives you an option to view the details of your completed form after you submit. When the user clicks on the button to view the Contact Confirmation, it loads example.com/confirmation.php in a modal view within the iOS App.
On the confirmation.php page (on the web), I use PHP to pull in $_GET variables from the URL parameters which then populates the page with my static content, and their customized information that they entered into the form.

Opening a local folder using a link in PDF from iText

I am trying to provide a link in a PDF, which when clicked will open the folder the PDF is present. How can this be done?
this one would be alot easier if u have adobe profesional...what you do is this:
microsoft word(which has ur hyperlink) >adobe pdf>change conversion settings>check the box of "add links to adobe pdf". Now same thing again:
microsoft word>adobe pdf>convert pdf.
it converts with hyperlinks...wooooilaaa...plus u got some more options to create your chart in word than in adobe...hope this one helped as welll...!!!

Resources