Extension talk:ElectronPdfService/Archive

About this board

Install PDF Renderer Service with Image

1
Apatha11 (talkcontribs)

HI Support Desk,

Following are the installed software product version(s) those are being used in our RHEL7 server environment.

Installed software

Product Version
MediaWiki 1.31.1
PHP 7.1.30 (apache2handler)
MySQL 5.6.40
OS LINUX

We are looking for PDF Renderer Service which would support to embed the images in a Wiki page to a downloaded PDF file.

We have tried with Extension:ElectronPdfService which is referred the Electron server under Git. But its not working it's depricated.

So, please suggest us if there any other pdf renderer server available which is being used in https://www.mediawiki.org/ page. We expect if we could implement same in our wiki application


Thanks

Ashish

Reply to "Install PDF Renderer Service with Image"

Unable to install ElectronPDFService

1
Apatha11 (talkcontribs)

I did not understand the instruction of the electron service and the steps of the configuration :

Install and configure an Electron Service exposed over a RESTBase API endpoint.

Also I am using Linux ,Could anyone please guide proper steps for Linux.

Reply to "Unable to install ElectronPDFService"

worst pdf extension ever seen

1
93.38.0.180 (talkcontribs)

Hi all,

I have a question. Why I have to install a lot of worthless software on my wiki server for a simple job like export to pdf?

Reply to "worst pdf extension ever seen"

Install Electron service

1
186.4.50.145 (talkcontribs)

I would like to get the step-by-step installation of Electron service, please and thanks .

Reply to "Install Electron service"
Mariana duarte100 (talkcontribs)

hi,

i dont understand how to do this instructions, i dont uderstand the instruction of the electron service and the steps of the confuguration :

Install and configure an Electron Service exposed over a RESTBase API endpoint

so someone could explain me an easy way to install that instructions or something please, im working at windows10 and in xampp

Birgit Müller (WMDE) (talkcontribs)

Hi @Mariana duarte100, I will ask my colleagues if they could help you with that & will come back to you! Best, Birgit

Lea Voget (WMDE) (talkcontribs)

Hi @Mariana duarte100,

when installed, the ElectronPdfService adds a link to mediawiki wikis so that users can get pdfs generated by the Electron service. If you want to have that option on a mediawiki wiki you maintain, you need to do multiple things:

First you need to install the Electron Service. Having the service is a prerequisite for our extension, but it is not part of the extension. Therefore, you should follow the installation guide there.

Second, you need to install RESTBase. This is also still a prerequisite for using the extension,and you would need to follow their installation guide.

Third, having all prerequisites installed, you can install our extension and if you get stuck there, we can help you with that. Unfortunately, there is no easier way to do it :(

All the best,

Lea

Lone20lone20 (talkcontribs)

Dear Lea Voget (WMDE),

I couldnot configure 2nd step (1st & 3rd is ok), could you please give me some more details?

Thank you very much.

Lea Voget (WMDE) (talkcontribs)

see answer below :)

Mariana duarte100 (talkcontribs)

thanks

yes i know but i dont understand how can i install the electron service and the restbase , i dont understand step by step, the installation guide, im working windows 10 so what can i do ?? , could you explain me an easy way to install both ??'

Reply to "electron service"

RESTBase: config.yaml

2
Lone20lone20 (talkcontribs)

Dear Team,

I'm Steve Zhou, from China.

Today, I'd like to raise a question.

I have installed an Electron Service successfully,

and tested url - "http://yourhost:port/pdf?accessKey=yourkey&url=https://de.wikipedia.org/wiki/Berlin", it worked.

Then, I installed RESTBase, but in the installation guide, there is only one explanation - "Install https://github.com/wikimedia/restbase, and set up a config similar to config.example.wikimedia.yaml. Adjust the pdf server URL to reflect your host & port.".

I tried to configure config.yaml follow RESTBase's installation guide, but not worked.

So, my question is: could you help to upload a sample config.yaml of RESTBase? or, give me some more deteails.

Thank you very much!

Lea Voget (WMDE) (talkcontribs)
Reply to "RESTBase: config.yaml"
87.215.61.26 (talkcontribs)

I've installed all the prerequisite. Which all function fine. I can export pages through the API fine but when I click Download as PDF it points me to the special page which somehow doesn't exists.

Addshore (talkcontribs)

It sounds like you haven't actually loaded the extension on your wiki! Do you have "wfLoadExtension( 'ElectronPdfService' );" in your LocalSettings.php?

87.215.61.26 (talkcontribs)

Yes I have, I have installed it I have the Download as PDF button but when I click it it gives me:

Page not found by service

