がんばれ

勉強した記録です。

2015-01-01から1年間の記事一覧

C++でlibharu(3)UTF8成功

UTF8成功しました。 変更点は、 Makefile.msvcファイルに src\hpdf_encoder_utf.obj を追加して、作成しました。 使い方とテストです。 https://groups.google.com/forum/#!topic/libharu/YzXoH_K3OAI ここに書いてあるパッチは既に追加されていたので、 utf…

C++でlibharu(2)UTF8に挑戦中

時代はUNICODEです。 libharuでも、対応していると信じて挑戦します。 libharuのページにも記載している。 HPDF_UseUTFEncodings がないとか表示されます。 変にUTF-8を入れると、エラーに・・・orz とりあえず、原因を探します。 HPDF_UseUTFEncodings関数…

C++でlibharu(1)文字(Shift-JIS)のPDF

今度は、C++とlibharuで、文字(Shift-JISを出力します。 ソース HPDF_Doc pdf; HPDF_Font font; HPDF_Page page; pdf = HPDF_New(NULL, NULL); HPDF_UseJPFonts (pdf); HPDF_UseJPEncodings (pdf); font = HPDF_GetFont (pdf, "MS-Gothic", "90ms-RKSJ-H"); …

C++でlibharu(1)ブランクPDF

VC++でも使えるhpdf UTF-8に対応(バグなし)の可能性が出てきたので、使ってみます。 1 libharuを入手 http://libharu.org/ ここから、入手できます。 zlibとか、libpngを用意して、モジュールの作成です。 2 空白PDFの作成 HPDF_Doc pdf; HPDF_Font font…

VC++のスケルトン

#ifndef UNICODE #define UNICODE #endif #include <windows.h> LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, int nCmdShow) { // ウィンドウ クラスを登</windows.h>…