From dirk at haun-online.de Sat Jan 3 09:04:03 2015 From: dirk at haun-online.de (Dirk Haun) Date: Sat, 3 Jan 2015 15:04:03 +0100 Subject: [geeklog-devel] PDF from article Message-ID: <91A5523F-EB39-4A8A-A5AD-F772B063CA35@haun-online.de> So I need to create PDFs from some of my articles. Only new ones, actually, so I don't mind a little extra manual work. I thought I'd simply use the "print to PDF" option from my operating system (Mac OS X, but Windows or Linux have similar options, AFAIK). The results weren't what I was hoping for, though. Just printing the "normal" article view will include the site's header and footer, as well as all the stuff displayed in the side blocks (e.g. Who's online) that you don't really need here. The dedicated "print" view that we have, however, doesn't load the stylesheet. So the article's formatting is lost, images don't show up as expected and so on. I wonder if our print view really makes sense like that. Shouldn't we at least load the stylesheet to preserve the formatting? After hacking that in, I encountered another problem: Links in the article are shown underlined but the actual URL they link to is lost. While you can make URLs in PDFs work like in HTML that would require creating the entire PDF from within Geeklog with the help of a PDF library (PDFlib or the like) and I didn't really want to invest that much time. So I extracted the URLs from the article text and added them as footnotes at the end of the article. I also removed the underlines and instead inserted the footnote number in the text. The result isn't perfect - it doesn't handle page breaks, for example. But I'm quite please with the way it looks. It's a clean look (without the site's header/footer or side blocks) but properly formatted. And you still get the URLs of the linked sites (the Mac OS X Preview app actually lets you click on those, at least the ones that don't wrap). The code I came up with for this is not very elegant, though, to put it mildly. It also includes some code to handle special cases on my site. Still, I was wondering if I should try and integrate some of this back into Geeklog and in which way. Right now, I gave it a separate link, /pdf instead of /print. But, as stated above, maybe it would make more sense to modify the existing print view and make it more usable. Thoughts? Dirk P.S. Some of you may remember that Geeklog did have an option to generate PDFs at one point. But it didn't really work all that well and was eventually removed again. https://www.geeklog.net/article.php/20040607171321591 -- https://www.themobilepresenter.com/ From danstoner at gmail.com Sat Jan 3 10:39:07 2015 From: danstoner at gmail.com (Dan Stoner) Date: Sat, 3 Jan 2015 10:39:07 -0500 Subject: [geeklog-devel] PDF from article In-Reply-To: <91A5523F-EB39-4A8A-A5AD-F772B063CA35@haun-online.de> References: <91A5523F-EB39-4A8A-A5AD-F772B063CA35@haun-online.de> Message-ID: I think I remember the little "pdf" icon that used to appear next to the printer icon. So these sound like two features and both would be nice: 1. nicer print view 2. article to PDF - Dan Stoner On Sat, Jan 3, 2015 at 9:04 AM, Dirk Haun wrote: > So I need to create PDFs from some of my articles. Only new ones, > actually, so I don't mind a little extra manual work. I thought I'd simply > use the "print to PDF" option from my operating system (Mac OS X, but > Windows or Linux have similar options, AFAIK). The results weren't what I > was hoping for, though. > > Just printing the "normal" article view will include the site's header and > footer, as well as all the stuff displayed in the side blocks (e.g. Who's > online) that you don't really need here. > > The dedicated "print" view that we have, however, doesn't load the > stylesheet. So the article's formatting is lost, images don't show up as > expected and so on. > > I wonder if our print view really makes sense like that. Shouldn't we at > least load the stylesheet to preserve the formatting? > > > After hacking that in, I encountered another problem: Links in the article > are shown underlined but the actual URL they link to is lost. While you can > make URLs in PDFs work like in HTML that would require creating the entire > PDF from within Geeklog with the help of a PDF library (PDFlib or the like) > and I didn't really want to invest that much time. > > So I extracted the URLs from the article text and added them as footnotes > at the end of the article. I also removed the underlines and instead > inserted the footnote number in the text. > > The result isn't perfect - it doesn't handle page breaks, for example. But > I'm quite please with the way it looks. It's a clean look (without the > site's header/footer or side blocks) but properly formatted. And you still > get the URLs of the linked sites (the Mac OS X Preview app actually lets > you click on those, at least the ones that don't wrap). > > The code I came up with for this is not very elegant, though, to put it > mildly. It also includes some code to handle special cases on my site. > Still, I was wondering if I should try and integrate some of this back into > Geeklog and in which way. Right now, I gave it a separate link, /pdf > instead of /print. But, as stated above, maybe it would make more sense to > modify the existing print view and make it more usable. > > Thoughts? > > Dirk > > P.S. Some of you may remember that Geeklog did have an option to generate > PDFs at one point. But it didn't really work all that well and was > eventually removed again. > https://www.geeklog.net/article.php/20040607171321591 > > > -- > https://www.themobilepresenter.com/ > > _______________________________________________ > geeklog-devel mailing list > geeklog-devel at lists.geeklog.net > https://pairlist8.pair.net/mailman/listinfo/geeklog-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From websitemaster at cogeco.net Sat Jan 3 13:13:47 2015 From: websitemaster at cogeco.net (Tom) Date: Sat, 3 Jan 2015 13:13:47 -0500 Subject: [geeklog-devel] PDF from article In-Reply-To: <91A5523F-EB39-4A8A-A5AD-F772B063CA35@haun-online.de> References: <91A5523F-EB39-4A8A-A5AD-F772B063CA35@haun-online.de> Message-ID: <004401d02781$04e58700$0eb09500$@cogeco.net> I think at least updating the printable story format to use some css would be nice. I know a lot of my articles in printed format do not look very nice. I wouldn't use the pdf option but I can see where that would be handy for others as well. Does all the css get included (plugins etc...) or just the themes? The reason I am asking is that the odd time I have an autotag in my story that it's output has classes that requires it's plugins css. Not a huge deal just thought I would ask. Tom -----Original Message----- From: geeklog-devel [mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Dirk Haun Sent: January-03-15 9:04 AM To: Geeklog Development Subject: [geeklog-devel] PDF from article So I need to create PDFs from some of my articles. Only new ones, actually, so I don't mind a little extra manual work. I thought I'd simply use the "print to PDF" option from my operating system (Mac OS X, but Windows or Linux have similar options, AFAIK). The results weren't what I was hoping for, though. Just printing the "normal" article view will include the site's header and footer, as well as all the stuff displayed in the side blocks (e.g. Who's online) that you don't really need here. The dedicated "print" view that we have, however, doesn't load the stylesheet. So the article's formatting is lost, images don't show up as expected and so on. I wonder if our print view really makes sense like that. Shouldn't we at least load the stylesheet to preserve the formatting? After hacking that in, I encountered another problem: Links in the article are shown underlined but the actual URL they link to is lost. While you can make URLs in PDFs work like in HTML that would require creating the entire PDF from within Geeklog with the help of a PDF library (PDFlib or the like) and I didn't really want to invest that much time. So I extracted the URLs from the article text and added them as footnotes at the end of the article. I also removed the underlines and instead inserted the footnote number in the text. The result isn't perfect - it doesn't handle page breaks, for example. But I'm quite please with the way it looks. It's a clean look (without the site's header/footer or side blocks) but properly formatted. And you still get the URLs of the linked sites (the Mac OS X Preview app actually lets you click on those, at least the ones that don't wrap). The code I came up with for this is not very elegant, though, to put it mildly. It also includes some code to handle special cases on my site. Still, I was wondering if I should try and integrate some of this back into Geeklog and in which way. Right now, I gave it a separate link, /pdf instead of /print. But, as stated above, maybe it would make more sense to modify the existing print view and make it more usable. Thoughts? Dirk P.S. Some of you may remember that Geeklog did have an option to generate PDFs at one point. But it didn't really work all that well and was eventually removed again. https://www.geeklog.net/article.php/20040607171321591 -- https://www.themobilepresenter.com/ _______________________________________________ geeklog-devel mailing list geeklog-devel at lists.geeklog.net https://pairlist8.pair.net/mailman/listinfo/geeklog-devel From dirk at haun-online.de Sat Jan 3 13:38:55 2015 From: dirk at haun-online.de (Dirk Haun) Date: Sat, 3 Jan 2015 19:38:55 +0100 Subject: [geeklog-devel] PDF from article In-Reply-To: <004401d02781$04e58700$0eb09500$@cogeco.net> References: <91A5523F-EB39-4A8A-A5AD-F772B063CA35@haun-online.de> <004401d02781$04e58700$0eb09500$@cogeco.net> Message-ID: Tom wrote: > I think at least updating the printable story format to use some css would > be nice. I know a lot of my articles in printed format do not look very > nice. I wouldn't use the pdf option but I can see where that would be handy > for others as well. Just to clarify: Effectively, what I'm doing is creating a nicer print view - which you can then use to print to PDF, if your operating system or browser lets you do that. I'm not building PDF support into Geeklog. > Does all the css get included (plugins etc...) or just the themes? The > reason I am asking is that the odd time I have an autotag in my story that > it's output has classes that requires it's plugins css. Not a huge deal just > thought I would ask. I'm simply calling $_SCRIPTS->getHeader() right now. That would include plugin CSS, would it not? Dirk -- https://www.themobilepresenter.com/ From websitemaster at cogeco.net Sat Jan 3 19:08:25 2015 From: websitemaster at cogeco.net (Tom) Date: Sat, 3 Jan 2015 19:08:25 -0500 Subject: [geeklog-devel] PDF from article In-Reply-To: References: <91A5523F-EB39-4A8A-A5AD-F772B063CA35@haun-online.de> <004401d02781$04e58700$0eb09500$@cogeco.net> Message-ID: <004e01d027b2$8f967a90$aec36fb0$@cogeco.net> Okay my mistake :-) >> I'm simply calling $_SCRIPTS->getHeader() right now. That would include plugin CSS, would it not? Yes it would. Tom -----Original Message----- From: geeklog-devel [mailto:geeklog-devel-bounces at lists.geeklog.net] On Behalf Of Dirk Haun Sent: January-03-15 1:39 PM To: Geeklog Development Subject: Re: [geeklog-devel] PDF from article Tom wrote: > I think at least updating the printable story format to use some css > would be nice. I know a lot of my articles in printed format do not > look very nice. I wouldn't use the pdf option but I can see where that > would be handy for others as well. Just to clarify: Effectively, what I'm doing is creating a nicer print view - which you can then use to print to PDF, if your operating system or browser lets you do that. I'm not building PDF support into Geeklog. > Does all the css get included (plugins etc...) or just the themes? The > reason I am asking is that the odd time I have an autotag in my story > that it's output has classes that requires it's plugins css. Not a > huge deal just thought I would ask. I'm simply calling $_SCRIPTS->getHeader() right now. That would include plugin CSS, would it not? Dirk -- https://www.themobilepresenter.com/ _______________________________________________ geeklog-devel mailing list geeklog-devel at lists.geeklog.net https://pairlist8.pair.net/mailman/listinfo/geeklog-devel From taharaxp at gmail.com Sun Jan 4 02:58:36 2015 From: taharaxp at gmail.com (Yoshinori Tahara) Date: Sun, 4 Jan 2015 16:58:36 +0900 Subject: [geeklog-devel] PDF from article In-Reply-To: <91A5523F-EB39-4A8A-A5AD-F772B063CA35@haun-online.de> References: <91A5523F-EB39-4A8A-A5AD-F772B063CA35@haun-online.de> Message-ID: Dirk Haun wrote: > The result isn't perfect - it doesn't handle page breaks, for example. > But I'm quite please with the way it looks. It's a clean look (without > the site's header/footer or side blocks) but properly formatted. And > you still get the URLs of the linked sites (the Mac OS X Preview app > actually lets you click on those, at least the ones that don't wrap). I think this improvement will be able to provide benefits to all users. > But, as stated above, maybe it would make more sense to modify the > existing print view and make it more usable. I hope that you will replace the existing print view feature. -- Yoshinori Tahara - dengen From dirk at haun-online.de Mon Jan 26 04:20:07 2015 From: dirk at haun-online.de (Dirk Haun) Date: Mon, 26 Jan 2015 10:20:07 +0100 Subject: [geeklog-devel] FYI: Mantis update Message-ID: Mantis, our bugtracker, had to be updated due to security issues. Let me know if you encounter any problems. Dirk -- https://www.themobilepresenter.com/ From cordiste at free.fr Fri Jan 30 08:04:11 2015 From: cordiste at free.fr (cordiste) Date: Fri, 30 Jan 2015 14:04:11 +0100 Subject: [geeklog-devel] FYI: Mantis update In-Reply-To: References: Message-ID: Hi, Thank you for this update. Ben 2015-01-26 10:20 GMT+01:00 Dirk Haun : > Mantis, our bugtracker, had to be updated due to security issues. Let me know if you encounter any problems. > > Dirk > > > -- > https://www.themobilepresenter.com/ > > _______________________________________________ > geeklog-devel mailing list > geeklog-devel at lists.geeklog.net > https://pairlist8.pair.net/mailman/listinfo/geeklog-devel >