Quantcast
Channel: DEVONtechnologies Community - Latest posts
Viewing all articles
Browse latest Browse all 16167

Webpage to pdf version can not show long line code

$
0
0

I snapshot a lot of web pages, and I use PDF in pretty much all cases, and consequently, have often run into the same problem as you. I concur with @chrillek wrote: PDF is problematic for cases like this.

You may already have realized this, so my apologies if this is repeating something you already know. One way to think about the situation is that the PDF format describes a snapshot of what you see. If the content is cut off, the snapshot captured in PDF form will be as well. So, one way to try to avoid the problem is to manipulate the original source before capturing it in PDF format. Rotating to landscape format may be enough for some cases; shrinking the page zooming/magnification in a browser sometimes can be another way (doesn’t work in all cases, of course, but sometimes it makes enough of a difference). Some web pages may offer additional controls over the way content is displayed, for example, by letting you change the “theme” of the page. Some pages are also available in different variants. For example, for a repository in GitHub, if it uses GitHub Pages, the same content you come across in the G.P. may be available (and presented differently) in the repository’s README file. Checking both might reveal that one or the other format wraps the lines differently.

But sometimes it’s just impossible to make it work, because the authors of the source web page did not arrange the content in a suitable way. My own approach for those cases is to save the text somehow, either by using some of the text-format capture facilities in DEVONthink, or saving the page source as HTML.

If you save a lot of things that have this problem (e.g., if you’re trying to save lot of things from GitHub), it may be best to work out alternatives to using PDF. For example, if you want to save the content of a GitHub gist, I would probably get the raw text instead. For repositories, you can export entire repos as zip archives (there’s a button for that right on every GItHub repo’s front page), or you can use command-line tools (e.g., github-backup).


Viewing all articles
Browse latest Browse all 16167

Trending Articles