displaying pdf as image

929 views
Skip to first unread message

kofoid

unread,
Nov 17, 2009, 3:15:43 PM11/17/09
to TiddlyWiki
I've discovered that the following displays the first page of a pdf
file as an image:

[img[Walker Comments | cctiddly/myFile.pdf]]

Does anyone know how to use similar code to display subsequent pages
as consecutive images?

I like this code, as it doesn't open a separate window, but rather
inserts the item directly into the tiddler pane. If worse comes to
worse, I can simply save each page as its own pdf (or png) file, and
replicate the line of code for each.

Cheers,

Eric.

Måns

unread,
Nov 17, 2009, 3:51:55 PM11/17/09
to TiddlyWiki
Hi Eric
> I've discovered that the following displays the first page of a pdf
> file as an image:
>
> [img[Walker Comments | cctiddly/myFile.pdf]]

To me it seems very unlikely that an img command should be able to
produce an image from a pdf-file...
Could you provide a screenshot and/or a testcase?

Regards Måns Mårtensson

Måns

unread,
Nov 17, 2009, 4:18:32 PM11/17/09
to TiddlyWiki
I've made a test here: http://tinyurl.com/ykoy6qu
As you can see it doesn't work.
The actual Url to the pdf is: http://dl.dropbox.com/u/1064531/screendmp/toFnd/Img/Et%20udviklingsprojekt-2.pdf
You can "grab" the TW and try to alter the Url to see if you can make
it work as you described..

Regards Måns Mårtensson

kofoid

unread,
Nov 17, 2009, 7:47:54 PM11/17/09
to TiddlyWiki
Hi, Måns,

Here is a simple tiddler:

===== Tiddler title =====
PDF Test
===== Tiddler body =====
Here is a one-page rendition of a pdf file:
[img[foo image|foo.pdf]]
===== End tiddler =====

Rename some pdf file "foo.pdf" and put it at the same level as a test
TW document. Create the above tiddler in the test document. As soon as
you hit the "done" tab, you will see the first page of the pdf file.
It will be pristine and beautiful.

Cheers,

Eric.


On Nov 17, 1:18 pm, Måns <humam...@gmail.com> wrote:
> I've made a test here:http://tinyurl.com/ykoy6qu
> As you can see it doesn't work.
> The actual Url to the pdf is:http://dl.dropbox.com/u/1064531/screendmp/toFnd/Img/Et%20udviklingspr...

Måns

unread,
Nov 18, 2009, 7:16:40 AM11/18/09
to TiddlyWiki
Hi kofoid

I tried this:
> ===== Tiddler title =====
> PDF Test
> ===== Tiddler body =====
> Here is a one-page rendition of a pdf file:
> [img[foo image|foo.pdf]]
> ===== End tiddler =====
>
> Rename some pdf file "foo.pdf" and put it at the same level as a test
> TW document. Create the above tiddler in the test document. As soon as
> you hit the "done" tab, you will see the first page of the pdf file.

However it doesn't work for me - look here: http://tinyurl.com/yfr5ejr
I've made a tiddler with an iframe, where you can interact with the
pdf inline.. http://tinyurl.com/yzz8t2x

Regards Måns Mårtensson

Tobias Beer

unread,
Nov 18, 2009, 10:17:54 AM11/18/09
to TiddlyWiki
Well, at least for me I get a download dialog instead of a pdf
rendered inline...

Tobias.

Måns

unread,
Nov 18, 2009, 10:54:33 AM11/18/09
to TiddlyWiki
Demo (flashvideo): http://tinyurl.com/yz3lxkd

When I use Windows Xp Google Chrome, IE 7 and FF it works - however
when I use Linux (Muppy Linux and Ubuntu with FF) - I also get a
downloadlink...
It's probably the acroread plugin for browsers which only works in
Windows..

Regards Måns Mårtensson

kofoid

unread,
Nov 18, 2009, 1:43:47 PM11/18/09
to TiddlyWiki
Hi, Måns,

I should have mentioned that I'm using Safari under OS X, 10.5.8.

I have just discovered that it won't work if I use Firefox with the
same operating system! Hmmm.... Seems to limit its utility!

