<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>GuruBlog : Articles about pdf</title>
    <description>local-guru.net</description>
    <link>http://www.local-guru.net/blog</link>
    <ttl>40</ttl>
    <item>
      <title>ebook pdf border remover</title>
      <link>http://www.local-guru.net//blog/2009/6/16/ebook-pdf-border-remover</link>
      <description>&lt;p&gt;cropborder is a little java-tool i wrote to remove the white border of a pdf file, to make it more readable on an
ebook-reader.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/img/guru/cropborder.png" alt="cropborder example" /&gt;&lt;/p&gt;

&lt;p&gt;the white margin around the content is very usefull when printed on paper, but is really anoying on an ebook-reader
because it only makes the text smaller.&lt;/p&gt;

&lt;p&gt;to use the tool call it with&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;java -jar cropborder.jar [-in &amp;lt;input.pdf&amp;gt;] [-out &amp;lt;output.pdf&amp;gt;] [-f &amp;lt;scaling factor&amp;gt;] [-l &amp;lt;dots to move the left border&amp;gt;] [-d &amp;lt;dots to move the lower border&amp;gt;]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;the default values for the parameter are&lt;/p&gt;

&lt;p&gt;in.pdf for intput
out.pdf for output
1.4 for the scaling factor
and shift by -100, and -130 points (a point is a 1/72 inch)&lt;/p&gt;

&lt;p&gt;the tool uses the iText library and is published under the "do whatever you like, but don't blame me if it goes boom"-Licence&lt;/p&gt;

&lt;p&gt;i also made a &lt;a href="http://www.local-guru.net/blog/pages/ebook-pdf-border-remover"&gt;project&lt;/a&gt; page for it&lt;/p&gt;

&lt;h2&gt;Download&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.local-guru.net/projects/cropborder/cropborder-0.1.zip"&gt;cropborder-0.1.zip&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>2009-06-16T03:04:00+02:00</pubDate>
    </item>
    <item>
      <title>rotated text in reportlabs</title>
      <link>http://www.local-guru.net//blog/2009/4/9/rotated-text-in-reportlabs</link>
      <description>&lt;p&gt;if you want to make a great chart like the one below in &lt;a href="http://www.reportlab.org/"&gt;reportlab&lt;/a&gt;, you need rotated text.
it isn't very complicated - its just a bit hard to find som examples on the net.&lt;/p&gt;

&lt;p&gt;the canvas in reportlab has a &lt;em&gt;saveState&lt;/em&gt; and a &lt;em&gt;restoreState&lt;/em&gt; method, and supports &lt;em&gt;rotate&lt;/em&gt; and &lt;em&gt;translate&lt;/em&gt; similar
to openGL or processing. see the code example below who it is done.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.local-guru.net/img/guru/reportlabs_chart.png" alt="chart with rotated lables" /&gt;&lt;/p&gt;
</description>
      <pubDate>2009-04-09T10:09:00+02:00</pubDate>
    </item>
    <item>
      <title>ReportLab Test</title>
      <link>http://www.local-guru.net//blog/2008/9/10/reportlab-test</link>
      <description>&lt;p&gt;I just have tested &lt;a href="http://www.reportlab.org/"&gt;reportlab&lt;/a&gt; a python-framework for pdf generation.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;from reportlab.pdfgen import canvas
from reportlab.lib.units import cm


c = canvas.Canvas("hello.pdf")

c.drawString(2*cm,28*cm,"Hello World")

c.line( 2*cm, 26*cm, 2*cm, 16*cm)
c.line( 2*cm, 16*cm, 12*cm, 16*cm )

c.setFillColorRGB( 0, 0, 1 )
c.rect( 2.5*cm, 16*cm, 1.5*cm, 7*cm, fill = 1 )
c.setFillColorRGB( 0, 1, 0 )
c.rect( 4.5*cm, 16*cm, 1.5*cm, 6*cm, fill = 1 )
c.setFillColorRGB( 1, 0, 0 )
c.rect( 6.5*cm, 16*cm, 1.5*cm, 8*cm, fill = 1 )

c.showPage()
c.save()
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;this little script generates a pdf containing 'hello world' and a simple bar-chart.
i think i will give it a try if i have to generate pdf-reports the next time&lt;/p&gt;
</description>
      <pubDate>2008-09-10T09:03:00+02:00</pubDate>
    </item>
    <item>
      <title>PDF for N770</title>
      <link>http://www.local-guru.net//blog/2007/12/7/pdf-for-n770</link>
      <description>&lt;p&gt;I own a Nokia 770 which i use to read pdf-files in the subway.  i realy like it, but it has one downside - it is extreamly slow in changing the page if the page has to be zoomed or scrolled.
the solution i found was to define a custom papersize for my "print-to-pdf" dialog, which fits into my N770 screen without the need to scroll or zoom.&lt;/p&gt;

&lt;p&gt;if i want to read some website-content offline in the subway,
i just have to print it to pdf using my custom page-format and copy it to my device using bluetooth.&lt;/p&gt;
</description>
      <pubDate>2007-12-07T06:42:00+01:00</pubDate>
    </item>
  </channel>
</rss>

