Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  New feature: Embedded PDFs  (Read 2153 times)
0 Members and 1 Guest are viewing this topic.
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Posted 2014-07-17 20:02:09 »

Due to a certain observed need persecutioncomplex and some spare time, I implemented the feature of embedding PDFs in your forum post.

There are certain undisclosed rules to mitigate the possibility of random people embedding malicious PDFs. The default PDF reader of the browser is used. In the case that there is no default PDF reader associated with the browser, which is often the case on phones and tablets, a download of the file is initiated. I'll work no this later, to prevent such 'unexpected' downloads on potentially bandwidth limited devices.

The PDF is (crudely) validated, cached and served from the JGO server, to ensure the content is not replaced with malicious bits and bytes after the one time validation has occured.

Quote from: Legal Department
By embedding a PDF file in a post, you acknowledge that duplication and redistribution occurs and grant JGO full rights to serve the content to any third party. It is forbidden to embed content that has a license which does not grant these rights to JGO.

The UBB syntax for embedding a PDF file is as follows:
[pdf ]http://java-gaming.org/pdf-sample.pdf[/pdf]


The content box is 95% of the available width in the post and 950px long.





(click this page to load the PDF)



In other news: support for embedded applets has been terminated.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline basil_

« JGO Bitwise Duke »


Medals: 98
Exp: 12 years



« Reply #1 - Posted 2014-07-17 20:04:52 »

thank you!  Grin
Offline ctomni231

JGO Wizard


Medals: 99
Projects: 1
Exp: 7 years


Not a glitch. Just have a lil' pixelexia...


« Reply #2 - Posted 2014-07-18 05:35:13 »

my game...  Cry

Does this work for multi-page PDF's as well... How big can the PDF's be? (It might be good to just make articles in PDF format so they actually look good.) Not that I'm writing one...  Roll Eyes

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #3 - Posted 2014-07-18 06:44:24 »

Your PDF can have any number of pages. As for existing articles, converting them to PDFs would be a ton of work.

And... what about your game? Clueless Are you refering to the termination of the applet tag? Maybe it's a relief to know hardly anybody could execute the applet anyway Emo

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline pjt33
« Reply #4 - Posted 2014-07-18 08:36:13 »

Due to a certain observed need
If you want people to be able to use nicely formatted formulae, you could install MathJax. Or point people at http://mathurl.com/

In the case that there is no default PDF reader associated with the browser, which is often the case on phones and tablets, a download of the file is initiated. I'll work no this later, to prevent such 'unexpected' downloads on potentially bandwidth limited devices.
It would also be useful to not display it other than in the main thread view page. I had to cancel a second download when I opened up this reply page.
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #5 - Posted 2014-07-18 18:42:03 »

SMF doesn't provide that information, so I'm tempted to implement it as click-to-view.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline SHC
« Reply #6 - Posted 2014-07-19 12:22:05 »

I think instead of initiating downloads automatically, you can just keep a link to download the file. Just a small suggestion.

Offline EgonOlsen
« Reply #7 - Posted 2014-07-19 13:24:08 »

This feature spams my download folder on Android with a new file each time i'm reloading the page. Not very nice...

Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #8 - Posted 2014-07-19 14:02:58 »

This feature spams my download folder on Android with a new file each time i'm reloading the page. Not very nice...
Should be solved now. Pointing

Update: some mobile browsers download content when it is styled "display:none" - give me a few more minutes

Update 2: click-to-view should work properly now

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline Mac70
« Reply #9 - Posted 2014-07-19 16:37:11 »

Sadly this feature don't work on Opera - even though it is using the same engine as Chrome. After clicking "click this page to load the PDF" download is initalized, but nothing appears.

Check out my Devblog! Smiley
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline tkausl

Junior Devvie


Medals: 3
Exp: 5 years



« Reply #10 - Posted 2014-07-19 16:42:23 »

May you implement a small Link right above the Box to open the PDF in a new Window?
I dont like to read in small Fonts and if i zoom in i have to scroll horizontally and this sucks  Undecided

My English isnt that great. Correct me, if you want, im still learning this Language Smiley
Online SilverTiger

Junior Devvie


Medals: 6
Exp: 2 years


がんばってください!


« Reply #11 - Posted 2014-07-19 16:48:02 »

Sadly this feature don't work on Opera - even though it is using the same engine as Chrome. After clicking "click this page to load the PDF" download is initalized, but nothing appears.
I'm using Opera 12.17 (64-bit) and it works fine for me Smiley
Don't know if there's a different engine with other versions.

Offline Mac70
« Reply #12 - Posted 2014-07-19 16:53:35 »

You are using very old version, newest one is 22.0.1471.70. Smiley You need to download it manually as Opera don't have auto update feature (at least in old versions, I am not sure if new versions have it or not).

Check out my Devblog! Smiley
Offline Cero
« Reply #13 - Posted 2014-07-19 18:41:33 »

That's not really true. Opera 12.17 and 12.18 are the last presto operas, meaning real operas. Everything after that is just chrome anyway (opera next)

Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #14 - Posted 2014-07-21 19:11:46 »

May you implement a small Link right above the Box to open the PDF in a new Window?
I dont like to read in small Fonts and if i zoom in i have to scroll horizontally and this sucks  Undecided
Thanks for your feedback - I added a link (in the lower half of the page) to open the document in a new tab.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Online Kefwar

Senior Devvie


Medals: 8
Projects: 1



« Reply #15 - Posted 2014-07-21 19:40:12 »

Great feature!  Grin

One notice:
1  
"Failed to load resource: net::ERR_CONNECTION_RESET http://www.prensa-latina.cu/images/stories/LibrosGratis/pdf-icon.png"

The pdf icon isn't displaying.
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #16 - Posted 2014-07-21 19:42:49 »

Whoops, accidently hot linked the icon persecutioncomplex Fixed Pointing

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline SHC
« Reply #17 - Posted 2014-07-22 12:50:42 »

Riven, I found something that maybe of interest to you. There is a pure JS PDF renderer by mozilla called PDF.JS. And it uses WebGL to render that PDF in the browser.

Example


Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (48 views)
2014-11-29 21:32:03

toopeicgaming1999 (115 views)
2014-11-26 15:22:04

toopeicgaming1999 (103 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!