[TW5] internal pdf

267 views
Skip to first unread message

Bob Flandard

unread,
Jul 5, 2015, 7:04:38 AM7/5/15
to tiddl...@googlegroups.com
Hello,

If I drag a local pdf file into my TW it imports okay, but the pdf file doesn't render (even transcluded in another tiddler). I get a similar no render of the pdf file "Motovun Jack.pdf" that comes with the default fully documented TW.

I did try using iframe and embed, but I don't like the look of the scrolling frame. The pdf files contain vector based images that I want to view in their default aspect ratio with no borders or frames or scroll bars.

I also tried converting the pdf to SVG using inkscape. This gives the desired visual effect, but it would be time consuming for many pdf files and the command line method wasn't reliable. Inkscape also doubled the size of each file in the pdf -> SVG conversion.

Any thoughts on the best way to get a pdf file containing a vector image to render nicely in TW5? I'm happy for it to be embedded or stored on local disk.

Thanks,

Bob


TW 5.1.9
FireFox 39.0
Windows 7 x64

PMario

unread,
Jul 5, 2015, 11:26:27 AM7/5/15
to tiddl...@googlegroups.com
On Sunday, July 5, 2015 at 1:04:38 PM UTC+2, Bob Flandard wrote:
If I drag a local pdf file into my TW it imports okay, but the pdf file doesn't render (even transcluded in another tiddler).

Do you add    type: application/pdf   ??
 
I get a similar no render of the pdf file "Motovun Jack.pdf" that comes with the default fully documented TW.

That's strange. Any FF addOns that handle PDFs except the built in PDF viewer?  Adobe may be an option here.

Did you try FF with a vanilla profile?  .... So you don't need to disable your addOns. see: https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles ... BACKUP your existing stuff first :)

-m

BJ

unread,
Jul 5, 2015, 2:43:13 PM7/5/15
to tiddl...@googlegroups.com

If you Open the pdf with firefox (it can display pdf files) do you see the same or not:

cheers

BJ

Bob Flandard

unread,
Jul 5, 2015, 2:45:40 PM7/5/15
to tiddl...@googlegroups.com
Thanks M,

That was indeed the problem. The FF adobe plugin needed to be disabled and the default FF pdf renderer used instead. I don't much like how it looks (borders with buttons and other junk), but that my problem.

If anyone knows some software (preferable free) that converts pdf to SVG, and maybe trims to content, then please do tell.

Regards,

Bob

Bob Flandard

unread,
Jul 5, 2015, 2:52:54 PM7/5/15
to tiddl...@googlegroups.com
Hello BJ,

Good idea. If I switch back to the Adobe plugin (see message above) and do as you suggest, then the pdf file renders nicely in FF (but not so in TW).

I'll probably make do with converting the pdf files to SVG, as it seems to be an issue specific to my computer setup.

Thanks for your help,

Bob

RichardWilliamSmith

unread,
Jul 5, 2015, 6:41:30 PM7/5/15
to tiddl...@googlegroups.com
Hi Bob,

I've used cloudconvert happily to convert filetypes - haven't tried pdf to svg, but they do it - https://cloudconvert.com/pdf-to-svg

Regards,
Richard

PMario

unread,
Jul 6, 2015, 3:28:34 AM7/6/15
to tiddl...@googlegroups.com
On Sunday, July 5, 2015 at 8:52:54 PM UTC+2, Bob Flandard wrote:
I'll probably make do with converting the pdf files to SVG, as it seems to be an issue specific to my computer setup.

I'm not sure, why you want to convert PDF to SVG. Those are 2 completely different formats. SVG is for vector images and PDF is a compressed document format.
So imo it makes no sense to convert PDF to SVG. Also depending on the the PDF content, the svg will be huge, very very hard to edit. There will be a lot of formatting problems,  and so on ... I think, you don't win here.

Can you describe you usecase a little bit closer?

-mario

BJ

unread,
Jul 6, 2015, 6:39:29 AM7/6/15
to tiddl...@googlegroups.com
a pdf is actual a 'container' of image etc. Using the ff pdf viewer you can right click on the pdf displayed, hover over 'this frame' then click 'view frame info'. A pop up appears - click on the media tab at the top and then it may be possible to save the embedded images separate from the pdf.

cheers

BJ
Message has been deleted

PMario

unread,
Jul 6, 2015, 10:31:01 AM7/6/15
to tiddl...@googlegroups.com
On Monday, July 6, 2015 at 12:39:29 PM UTC+2, BJ wrote:
a pdf is actual a 'container' of image etc. Using the ff pdf viewer you can right click on the pdf displayed, hover over 'this frame' then click 'view frame info'. A pop up appears - click on the media tab at the top and then it may be possible to save the embedded images separate from the pdf.

hmm,
Depending, on how the PDF was created, the embedded images are, very often, optimized for pc screen resolution. So they are scaled down to 72dpi. Which is completely useless, if you want to print it on real paper. So as long as you stay with low res displays, it may be ok. Most default settings also compress jpg images with low quality / high compression settings, which imo creates ugly artefacts.

So in my opinion, if you didn't create the PDFs on your own, they are a really bad source for images. Leaving alone the copyright problem, for much PDF content. 

mario

Bob Flandard

unread,
Jul 6, 2015, 2:57:11 PM7/6/15
to tiddl...@googlegroups.com
Hello Mario and BJ,

Thank you for your suggestions and thoughts.

My use case is using a Wacom Bamboo tablet and Xournal http://xournal.sourceforge.net to quickly create diagrams and sketches of a technical nature and then export them from Xournal as pdf files which I can then organize and access in TW. However, as the direct pdf import in TW is giving me issues, I am then needing to convert the pdfs to SVG to get the effect I want. I could use Microsoft Onenote, but I also use maths and code snippets which TW serves well with KateX/Mathjax and syntax highlighting plugins.

The pdf files exported from Xournal are vector based rather than raster.

I may just settle for drawing the diagrams on a sheet of paper and scanning them to jpeg or png images and linking to them as external images in the TW. This would save any issues converting the pdf files to SVG, but wouldn't look half as pretty.

Maybe there's a much better established way of doing this that I'm missing?

Ultimately I'd like a tablet type product last feels like pencil and paper, where the drawing appears on the tablet screen, right under the nib (like a real pen) but I don't think such a product exists yet.

Best regards,

Bob

Bob Flandard

unread,
Jul 6, 2015, 3:25:41 PM7/6/15
to tiddl...@googlegroups.com
Thanks Richard,

I'll have a look at that.

Regards,

Bob

PMario

unread,
Jul 6, 2015, 6:35:10 PM7/6/15
to tiddl...@googlegroups.com
Hi Bob,

Now it makes perfect sense. Thx for your info.

There are several online svg editors out there. eg: http://editor.method.ac/   which is based on svg-edit.
you can copy / paste the source code to TW.  - Menu: View: Source [ctrl]-[u] 

In TW you need to set the tiddler type field to image/svg+xml
This should work just fine.

-mario
Reply all
Reply to author
Forward
0 new messages