Editorial Workflows

PDF in Sidebar

public workflow

Install Workflow...

This workflow contains at least one Python script. Only use it if you trust the person who shared this with you, and if you know exactly what it does.

I understand, install the workflow!

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: Workflow to show a PDF file, selected from current folder, in a simple sidebar. Based on: PDF in Browser. Thanks to @olemoritz for immediate help.

Only for iPad.

Shared by: @jakubowiak

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Run Python Script ?
Source Code
#coding: utf-8
import editor
import workflow
import os
import platform

if not platform.machine().startswith('iPad'):
	import console 
	console.alert('iPad Required',
		              'Sorry, this workflow is designed for iPad only.', 'OK',

p = editor.get_path()
folder, filename = os.path.split(p)
files = os.listdir(folder)
pdf_files = []
for filename in files:
	if os.path.splitext(filename)[1] == '.pdf':

action_out = '\n'.join(pdf_files)
Select from List ?
PDF Files
List (Lines)
Multiple Selection
Show in Popover
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import editor
import os
import urllib
import webbrowser
import ui
import platform

selected_file = workflow.get_input()
if selected_file:
	p = editor.get_path()
	folder, filename = os.path.split(p)
	full_path = os.path.join(folder, selected_file)
	file_url = 'file://' + urllib.quote(full_path)
	v = ui.load_view()
	import time
	v['webview1'].eval_js('window.location.href = "'+file_url+'"')