Archive for August, 2007

how to make N-up PDF with free software

The main benefit of N-up is to cut paper costs. For example, you can cut down your paper cost by 50% with 2-up printing / copying, and 75% with 4-up printing / copying etc. This feature is also useful for producing handouts and presentation notes.

some printers support N-up printing, but I just want to tell you a N-up software,

Usage: java nup_pdf [options]

infile : input PDF file
outfile : output PDF file
pages : number of pages per sheet. pages = 2^n * x^2

Options:
-b : draw bounding boxes
-m : outer margin (measured in points)
-s : spacing between pages (measured in points)
-k : 0=n-Up, 1=Booklet

(C) 2005 Marcus May (QuoVadis/NBS)

it bases on iText, you can download

      PDF N-UP Maker,compiled by gcj, does not jvm, only windows console version
      nup_pdf.jar, java version, can run at windows, linux, Mac OS X, need jre1.4 or over
      nup_pdf.java, source code, from qvPDF.
Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

How to let SharpDevelop Reports support CJK encoding PDF export

Glad to know iTextSharp is used in SharpDevelop Reports, because iTextSharp supports CJK(maybe I should say it supports all encodings).

I downloaded SharpDevelopReports_2.2.0.263_Source and had a test, it does not support Chinese Characters, so I reviewed the source codes, I found the following lines,

if (this.StyleDecorator.Font.Unit == GraphicsUnit.Point) {

font = FontFactory.GetFont(this.StyleDecorator.Font.FontFamily.Name,
this.StyleDecorator.Font.Size,
(int)this.StyleDecorator.Font.Style);
} else {

font = FontFactory.GetFont(this.StyleDecorator.Font.FontFamily.Name,
new UnitConverter(this.StyleDecorator.Font.Size,XGraphicsUnit.Pixel).Point,
(int)this.StyleDecorator.Font.Style);
}

by default, it only supports “CP1250″, it can not show Chinese Characters correctly. I changed the codes to
if (this.StyleDecorator.Font.Unit == GraphicsUnit.Point) {

font = FontFactory.GetFont(this.StyleDecorator.Font.FontFamily.Name, BaseFont.IDENTITY_H,
this.StyleDecorator.Font.Size,
(int)this.StyleDecorator.Font.Style);
} else {

font = FontFactory.GetFont(this.StyleDecorator.Font.FontFamily.Name,BaseFont.IDENTITY_H,
new UnitConverter(this.StyleDecorator.Font.Size,XGraphicsUnit.Pixel).Point,
(int)this.StyleDecorator.Font.Style);
}

let it uses “IDENTITY_H”, and it can show Chinese now, of course it is not a good way, and I found JasperReports also stores pdfEncoding in report files , here is an example,

<font fontName=”Arial” size=”14″ pdfFontName=”ARIAL.TTF” pdfEncoding=”Identity-H” isPdfEmbedded=”true”/>


so how about sdr? btw, how about let SharpDevelope Reports supports JasperReports format? JasperReports format is very popular and mature now.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

iTextSharp will be used in SharpDevelopReports

From the SharpDevelopReports forum, Peter Forstmeier said “i’m switching from PdfSharp to itextSharp“.
from SharpDevelopReports Roadmap, it says “Change from PdfSharp to iTextSharp”.
btw, I attach some info about SharpDevelopReports,

Image

SharpDevelop Reports (SDR) is the open source .NET reporting solution formerly known as SharpReport. It started as an integrated part of SharpDevelop, but it is now developed as a standalone reporting solution (that still ships with SharpDevelop). SDR supports Windows clients as well as Web applications thanks to its ability to use printers or output directly to PDF. Databases as well as object lists are supported as data sources.

Version 2.2

SharpDevelop Reports is integrated with the open source IDE SharpDevelop (Download SharpDevelop). SDR, however, is also available as a standalone download from SourceForge.

Please note that the binaries do not ship with sample reports or reporting applications. To get access to the samples, please download the source distribution. Sample documentation can be found online on this site Samples.

Most Current Version

The most current released version is 2.2. The build number is 2.2.0.229, 6/28/2007.

Important: due to changes in the file format, report files from version 2.1 or older cannot be loaded with SDR 2.2.

System Requirements

In order to run SharpDevelop Reports, you need the following:

  1. Windows XP SP2 or newer
  2. .NET Framework 2.0 installed
Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride