2011-02-06 16:16 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbhpdf/hbhpdf.hbp
* contrib/hbhpdf/hbhpdf.h
* contrib/hbhpdf/harupdf.c
+ contrib/hbhpdf/annot.c
+ contrib/hbhpdf/enccns.c
+ contrib/hbhpdf/enccnt.c
+ contrib/hbhpdf/encjp.c
+ contrib/hbhpdf/enckr.c
+ contrib/hbhpdf/font.c
+ contrib/hbhpdf/fontcns.c
+ contrib/hbhpdf/fontcnt.c
+ contrib/hbhpdf/fontjp.c
+ contrib/hbhpdf/fontkr.c
+ contrib/hbhpdf/image.c
+ contrib/hbhpdf/pdfa.c
+ Split monolithic wrapper into logical parts. This will result in
significant decrease in executable size for most users.
This commit is contained in:
@@ -16,6 +16,25 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-02-06 16:16 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbhpdf/hbhpdf.hbp
|
||||
* contrib/hbhpdf/hbhpdf.h
|
||||
* contrib/hbhpdf/harupdf.c
|
||||
+ contrib/hbhpdf/annot.c
|
||||
+ contrib/hbhpdf/enccns.c
|
||||
+ contrib/hbhpdf/enccnt.c
|
||||
+ contrib/hbhpdf/encjp.c
|
||||
+ contrib/hbhpdf/enckr.c
|
||||
+ contrib/hbhpdf/font.c
|
||||
+ contrib/hbhpdf/fontcns.c
|
||||
+ contrib/hbhpdf/fontcnt.c
|
||||
+ contrib/hbhpdf/fontjp.c
|
||||
+ contrib/hbhpdf/fontkr.c
|
||||
+ contrib/hbhpdf/image.c
|
||||
+ contrib/hbhpdf/pdfa.c
|
||||
+ Split monolithic wrapper into logical parts. This will result in
|
||||
significant decrease in executable size for most users.
|
||||
|
||||
2011-02-06 15:44 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
+ contrib/hbhpdf/hbhpdf.h
|
||||
* contrib/hbhpdf/harupdf.c
|
||||
@@ -7314,7 +7333,7 @@
|
||||
! Newly added 2.2.0 wrapper code protected with version guards.
|
||||
Added fallback code for older versions.
|
||||
; TODO: Split the wrapper into separate files to save final
|
||||
binary size.
|
||||
binary size. [DONE]
|
||||
|
||||
2010-10-23 09:07 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbhpdf/harupdf.c
|
||||
|
||||
755
harbour/contrib/hbhpdf/annot.c
Normal file
755
harbour/contrib/hbhpdf/annot.c
Normal file
@@ -0,0 +1,755 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPDF_LinkAnnot_SetHighlightMode( hAnnot, nHilightMode ) -> hStatus
|
||||
nHilightMode ==
|
||||
HPDF_ANNOT_NO_HIGHTLIGHT 1 No highlighting.
|
||||
HPDF_ANNOT_INVERT_BOX 2 Invert the contents of the area of annotation.
|
||||
HPDF_ANNOT_INVERT_BORDER 3 Invert the annotation’s border.
|
||||
HPDF_ANNOT_DOWN_APPEARANCE 4 Dent the annotation.
|
||||
*/
|
||||
HB_FUNC( HPDF_LINKANNOT_SETHIGHLIGHTMODE )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_LinkAnnot_SetHighlightMode( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_AnnotHighlightMode ) hb_parni( 2 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPDF_LinkAnnot_SetBorderStyle( hAnnot, nWidth, nDashOn, nDashOff ) -> hStatus
|
||||
*/
|
||||
HB_FUNC( HPDF_LINKANNOT_SETBORDERSTYLE )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_LinkAnnot_SetBorderStyle( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ), ( HPDF_UINT16 ) hb_parni( 3 ), ( HPDF_UINT16 ) hb_parni( 4 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPDF_TextAnnot_SetIcon( hAnnot, nIconID ) -> hStatus
|
||||
nIconID
|
||||
HPDF_ANNOT_ICON_COMMENT
|
||||
HPDF_ANNOT_ICON_KEY
|
||||
HPDF_ANNOT_ICON_NOTE
|
||||
HPDF_ANNOT_ICON_HELP
|
||||
HPDF_ANNOT_ICON_NEW_PARAGRAPH
|
||||
HPDF_ANNOT_ICON_PARAGRAPH
|
||||
HPDF_ANNOT_ICON_INSERT
|
||||
*/
|
||||
HB_FUNC( HPDF_TEXTANNOT_SETICON )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_TextAnnot_SetIcon( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_AnnotIcon ) hb_parni( 2 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPDF_TextAnnot_SetOpened( hAnnot, lOpened ) -> hStatus
|
||||
*/
|
||||
HB_FUNC( HPDF_TEXTANNOT_SETOPENED )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_TextAnnot_SetOpened( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parl( 2 ) ? HPDF_TRUE : HPDF_FALSE ) );
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
HPDF_Page_CreateFreeTextAnnot (HPDF_Page page,
|
||||
HPDF_Rect rect,
|
||||
const char *text,
|
||||
HPDF_Encoder encoder);
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATEFREETEXTANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateFreeTextAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
HPDF_Page_CreateLineAnnot (HPDF_Page page,
|
||||
const char *text,
|
||||
HPDF_Encoder encoder);
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATELINEANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retptr( HPDF_Page_CreateLineAnnot( ( HPDF_Page ) hb_parptr( 1 ), hb_parc( 2 ), ( HPDF_Encoder ) hb_parptr( 3 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_Annotation
|
||||
HPDF_Page_CreateTextMarkupAnnot (HPDF_Page page,
|
||||
HPDF_Rect rect,
|
||||
const char *text,
|
||||
HPDF_Encoder encoder,
|
||||
HPDF_AnnotType subType);
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATETEXTMARKUPANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateTextMarkupAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ), ( HPDF_AnnotType ) hb_parni( 5 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
HPDF_Page_CreateHighlightAnnot (HPDF_Page page,
|
||||
HPDF_Rect rect,
|
||||
const char *text,
|
||||
HPDF_Encoder encoder);
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATEHIGHLIGHTANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateHighlightAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
HPDF_Page_CreateUnderlineAnnot (HPDF_Page page,
|
||||
HPDF_Rect rect,
|
||||
const char *text,
|
||||
HPDF_Encoder encoder);
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATEUNDERLINEANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateUnderlineAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
HPDF_Page_CreateSquigglyAnnot (HPDF_Page page,
|
||||
HPDF_Rect rect,
|
||||
const char *text,
|
||||
HPDF_Encoder encoder);
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATESQUIGGLYANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateSquigglyAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
HPDF_Page_CreateStrikeOutAnnot (HPDF_Page page,
|
||||
HPDF_Rect rect,
|
||||
const char *text,
|
||||
HPDF_Encoder encoder);
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATESTRIKEOUTANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateStrikeOutAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
HPDF_Page_CreatePopupAnnot ( HPDF_Page page,
|
||||
HPDF_Rect rect,
|
||||
HPDF_Annotation parent);
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATEPOPUPANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreatePopupAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, ( HPDF_Annotation ) hb_parptr( 3 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
HPDF_Page_CreateStampAnnot ( HPDF_Page page,
|
||||
HPDF_Rect rect,
|
||||
HPDF_StampAnnotName name,
|
||||
const char* text,
|
||||
HPDF_Encoder encoder);
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATESTAMPANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateStampAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, ( HPDF_StampAnnotName ) hb_parni( 3 ), hb_parc( 4 ), ( HPDF_Encoder ) hb_parptr( 5 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
HPDF_Page_CreateSquareAnnot (HPDF_Page page,
|
||||
HPDF_Rect rect,
|
||||
const char *text,
|
||||
HPDF_Encoder encoder);
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATESQUAREANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateSquareAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
HPDF_Page_CreateCircleAnnot (HPDF_Page page,
|
||||
HPDF_Rect rect,
|
||||
const char *text,
|
||||
HPDF_Encoder encoder);
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATECIRCLEANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateCircleAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_Annot_SetRGBColor (HPDF_Annotation annot, HPDF_RGBColor color);
|
||||
*/
|
||||
HB_FUNC( HPDF_ANNOT_SETRGBCOLOR )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_RGBColor rgb;
|
||||
|
||||
rgb.r = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rgb.g = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rgb.b = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_Annot_SetRGBColor( ( HPDF_Annotation ) hb_parptr( 1 ), rgb ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_Annot_SetCMYKColor (HPDF_Annotation annot, HPDF_CMYKColor color);
|
||||
*/
|
||||
HB_FUNC( HPDF_ANNOT_SETCMYKCOLOR )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_CMYKColor cmyk;
|
||||
|
||||
cmyk.c = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
cmyk.m = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
cmyk.y = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
cmyk.k = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_Annot_SetCMYKColor( ( HPDF_Annotation ) hb_parptr( 1 ), cmyk ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_Annot_SetGrayColor (HPDF_Annotation annot, HPDF_REAL color);
|
||||
*/
|
||||
HB_FUNC( HPDF_ANNOT_SETGRAYCOLOR )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_Annot_SetGrayColor( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_Annot_SetNoColor (HPDF_Annotation annot);
|
||||
*/
|
||||
HB_FUNC( HPDF_ANNOT_SETNOCOLOR )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_Annot_SetNoColor( ( HPDF_Annotation ) hb_parptr( 1 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetTitle (HPDF_Annotation annot, const char* name);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETTITLE )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetTitle( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parc( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetSubject (HPDF_Annotation annot, const char* name);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETSUBJECT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetSubject( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parc( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetCreationDate (HPDF_Annotation annot, HPDF_Date value);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETCREATIONDATE )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Date date;
|
||||
|
||||
memset( &date, 0, sizeof( date ) );
|
||||
|
||||
date.year = hb_parvni( 2, 1 );
|
||||
date.month = hb_parvni( 2, 2 );
|
||||
date.day = hb_parvni( 2, 3 );
|
||||
date.hour = hb_parvni( 2, 4 );
|
||||
date.minutes = hb_parvni( 2, 5 );
|
||||
date.seconds = hb_parvni( 2, 6 );
|
||||
date.ind = ' ';
|
||||
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetCreationDate( ( HPDF_Annotation ) hb_parptr( 1 ), date ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetTransparency (HPDF_Annotation annot, HPDF_REAL value);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETTRANSPARENCY )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetTransparency( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetIntent (HPDF_Annotation annot, HPDF_AnnotIntent intent);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETINTENT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetIntent( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_AnnotIntent ) hb_parni( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetPopup (HPDF_Annotation annot, HPDF_Annotation popup);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETPOPUP )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetPopup( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_Annotation ) hb_parptr( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetRectDiff (HPDF_Annotation annot, HPDF_Rect rect);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETRECTDIFF )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rc.top = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rc.right = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetRectDiff( ( HPDF_Annotation ) hb_parptr( 1 ), rc ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetCloudEffect (HPDF_Annotation annot, HPDF_INT cloudIntensity);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETCLOUDEFFECT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetCloudEffect( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_INT ) hb_parni( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetInteriorRGBColor (HPDF_Annotation annot, HPDF_RGBColor color);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETINTERIORRGBCOLOR )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_RGBColor rgb;
|
||||
|
||||
rgb.r = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
rgb.g = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
rgb.b = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetInteriorRGBColor( ( HPDF_Annotation ) hb_parptr( 1 ), rgb ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetInteriorCMYKColor (HPDF_Annotation annot, HPDF_CMYKColor color);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETINTERIORCMYKCOLOR )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_CMYKColor cmyk;
|
||||
|
||||
cmyk.c = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
cmyk.m = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
cmyk.y = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
cmyk.k = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetInteriorCMYKColor( ( HPDF_Annotation ) hb_parptr( 1 ), cmyk ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetInteriorGrayColor (HPDF_Annotation annot, HPDF_REAL color);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETINTERIORGRAYCOLOR )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetInteriorGrayColor( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_MarkupAnnot_SetInteriorTransparent (HPDF_Annotation annot);
|
||||
*/
|
||||
HB_FUNC( HPDF_MARKUPANNOT_SETINTERIORTRANSPARENT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetInteriorTransparent( ( HPDF_Annotation ) hb_parptr( 1 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_TextMarkupAnnot_SetQuadPoints ( HPDF_Annotation annot, HPDF_Point lb, HPDF_Point rb, HPDF_Point rt, HPDF_Point lt);
|
||||
*/
|
||||
HB_FUNC( HPDF_TEXTMARKUPANNOT_SETQUADPOINTS )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Point p1;
|
||||
HPDF_Point p2;
|
||||
HPDF_Point p3;
|
||||
HPDF_Point p4;
|
||||
|
||||
p1.x = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
p1.y = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
|
||||
p2.x = ( HPDF_REAL ) hb_parvnd( 3, 1 );
|
||||
p2.y = ( HPDF_REAL ) hb_parvnd( 3, 2 );
|
||||
|
||||
p3.x = ( HPDF_REAL ) hb_parvnd( 4, 1 );
|
||||
p3.y = ( HPDF_REAL ) hb_parvnd( 4, 2 );
|
||||
|
||||
p4.x = ( HPDF_REAL ) hb_parvnd( 5, 1 );
|
||||
p4.y = ( HPDF_REAL ) hb_parvnd( 5, 2 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_TextMarkupAnnot_SetQuadPoints( ( HPDF_Annotation ) hb_parptr( 1 ), p1, p2, p3, p4 ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_Annot_Set3DView ( HPDF_MMgr mmgr,
|
||||
HPDF_Annotation annot,
|
||||
HPDF_Annotation annot3d,
|
||||
HPDF_Dict view);
|
||||
*/
|
||||
HB_FUNC( HPDF_ANNOT_SET3DVIEW )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_Annot_Set3DView( ( HPDF_MMgr ) hb_parptr( 1 ), ( HPDF_Annotation ) hb_parptr( 2 ), ( HPDF_Annotation ) hb_parptr( 3 ), ( HPDF_Dict ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_PopupAnnot_SetOpened (HPDF_Annotation annot,
|
||||
HPDF_BOOL opened);
|
||||
*/
|
||||
HB_FUNC( HPDF_POPUPANNOT_SETOPENED )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_PopupAnnot_SetOpened( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_BOOL ) hb_parl( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_FreeTextAnnot_SetLineEndingStyle (HPDF_Annotation annot, HPDF_LineAnnotEndingStyle startStyle, HPDF_LineAnnotEndingStyle endStyle);
|
||||
*/
|
||||
HB_FUNC( HPDF_FREETEXTANNOT_SETLINEENDINGSTYLE )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_FreeTextAnnot_SetLineEndingStyle( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_LineAnnotEndingStyle ) hb_parni( 2 ), ( HPDF_LineAnnotEndingStyle ) hb_parni( 3 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_FreeTextAnnot_Set3PointCalloutLine (HPDF_Annotation annot, HPDF_Point startPoint, HPDF_Point kneePoint, HPDF_Point endPoint);
|
||||
*/
|
||||
HB_FUNC( HPDF_FREETEXTANNOT_SET3POINTCALLOUTLINE )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Point p1;
|
||||
HPDF_Point p2;
|
||||
HPDF_Point p3;
|
||||
|
||||
p1.x = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
p1.y = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
|
||||
p2.x = ( HPDF_REAL ) hb_parvnd( 3, 1 );
|
||||
p2.y = ( HPDF_REAL ) hb_parvnd( 3, 2 );
|
||||
|
||||
p3.x = ( HPDF_REAL ) hb_parvnd( 4, 1 );
|
||||
p3.y = ( HPDF_REAL ) hb_parvnd( 4, 2 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_FreeTextAnnot_Set3PointCalloutLine( ( HPDF_Annotation ) hb_parptr( 1 ), p1, p2, p3 ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_FreeTextAnnot_Set2PointCalloutLine (HPDF_Annotation annot, HPDF_Point startPoint, HPDF_Point endPoint);
|
||||
*/
|
||||
HB_FUNC( HPDF_FREETEXTANNOT_SET2POINTCALLOUTLINE )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Point p1;
|
||||
HPDF_Point p2;
|
||||
|
||||
p1.x = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
p1.y = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
|
||||
p2.x = ( HPDF_REAL ) hb_parvnd( 3, 1 );
|
||||
p2.y = ( HPDF_REAL ) hb_parvnd( 3, 2 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_FreeTextAnnot_Set2PointCalloutLine( ( HPDF_Annotation ) hb_parptr( 1 ), p1, p2 ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_FreeTextAnnot_SetDefaultStyle (HPDF_Annotation annot, const char* style);
|
||||
*/
|
||||
HB_FUNC( HPDF_FREETEXTANNOT_SETDEFAULTSTYLE )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_FreeTextAnnot_SetDefaultStyle( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parc( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_LineAnnot_SetPosition (HPDF_Annotation annot,
|
||||
HPDF_Point startPoint, HPDF_LineAnnotEndingStyle startStyle,
|
||||
HPDF_Point endPoint, HPDF_LineAnnotEndingStyle endStyle);
|
||||
*/
|
||||
HB_FUNC( HPDF_LINEANNOT_SETPOSITION )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Point p1;
|
||||
HPDF_Point p2;
|
||||
|
||||
p1.x = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
p1.y = ( HPDF_REAL ) hb_parvnd( 2, 2 );
|
||||
|
||||
p2.x = ( HPDF_REAL ) hb_parvnd( 4, 1 );
|
||||
p2.y = ( HPDF_REAL ) hb_parvnd( 4, 2 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_LineAnnot_SetPosition( ( HPDF_Annotation ) hb_parptr( 1 ), p1, ( HPDF_LineAnnotEndingStyle ) hb_parni( 3 ), p2, ( HPDF_LineAnnotEndingStyle ) hb_parni( 5 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_LineAnnot_SetLeader (HPDF_Annotation annot, HPDF_INT leaderLen, HPDF_INT leaderExtLen, HPDF_INT leaderOffsetLen);
|
||||
*/
|
||||
HB_FUNC( HPDF_LINEANNOT_SETLEADER )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_LineAnnot_SetLeader( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_LineAnnot_SetCaption (HPDF_Annotation annot, HPDF_BOOL showCaption, HPDF_LineAnnotCapPosition position, HPDF_INT horzOffset, HPDF_INT vertOffset);
|
||||
*/
|
||||
HB_FUNC( HPDF_LINEANNOT_SETCAPTION )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_LineAnnot_SetCaption( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parl( 2 ), ( HPDF_LineAnnotCapPosition ) hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_Annotation_SetBorderStyle (HPDF_Annotation annot,
|
||||
HPDF_BSSubtype subtype,
|
||||
HPDF_REAL width,
|
||||
HPDF_UINT16 dash_on,
|
||||
HPDF_UINT16 dash_off,
|
||||
HPDF_UINT16 dash_phase);
|
||||
*/
|
||||
HB_FUNC( HPDF_ANNOTATION_SETBORDERSTYLE )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_Annotation_SetBorderStyle( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_BSSubtype ) hb_parni( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_UINT16 ) hb_parni( 4 ), ( HPDF_UINT16 ) hb_parni( 5 ), ( HPDF_UINT16 ) hb_parni( 6 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
58
harbour/contrib/hbhpdf/enccns.c
Normal file
58
harbour/contrib/hbhpdf/enccns.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_UseCNSEncodings( hDoc ) -> hStatus
|
||||
*/
|
||||
HB_FUNC( HPDF_USECNSENCODINGS )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_UseCNSEncodings( hb_HPDF_Doc_par( 1 ) ) );
|
||||
}
|
||||
58
harbour/contrib/hbhpdf/enccnt.c
Normal file
58
harbour/contrib/hbhpdf/enccnt.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_UseCNTEncodings( hDoc ) -> hStatus
|
||||
*/
|
||||
HB_FUNC( HPDF_USECNTENCODINGS )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_UseCNTEncodings( hb_HPDF_Doc_par( 1 ) ) );
|
||||
}
|
||||
58
harbour/contrib/hbhpdf/encjp.c
Normal file
58
harbour/contrib/hbhpdf/encjp.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_UseJPEncodings( hDoc ) -> hStatus
|
||||
*/
|
||||
HB_FUNC( HPDF_USEJPENCODINGS )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_UseJPEncodings( hb_HPDF_Doc_par( 1 ) ) );
|
||||
}
|
||||
58
harbour/contrib/hbhpdf/enckr.c
Normal file
58
harbour/contrib/hbhpdf/enckr.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_UseKREncodings( hDoc ) -> hStatus
|
||||
*/
|
||||
HB_FUNC( HPDF_USEKRENCODINGS )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_UseKREncodings( hb_HPDF_Doc_par( 1 ) ) );
|
||||
}
|
||||
95
harbour/contrib/hbhpdf/font.c
Normal file
95
harbour/contrib/hbhpdf/font.c
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_LoadTypeIFontFromFile( hDoc, cAFMFileName, cPFA_PFBFileName ) -> cFontName
|
||||
*/
|
||||
HB_FUNC( HPDF_LOADTYPE1FONTFROMFILE )
|
||||
{
|
||||
char * pszFree1;
|
||||
const char * pszFileName1 = hb_fsNameConv( hb_parcx( 2 ), &pszFree1 );
|
||||
char * pszFree2;
|
||||
const char * pszFileName2 = hb_fsNameConv( hb_parcx( 3 ), &pszFree2 );
|
||||
|
||||
hb_retc( HPDF_LoadType1FontFromFile( hb_HPDF_Doc_par( 1 ), pszFileName1, pszFileName2 ) );
|
||||
|
||||
if( pszFree1 )
|
||||
hb_xfree( pszFree1 );
|
||||
|
||||
if( pszFree2 )
|
||||
hb_xfree( pszFree2 );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_LoadTTFontFromFile( hDoc, cTTFontFileName, lEmbed ) -> cFontName
|
||||
*/
|
||||
HB_FUNC( HPDF_LOADTTFONTFROMFILE )
|
||||
{
|
||||
char * pszFree;
|
||||
const char * pszFileName = hb_fsNameConv( hb_parcx( 2 ), &pszFree );
|
||||
|
||||
hb_retc( HPDF_LoadTTFontFromFile( hb_HPDF_Doc_par( 1 ), pszFileName, hb_parl( 3 ) ? HPDF_TRUE : HPDF_FALSE ) );
|
||||
|
||||
if( pszFree )
|
||||
hb_xfree( pszFree );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_LoadTTFontFromFile2( hDoc, cTTFontFileName, nIndexInFile, lEmbed ) -> cFontName
|
||||
*/
|
||||
HB_FUNC( HPDF_LOADTTFONTFROMFILE2 )
|
||||
{
|
||||
char * pszFree;
|
||||
const char * pszFileName = hb_fsNameConv( hb_parcx( 2 ), &pszFree );
|
||||
|
||||
hb_retc( HPDF_LoadTTFontFromFile2( hb_HPDF_Doc_par( 1 ), pszFileName, hb_parni( 3 ), hb_parl( 4 ) ? HPDF_TRUE : HPDF_FALSE ) );
|
||||
|
||||
if( pszFree )
|
||||
hb_xfree( pszFree );
|
||||
}
|
||||
58
harbour/contrib/hbhpdf/fontcns.c
Normal file
58
harbour/contrib/hbhpdf/fontcns.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_UseCNSFonts( hDoc ) -> hStatus
|
||||
*/
|
||||
HB_FUNC( HPDF_USECNSFONTS )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_UseCNSFonts( hb_HPDF_Doc_par( 1 ) ) );
|
||||
}
|
||||
58
harbour/contrib/hbhpdf/fontcnt.c
Normal file
58
harbour/contrib/hbhpdf/fontcnt.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_UseCNTFonts( hDoc ) -> hStatus
|
||||
*/
|
||||
HB_FUNC( HPDF_USECNTFONTS )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_UseCNTFonts( hb_HPDF_Doc_par( 1 ) ) );
|
||||
}
|
||||
58
harbour/contrib/hbhpdf/fontjp.c
Normal file
58
harbour/contrib/hbhpdf/fontjp.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_UseJPFonts( hDoc ) -> hStatus
|
||||
*/
|
||||
HB_FUNC( HPDF_USEJPFONTS )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_UseJPFonts( hb_HPDF_Doc_par( 1 ) ) );
|
||||
}
|
||||
58
harbour/contrib/hbhpdf/fontkr.c
Normal file
58
harbour/contrib/hbhpdf/fontkr.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_UseKRFonts( hDoc ) -> hStatus
|
||||
*/
|
||||
HB_FUNC( HPDF_USEKRFONTS )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_UseKRFonts( hb_HPDF_Doc_par( 1 ) ) );
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -51,6 +51,8 @@
|
||||
#define __HBHPDF_H
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapifs.h"
|
||||
#include "hbapiitm.h"
|
||||
|
||||
#include "hpdf.h"
|
||||
|
||||
@@ -58,7 +60,7 @@
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
extern HB_EXPORT HPDF_Doc HPDF_Doc_par( int iParam );
|
||||
extern HB_EXPORT HPDF_Doc hb_HPDF_Doc_par( int iParam );
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
|
||||
@@ -25,5 +25,17 @@
|
||||
hbhpdf.hbx
|
||||
|
||||
harupdf.c
|
||||
annot.c
|
||||
enccns.c
|
||||
enccnt.c
|
||||
encjp.c
|
||||
enckr.c
|
||||
font.c
|
||||
fontcns.c
|
||||
fontcnt.c
|
||||
fontjp.c
|
||||
fontkr.c
|
||||
image.c
|
||||
pdfa.c
|
||||
|
||||
3rd/libhpdf/libhpdf.hbc{HBMK_HAS_LIBHARU_LOCAL}
|
||||
|
||||
214
harbour/contrib/hbhpdf/image.c
Normal file
214
harbour/contrib/hbhpdf/image.c
Normal file
@@ -0,0 +1,214 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_LoadPngImageFromFile( hDoc, cPNGFileName ) -> hImage
|
||||
*/
|
||||
HB_FUNC( HPDF_LOADPNGIMAGEFROMFILE )
|
||||
{
|
||||
hb_retptr( ( void * ) HPDF_LoadPngImageFromFile( hb_HPDF_Doc_par( 1 ), hb_parc( 2 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_LoadPngImageFromFile2( hDoc, cPNGFileName ) -> hImage
|
||||
*/
|
||||
HB_FUNC( HPDF_LOADPNGIMAGEFROMFILE2 )
|
||||
{
|
||||
hb_retptr( ( void * ) HPDF_LoadPngImageFromFile2( hb_HPDF_Doc_par( 1 ), hb_parc( 2 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_LoadRawImageFromFile( hDoc, cImageFileName, nWidth, nHeight, nColorSpace ) -> hImage
|
||||
nColorSpace
|
||||
HPDF_CS_DEVICE_GRAY
|
||||
HPDF_CS_DEVICE_RGB
|
||||
HPDF_CS_DEVICE_CMYK
|
||||
*/
|
||||
HB_FUNC( HPDF_LOADRAWIMAGEFROMFILE )
|
||||
{
|
||||
hb_retptr( ( void * ) HPDF_LoadRawImageFromFile( hb_HPDF_Doc_par( 1 ), hb_parc( 2 ), hb_parni( 3 ), hb_parni( 4 ), ( HPDF_ColorSpace ) hb_parni( 5 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_LoadRawImageFromMem( hDoc, cBuffer, nWidth, nHeight, nColorSpace, nBitsPerComponents ) -> hImage
|
||||
*/
|
||||
HB_FUNC( HPDF_LOADRAWIMAGEFROMMEM )
|
||||
{
|
||||
hb_retptr( ( void * ) HPDF_LoadRawImageFromMem( hb_HPDF_Doc_par( 1 ), ( HPDF_BYTE * ) hb_parc( 2 ), hb_parni( 3 ), hb_parni( 4 ), ( HPDF_ColorSpace ) hb_parni( 5 ), hb_parni( 6 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPdf_LoadJPEGImageFromFile( hDoc, cHPEGFileName ) -> hImage
|
||||
*/
|
||||
HB_FUNC( HPDF_LOADJPEGIMAGEFROMFILE )
|
||||
{
|
||||
hb_retptr( ( void * ) HPDF_LoadJpegImageFromFile( hb_HPDF_Doc_par( 1 ), hb_parc( 2 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Image)
|
||||
HPDF_LoadPngImageFromMem (HPDF_Doc pdf,
|
||||
const HPDF_BYTE *buffer,
|
||||
HPDF_UINT size);
|
||||
*/
|
||||
HB_FUNC( HPDF_LOADPNGIMAGEFROMMEM )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_UINT size = ( HPDF_UINT ) hb_parclen( 2 );
|
||||
HPDF_BYTE * buffer;
|
||||
|
||||
buffer = ( HPDF_BYTE * ) hb_xgrab( size + 1 );
|
||||
|
||||
hb_retptr( ( HPDF_Image ) HPDF_LoadPngImageFromMem( hb_HPDF_Doc_par( 1 ), buffer, size ) );
|
||||
|
||||
if( ! hb_storclen_buffer( ( char * ) buffer, size, 2 ) )
|
||||
hb_xfree( buffer );
|
||||
#else
|
||||
hb_storc( NULL, 2 );
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Image)
|
||||
HPDF_LoadJpegImageFromMem (HPDF_Doc pdf,
|
||||
const HPDF_BYTE *buffer,
|
||||
HPDF_UINT size);
|
||||
*/
|
||||
HB_FUNC( HPDF_LOADJPEGIMAGEFROMMEM )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_UINT size = ( HPDF_UINT ) hb_parclen( 2 );
|
||||
HPDF_BYTE * buffer;
|
||||
|
||||
buffer = ( HPDF_BYTE * ) hb_xgrab( size + 1 );
|
||||
|
||||
hb_retptr( ( HPDF_Image ) HPDF_LoadJpegImageFromMem( hb_HPDF_Doc_par( 1 ), buffer, size ) );
|
||||
|
||||
if( ! hb_storclen_buffer( ( char * ) buffer, size, 2 ) )
|
||||
hb_xfree( buffer );
|
||||
#else
|
||||
hb_storc( NULL, 2 );
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPDF_Image_GetSize( hImage ) -> aSize[ nW, nH ]
|
||||
*/
|
||||
HB_FUNC( HPDF_IMAGE_GETSIZE )
|
||||
{
|
||||
HPDF_Point pt;
|
||||
PHB_ITEM info = hb_itemArrayNew( 2 );
|
||||
|
||||
pt = HPDF_Image_GetSize( ( HPDF_Image ) hb_parptr( 1 ) );
|
||||
|
||||
hb_arraySetND( info, 1, pt.x );
|
||||
hb_arraySetND( info, 2, pt.y );
|
||||
|
||||
hb_itemReturnRelease( info );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPDF_Image_GetWidth( hImage ) -> nWidth
|
||||
*/
|
||||
HB_FUNC( HPDF_IMAGE_GETWIDTH )
|
||||
{
|
||||
hb_retni( HPDF_Image_GetWidth( ( HPDF_Image ) hb_parptr( 1 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPDF_Image_GetHeight( hImage ) -> nHeight
|
||||
*/
|
||||
HB_FUNC( HPDF_IMAGE_GETHEIGHT )
|
||||
{
|
||||
hb_retni( HPDF_Image_GetHeight( ( HPDF_Image ) hb_parptr( 1 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPDF_Image_GetBitsPerComponent( hImage ) -> nBitsPerComponent
|
||||
*/
|
||||
HB_FUNC( HPDF_IMAGE_GETBITSPERCOMPONENT )
|
||||
{
|
||||
hb_retni( HPDF_Image_GetBitsPerComponent( ( HPDF_Image ) hb_parptr( 1 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPDF_Image_GetColorSpace( hImage ) -> nColorSpace
|
||||
*/
|
||||
HB_FUNC( HPDF_IMAGE_GETCOLORSPACE )
|
||||
{
|
||||
hb_retc( HPDF_Image_GetColorSpace( ( HPDF_Image ) hb_parptr( 1 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPDF_Image_SetColorMask( hImage, nRGB_R_Min, nRGB_R_Max, nRGB_G_Min, nRGB_G_Max, nRGB_B_Min, nRGB_B_Max )
|
||||
*/
|
||||
HB_FUNC( HPDF_IMAGE_SETCOLORMASK )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_Image_SetColorMask( ( HPDF_Image ) hb_parptr( 1 ),
|
||||
hb_parni( 2 ),
|
||||
hb_parni( 3 ),
|
||||
hb_parni( 4 ),
|
||||
hb_parni( 5 ),
|
||||
hb_parni( 6 ),
|
||||
hb_parni( 7 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* HPDF_Image_SetMaskImage( hImage, hImageMask ) -> hStatus
|
||||
*/
|
||||
HB_FUNC( HPDF_IMAGE_SETMASKIMAGE )
|
||||
{
|
||||
hb_retnl( ( long ) HPDF_Image_SetMaskImage( ( HPDF_Image ) hb_parptr( 1 ), ( HPDF_Image ) hb_parptr( 2 ) ) );
|
||||
}
|
||||
/*----------------------------------------------------------------------*/
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
HPDF_Image_AddSMask (HPDF_Image image,
|
||||
HPDF_Image smask);
|
||||
*/
|
||||
HB_FUNC( HPDF_IMAGE_ADDSMASK )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_Image_AddSMask( ( HPDF_Image ) hb_parptr( 1 ), ( HPDF_Image ) hb_parptr( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
66
harbour/contrib/hbhpdf/pdfa.c
Normal file
66
harbour/contrib/hbhpdf/pdfa.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option )
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/ ).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhpdf.h"
|
||||
|
||||
/*
|
||||
HPDF_STATUS
|
||||
HPDF_PDFA_SetPDFAConformance (HPDF_Doc pdf,HPDF_PDFAType pdfatype)
|
||||
*/
|
||||
HB_FUNC( HPDF_PDFA_SETPDFACONFORMANCE )
|
||||
{
|
||||
/* TOFIX: These functions are not exported from libharu. Until we find
|
||||
out it is design decision or bug, I excluded them from dynamic
|
||||
builds. [vszakats] */
|
||||
#if HB_HPDF_VERS( 2, 2, 0 ) && ! defined( HB_DYNLIB )
|
||||
hb_retnl( HPDF_PDFA_SetPDFAConformance( hb_HPDF_Doc_par( 1 ), ( HPDF_PDFAType ) hb_parni( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user