The service was not able to resolve the specified link

Addshore (talkcontribs)

This is not a message that is included in MediaWiki or the ElectronPdfService extension. Is this installed on a public wiki that I could have a look at? I sounds like something to do with the Electron service or restbase is misconfigured.

87.215.61.26 (talkcontribs)

I'm sorry it's a private wiki which is not accessible from the internet and I cannot make it accessible either. I can provide any logging or config files you would like though.

Addshore (talkcontribs)

If it is a private wiki can the electron service itself access the wiki? It will make a http request to the wiki in order to know what to print.

87.215.61.26 (talkcontribs)

It's not private in settings, It's private as in it cannot be accessed by the outside. (I'm sorry I should have been clearer)

Reply to "Plugin not working"

I am getting this error : Page not found by service

7
Summary by Addshore
190.19.128.66 (talkcontribs)

I installed it step by step, but still getting this error when I try to use the service > Page not found by service

The wiki is not password protected, anyone can read it. Ideas?

190.19.128.66 (talkcontribs)

Here I am again. Do I need to install Electron or something besides this? From what I can gather, all I need to do is download the extension and I'm on my way?

Jan Dittrich (WMDE) (talkcontribs)
Addshore (talkcontribs)
Renamed user dj65cf874dfh44 (talkcontribs)

I've installed the service on the same machine as mediawiki. The service url defaults to the local IP address over http. I test from another shell using wget on the same machine with http://my-ip-address:3000/pdf, etc. and that works fine (though it doesn't work if I use "localhost").

However, I still get the same error on the wiki. My guess is that this variable needs to be changed?

$wgElectronPdfServiceRESTbaseURL = '/api/rest_v1/page/pdf/';

Note that I have tried a half dozen permutations, including http://etc.,

Any clues to help on this? The service is working so it is something in the extension or the MediaWiki install. --Jeffmcneill (talk) 04:50, 25 April 2017 (UTC)

Note: Do I need to install RESTbase as well? --Jeffmcneill (talk) 05:21, 25 April 2017 (UTC)
Addshore (talkcontribs)

Yes, RESTbase must also be installed.

It4history (talkcontribs)
Reply to "I am getting this error : Page not found by service"

When collection is not installed. The Download PDF link still presents selection screen.

2
Summary by Addshore

Per the change @ https://gerrit.wikimedia.org/r/#/c/341527/ being merged this should now be fixed.

193.190.131.67 (talkcontribs)

There seems to be a bug since change 3ca54d4d1c73: The download link generated by the extension still has as action 'download-electron-pdf' which is no longer recognized, hence the choice screen is shown.

This should fix it:

--- a/src/ElectronPdfServiceHooks.php

+++ b/src/ElectronPdfServiceHooks.php

@@ -90,7 +90,7 @@ class ElectronPdfServiceHooks {

                return $specialPageTitle->getLocalURL(

                        [

                                'page' => $title->getPrefixedText(),

-                               'action' => 'download-electron-pdf'

+                               'action' => 'redirect-to-electron'

                        ]

                );

        }

Addshore (talkcontribs)

This won't work for crazy huge horizontal tables

4
197.218.90.154 (talkcontribs)

This extension will still need to take into account the crazy horizontal (and vertical) tables that editors seem to create. Currently it seems to truncate the rest of the results, just like regular browsers fail.

A reliable alternative is probably to either push them into an appendix at the bottom of the table with landscape enabled for it, or alternatively try (and probably fail sometimes) to render it as landscape within the article. A long term solution is to maybe add a tracking category to highlight these huge tables and have editors fix them, maybe "Category:Nutty tables".

Examples:

https://en.wikipedia.org/w/index.php?title=Periodic_table_(large_cells)&oldid=749013106 https://en.wikipedia.org/w/index.php?title=List_of_United_States_presidential_election_results_by_state&oldid=753848943

TheDJ (talkcontribs)

This highlights an interesting issue... Should probably be possible to enable it to view old revisions of pages, /page/pdf/{title}/{revision}{/tid}. That would be really nice and a good improvement compared to the earlier service.

Actually, it seems the old service already supported old revisions, so that part is not feature compatible yet.

197.218.90.154 (talkcontribs)

It might also be a good idea to hide those huge links within infoboxes and tables, and render them at the bottom of the page with some sort of reference to them.

TheDJ (talkcontribs)

Things like this are going to be problematic. This service can do no more than the print function of your browser right now. Any additional features that we want, will have to be implemented either in electron, or by creating an 'alternative' view that the service can print.

Alternative views also mean more problems however. It's a bit of a tradeoff.

Reply to "This won't work for crazy huge horizontal tables"