Archive for August 10th, 2007

iText and iTextSharp support PDF/A-1 now

From iTextSharp mail list, I got a great news, iText and iTextSharp support PDF/A-1 now.

I’ve added support for PDF/A-1 and is available in the iText SVN and the iTextSharp CVS. An example:

example for java:
Document doc = new Document(PageSize.A4);
PdfWriter writer = PdfWriter.getInstance(doc, new FileOutputStream("C:\\hello_A1-b.pdf"));
writer.setPDFXConformance(PdfWriter.PDFA1B);
doc.open();
PdfDictionary outi = new PdfDictionary(PdfName.OUTPUTINTENT);
outi.put(PdfName.OUTPUTCONDITIONIDENTIFIER, new PdfString("sRGB IEC61966-2.1"));
outi.put(PdfName.INFO, new PdfString("sRGB IEC61966-2.1"));
outi.put(PdfName.S, PdfName.GTS_PDFA1);
ICC_Profile icc = ICC_Profile.getInstance(new FileInputStream("c:\\srgb.profile"));
PdfICCBased ib = new PdfICCBased(icc);
ib.remove(PdfName.ALTERNATE);
outi.put(PdfName.DESTOUTPUTPROFILE, writer.addToBody(ib).getIndirectReference());
writer.getExtraCatalog().put(PdfName.OUTPUTINTENTS, new PdfArray(outi));

BaseFont bf = BaseFont.createFont("c:\\windows\\fonts\\arial.ttf", BaseFont.WINANSI, true);
Font f = new Font(bf, 12);
doc.add(new Paragraph("hello", f));
writer.createXmpMetadata();
doc.close();

And for C#:

Document doc = new Document(PageSize.A4);
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream("C:\\hello_A1-b_cs.pdf", FileMode.Create));
writer.PDFXConformance = PdfWriter.PDFA1B;
doc.Open();
PdfDictionary outi = new PdfDictionary(PdfName.OUTPUTINTENT);
outi.Put(PdfName.OUTPUTCONDITIONIDENTIFIER, new PdfString("sRGB IEC61966-2.1"));
outi.Put(PdfName.INFO, new PdfString("sRGB IEC61966-2.1"));
outi.Put(PdfName.S, PdfName.GTS_PDFA1);
ICC_Profile icc = ICC_Profile.GetInstance("c:\\srgb.profile");
PdfICCBased ib = new PdfICCBased(icc);
ib.Remove(PdfName.ALTERNATE);
outi.Put(PdfName.DESTOUTPUTPROFILE, writer.AddToBody(ib).IndirectReference);
writer.ExtraCatalog.Put(PdfName.OUTPUTINTENTS, new PdfArray(outi));

BaseFont bf = BaseFont.CreateFont("c:\\windows\\fonts\\arial.ttf", BaseFont.WINANSI, true);
Font f = new Font(bf, 12);
doc.Add(new Paragraph("hello", f));
writer.CreateXmpMetadata();
doc.Close();

related files:
srgb.profile (4K) Download Attachment
hello_A1-b.pdf (23K) Download Attachment

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

The first day I got over US$3 from google adsense

This blog has been installed about 1 year, and yesterday(Aug 09, 2007) I got over US$3.11 from google adense, it is the first time over US$3.
I will write more articles about PDF, maybe also write some articles about affilate and email marketing, I have worked on affilate and email maketing for my boss over 8 month, most of them is about payday loans (cash advance category) in USA, we send our own offers, and also send offers from other affiliate network, such as CPA Empire, PrimaryAds, AzoogleAds and so on.

btw, I have got US$30 from Dreamhost Rewards and US$140 from the advertisement that put on my website for an company. And I got my first good checkout last month.
If you also want to build a website and make US dollars from it, why not do it now, if you want to buy dreamhost hosting, you can use this promo code RUBYPDF, with it ,you can even save US$97. And also

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

Ten Open Source Solutions Your Enterprise Should Be Using

I knew this article from iText forum .
and just list the Ten Open Source Solutions here, you can read the origin article.

  • Web Services
  • XFire
    Axis2

  • SOA
  • ActiveMQ
    ServiceMix

  • Integration
  • POI
    iText

  • Frameworks
  • Hibernate
    Spring

  • Libraries
  • JUnit
    Jakarta Commons

btw, I do not know java very well, but I do not know why the author does not list ant and many other great open source projects?

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