How do you view a PostScript .LOG file in Google Drive? - google-drive-api

PostScript often outputs a highly useful .log file with recordable info as well as its usual .pdf output.
.log files serve both as error messages and for intentional output.
This .log file is automatically generated by Adobe Acrobat Distiller or by GhostScript, while Google Drive apparently has a mechanism for viewing certain log files from certain programs.
What is the Google Drive .log viewing mechanism for a .ps input?

Google Drive is very bad for getting messages normally sent to STDOUT on a printer and maybe even hopeless. For example, I have posted a file on Google Drive to show the printer properties to be printed on paper by the printer. I modified the PostScript to send the same information to STDOUT using the "print" string before the "show" string. The output from the "print" string is lost by Google Drive. At least the page is displayed without complaints by Google and can be viewed or the code downloaded and examined here:
https://drive.google.com/file/d/1F40q3RaQd1hhIVkcJwfFMU8FjYjIBaAU/view?usp=sharing
The communications sent to STDOUT could be captured and used to generate a PostScript page if that was desired. That seems like a lot of work just to get Google Drive to show some output. For example, I converted a program originally made to send the currentdeviceparams to STDOUT into a PostScript printed page format to be run on any printer or viewed in any distiller and downloadable below:
https://drive.google.com/file/d/1wplIEiqKkjL965Cj3Ss3_ECT5tVUxhs5/view?usp=sharing
EDIT: Wow, I see you are already prepared with print_divert_werr1.psl to generate the page views of program output.
An alternative would be to post the .log file from Acrobat on your website or anybody could download the PostScript from Google Drive and run the program to get their own output.

Related

Print Multiple HTML files automatically using a printer/Network Printer

I looking for a solution to print multiple HTML files/URLs to print automatically from the printer with Just one click from my custom android app.
So earlier I use to print these multiple files using Google Cloud API. So using that API we use to add those files to the Google cloud and then Google Cloud automatically prints those HTML files from the printer which is configured. Since Google cloud is no more available to use so I am looking for an automatic solution.
Is there any solution for printing multiple HTML files using EPSON printer tm-t20 by using some API OR some android code which I can integrate to print these HTML automatically?
This is a very broad question. I suggest asking a series of more focussed questions to get specific answers to the various problems you are faced with. Anyway here are some ideas for you...
There are a few things going on here. You need to process a URL, convert that URL into something printable (probably a PDF file) and then automate the printing of it on your Epson printer.
Software is available to automatically print documents that appear in a folder on your network, so you can use that kind of thing to print PDFs. Google "automatically print pdf files in folder" and find something that will work with your printer.
For the other problem of getting something printable from a URL, I presume you do not wish to code up your own solution, so perhaps you can find an App to render HTML to PDF and save the file to a folder or network location. Have a look at IFTT, there is an app there called Pocket, that can convert a URL to PDF and save it to Google Drive. If you link Google Drive to the folder on your network that automatically prints documents, perhaps you will have a solution!
You can use ezeep print api it is a replacement for gooogle ckoud print,
I'm the developer community manager I help people with the api integrations and the pai is pretty easy to use . check it out at ezeep.com
let me know if oyu need help

Auto-Convert OneNote to PDF

I am trying to automatically convert some Microsoft OneNote files to PDF to send as a daily email attachment. I have thought of two systematic solutions but need some help in finding the right tools:
Find an application that may be programmatically called (via a Python script e.g.) that will convert a Microsoft OneNote file to a PDF.
Find a way for OneNote to automatically save files as PDFs every time it auto-saves.
Is anyone aware of tools available for either solution?
See my answer to your other question
The approach would be to get the pages content with
./me/onenote/pages/1-1c13bcbae2fdd747a95b3e5386caddf1!1-xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx/content?includeIDs=true&includeInkML=true&preAuthenticated=true
and then render the html on a canvas with javascript/jquery.
render ink with InkMLjs
and then use a library to convert the canvas to a pdf for example with canvas2pdf
Another approach might be something like Automator for osx. You could get the pages of interest with the microsoft-graph api, open them in a web browser using applescript and when the page has finished rendering -> print -> "Save as PDF"

File Monitoring and Upload via Google Chrome Extension

I am trying to build a Google Chrome Extension which does the following -
1) Gets activated when someone visits my site say http://example.com
2) When someone downloads a file from my site , http://example.com, it starts monitoring that file for changes.
3) If the user edits and saves that file, it uploads the modified file back to the system.
My site is a niche document management system for a particular industry. Users dont want to downloads files, edit and then re-upload again. They want the files to be uploaded as soon as they save on their side. Its mostly for .docx, .xlsx files.
I tried to look at the Google chrome apis, but couldnt locate the appropriate ones. Any help would be useful.
Thanks!
As per your description, I believe chrome.downloads is what you want.
Use the chrome.downloads API to programmatically initiate, monitor, manipulate, and search for downloads.
To monitor, you could listen to chrome.downloads.onCreated and chrome.downloads.onChanged

Downloading files from Drive using alt=media with correct filename

I'm having trouble allowing files (non-shared) to be downloaded from a Google Drive account. I've created a listing using the php drive sdk and would like to provide authorised links to download the files using a generated access token. I've got downloads working with links like this:
https://www.googleapis.com/drive/v3/files/[fileid]?alt=media&access_token=[access_token]
The problem is that whenever a file is downloaded, it is named [fileid].[extension], rather than the real file name that appears in Drive.
I've tried adding the download="[real filename]" into the a link to suggest the correct filename, but it's being ignored in all the browsers I've tried.
I've got an alternative working that gets the file piece by piece server side and echoes it out as a file via php, but I'd prefer for downloads to be straight from Drive to the user.

How to generate preview of documents saved in google drive?

I am trying trying to create a preview of a document saved in google drive using google viewer with -
https://docs.google.com/viewer?authuser=0&srcid={some document id}&pid=explorer&a=v&chrome=false&embedded=true
Unfortunately it only works for pdf files. The other important point is that I want to do it without making the uploaded document public.
For get PDF file preview you can use below link :
https://lh3.google.com/u/0/d/]{FILEID}=w200-h150-p-k-nu-iv1
for example : https://lh3.google.com/u/0/d/0BwVBMmQvtcsJUkNSVFllbjRLMzZab0haTEtLajE1M2haekZj=w200-h150-p-k-nu-iv1
Drive/docs only supports importing of Word documents, as I understand, it doesn't support previewing on them in their native form. So you would have to use the Google Documents List API to import and convert them to the native Google Document text format. The problem with this is that you don't get a round-trip (you can't reopen that document in Word). The only real option here is to export as pdf from word and save that. And if you want the general public to be able to preview it, making it public is the only solution. I don't think the technologies you're using match the problem you're trying to solve...
Try using this URL for PDF: http://docs.google.com/viewer?url=https%3A%2F%2Fdocs.google.com%2Fuc%3Fexport%3Ddownload%26id%3D{fileID}&embedded=true
and this URL for other files: https://docs.google.com/viewer?url=https%3A%2F%2Fdocs.google.com%2Fdocument%2Fd%2F{fileID}%2Fexport%3Fformat=pdf&embedded=true
Keep in mind that files should be public.