0

I tried to download https://en.wikipedia.org/wiki/Java_(programming_language) as a PDF file. I clicked "Download as PDF", and downloaded the generated .pdf file.

But the Java code part in the .pdf file was rendered as ordinary text, and lumped up together (no syntax indent and no highlighting which appear in the web page).

Is there a solution for that?

1

In Chrome, at least, if you use your browser to Print the page, with the choice "Save as PDF", you'll get a PDF file that does not have that formatting problem.

This PDF doen't have two-column formatting nor as nice pagination, but it's more readable than the word-wrapped source code.

Also, do report the bug to Wikipedia.

1

Wikipedia reports that it is having issues with PDF downloads, but all seems as it should be to me for the page you link to. For example, a snip from the downloaded PDF):

Java code example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.