My original thought was that this would be a clever way to display pdf
files in a tiddler frame without a lot of conversion to image formats,
but, it looks like I'll have to do the conversion if I want universal
accessibility.

Thanks for the conversation and tips.

Cheers,

Eric.

dvd

unread,
Nov 18, 2009, 9:44:18 PM11/18/09
to TiddlyWiki
It works for me on Safari on Mac.
But that's so weird to me, it shouldn't work.

On Nov 17, 3:18 pm, Måns <humam...@gmail.com> wrote:
> I've made a test here:http://tinyurl.com/ykoy6qu
> As you can see it doesn't work.
> The actual Url to the pdf is:http://dl.dropbox.com/u/1064531/screendmp/toFnd/Img/Et%20udviklingspr...

Måns

unread,
Nov 19, 2009, 2:41:32 AM11/19/09
to TiddlyWiki
You are absolutely RIGHT!!!

I've just tested it on Safari (portable version) on Windows Xp pro -
with ImageSizeplugin..
and it even resizes the image of the first page of the pdf....
Very weird - and interesting indeed...
It's something in Safari and not sth OSspecific...

http://tinyurl.com/ykyosoa
Screendump: http://dl.dropbox.com/u/1064531/screendmp/empty/TestPdf/2009-11-19_ScrDmp.png

Regards Måns Mårtensson

Paul Downey (psd)

unread,
Nov 19, 2009, 3:10:08 AM11/19/09
to TiddlyWiki
There's some discussion, and useful links, for embedding PDF in HTML
on Stack Overflow:

http://stackoverflow.com/questions/291813/best-way-to-embed-pdf-in-html

I don't much like the idea of using Flash but there are some other
links which may help, and you might like to ask further questions
there ..

--
Paul (psd)
http://blog.whatfettle.com

Måns

unread,
Nov 19, 2009, 5:38:08 AM11/19/09
to TiddlyWiki
Thanks Paul

A very usefull link.
embedit and scribd are very usefull ways of embedding pdf via flash -
you'll need to upload your document to their servers though..
You can export your document in OpenOffice as a swf and upload it via
Dropbox (if it's made in Draw or Impress that is) - and use your own
swf in an iframe.
If you have only a pdf (not a document) you can use Wink to make
screenshots of your pdf and save it as a swf, but it's only as a last
resort - the quality suffers and you'll have to insert navigation
buttons for each page manually...

I've made 7 different attempts (several of them using Gimp as
translator from pdf to images ) You can see them all here:
http://tinyurl.com/yh7svss

Regards Måns Mårtensson


On 19 Nov., 09:10, "Paul Downey (psd)" <paul.s.dow...@gmail.com>
wrote:

Måns

unread,
Nov 19, 2009, 8:59:35 AM11/19/09
to TiddlyWiki

> If you have only a pdf (not a document) you can ...
should have been: If you have only a pdf (not an OpenOfficedocument)
you can

Måns

unread,
Nov 19, 2009, 2:01:28 PM11/19/09
to TiddlyWiki
I found that SwfTools http://www.swftools.org/ was the best (very
fast& very high quality) solution for converting pdfs to swf, - so
far: http://tinyurl.com/ygdaypa
It's browser/OS agnostic and all..

Regards Måns Mårtensson

Måns

unread,
Nov 22, 2009, 3:30:15 PM11/22/09
to TiddlyWiki
Hi TwWizards

Yet another pdf-hosting/serving site: Calaméo..http://en.calameo.com

Delivers interactive thumbnail and a quite impressive (flash)gui for
the fullscreen representation..

I've made an example here: http://tinyurl.com/yd6nhfy

Now my list has reached 10 different ways to deliver pdfs inline.. -
if you know more or/and better ways to do it - please let me know and
I will put them on the list as well.. http://tinyurl.com/yh7svss

I still like swfTools (pdf2swf) best - because it's GPL-licensed (you
can make changes to the layout etc..) and you can host the resulting
html + swf on your own ftp if you like.. The tools exist in Linux and
Windows versions http://www.swftools.org/

Regards Måns

On 19 Nov., 20:01, Måns <humam...@gmail.com> wrote:
> I found that SwfToolshttp://www.swftools.org/was the best (very
Reply all
Reply to author
Forward
0 new messages