1 /*---------------------------------------------------------------------------*
2  |              PDFlib - A library for generating PDF on the fly             |
3  +---------------------------------------------------------------------------+
4  | Copyright (c) 1997-2005 Thomas Merz and PDFlib GmbH. All rights reserved. |
5  +---------------------------------------------------------------------------+
6  |                                                                           |
7  |    This software is subject to the PDFlib license. It is NOT in the       |
8  |    public domain. Extended versions and commercial licenses are           |
9  |    available, please check http://www.pdflib.com.                         |
10  |                                                                           |
11  *---------------------------------------------------------------------------*/
12 
13 /* $Id: pdflib.java,v 1.106.2.62 2011/05/02 11:13:02 rjs Exp $
14  *
15  * PDFlib Java class
16  */
17 
18 package com.pdflib;
19 
20 import java.io.*;
21 
22 /** PDFlib -- a library for generating PDF on the fly.
23 
24     Note that this is only a syntax summary. It covers several products:
25     PDFlib Lite, PDFlib, PDFlib+PDI, and PDFlib Personalization Server (PPS).
26     Not all features are available in all products, although dummies for
27     all missing API functions are provided. A comparison which
28     details function availability in different products is available at
29     http://www.pdflib.com.
30 
31     For complete information please refer to the PDFlib API reference
32     manual which is available in the PDF file PDFlib-manual.pdf in the
33     PDFlib distribution.
34 
35     @author Thomas Merz
36     @version 7.0.5p3
37 */
38 
39 public final class pdflib {
40 
41     // The initialization code for loading the PDFlib shared library.
42     // The library name will be transformed into something platform-
43     // specific by the VM, e.g. libpdf_java.so or pdf_java.dll.
44 
45     static {
46 	try {
47 	    System.loadLibrary("pdf_java");
48 	} catch (UnsatisfiedLinkError e) {
49 	    System.err.println(
50 	"Cannot load the PDFlib shared library/DLL for Java.\n" +
51 	"Make sure to properly install the native PDFlib library.\n\n" +
52 	"For your information, the current value of java.library.path is:\n" +
53 	 System.getProperty("java.library.path") + "\n");
54 
55 	    throw e;
56 	}
57     }
58 
59     // ------------------------------------------------------------------------
60     // public functions
61 
62     /** Activate a previously created structure element or other content item.
63         @exception com.pdflib.PDFlibException
64         PDF output cannot be finished after an exception.
65      */
activate_item(int id)66     public final void activate_item(int id)
67     throws PDFlibException
68     {
69 	PDF_activate_item(p, id);
70     }
71 
72     /** @deprecated Use  PDF_create_bookmark().
73         @exception com.pdflib.PDFlibException
74         PDF output cannot be finished after an exception.
75      */
add_bookmark(String text, int parent, int open)76     public final int add_bookmark(String text, int parent, int open)
77     throws PDFlibException
78     {
79         return PDF_add_bookmark(p, text, parent, open);
80     }
81 
82     /** @deprecated Use PDF_create_action() and PDF_create_annotation().
83         @exception com.pdflib.PDFlibException
84         PDF output cannot be finished after an exception.
85     */
add_launchlink( double llx, double lly, double urx, double ury, String filename)86     public final void add_launchlink(
87     double llx, double lly, double urx, double ury, String filename)
88     throws PDFlibException
89     {
90 	PDF_add_launchlink(p, llx, lly, urx, ury, filename);
91     }
92 
93     /** @deprecated Use PDF_create_action() and PDF_create_annotation().
94 	@exception com.pdflib.PDFlibException
95 	PDF output cannot be finished after an exception.
96     */
add_locallink( double llx, double lly, double urx, double ury, int page, String optlist)97     public final void add_locallink(
98     double llx, double lly, double urx, double ury, int page, String optlist)
99     throws PDFlibException
100     {
101 	PDF_add_locallink(p, llx, lly, urx, ury, page, optlist);
102     }
103 
104     /** Create a named destination on an arbitrary page in the current document.
105         @exception com.pdflib.PDFlibException
106         PDF output cannot be finished after an exception.
107     */
add_nameddest(String name, String optlist)108     public final void add_nameddest(String name, String optlist)
109     throws PDFlibException
110     {
111 	PDF_add_nameddest(p, name, optlist);
112     }
113 
114     /** @deprecated Use PDF_create_annotation().
115 	@exception com.pdflib.PDFlibException
116 	PDF output cannot be finished after an exception.
117      */
add_note( double llx, double lly, double urx, double ury, String contents, String title, String icon, int open)118     public final void add_note(
119     double llx, double lly, double urx, double ury,
120     String contents, String title, String icon, int open)
121     throws PDFlibException
122     {
123 	PDF_add_note(p, llx, lly, urx, ury, contents, title, icon, open);
124     }
125 
126     /** @deprecated Use PDF_create_action() and PDF_create_annotation().
127 	@exception com.pdflib.PDFlibException
128         PDF output cannot be finished after an exception.
129     */
add_pdflink( double llx, double lly, double urx, double ury, String filename, int page, String optlist)130     public final void add_pdflink(
131     double llx, double lly, double urx, double ury,
132     String filename, int page, String optlist)
133     throws PDFlibException
134     {
135 	PDF_add_pdflink(p, llx, lly, urx, ury, filename, page, optlist);
136     }
137 
138     /** Add a cell to a new or existing table.
139 		@return A table handle which can be used in subsequent table-related
140 	calls.
141 		@exception com.pdflib.PDFlibException
142         PDF output cannot be finished after an exception.
143     */
add_table_cell(int table, int column, int row, String text, String optlist)144     public final int add_table_cell(int table, int column, int row, String text, String optlist)
145     throws PDFlibException
146     {
147 	return PDF_add_table_cell(p, table, column, row, text, optlist);
148     }
149 
150     /** Create a Textflow object, or add text and explicit options to an
151 	existing Textflow.
152         @return A textflow handle, or -1 on error.
153 		@exception com.pdflib.PDFlibException
154         PDF output cannot be finished after an exception.
155     */
add_textflow(int textflow, String text, String optlist)156     public final int add_textflow(int textflow, String text, String optlist)
157     throws PDFlibException
158     {
159 	return PDF_add_textflow(p, textflow, text, optlist);
160     }
161 
162     /** Add an existing image as thumbnail for the current page.
163         @exception com.pdflib.PDFlibException
164         PDF output cannot be finished after an exception.
165     */
add_thumbnail(int image)166     public final void add_thumbnail(int image)
167     throws PDFlibException
168     {
169 	PDF_add_thumbnail(p, image);
170     }
171 
172     /** @deprecated Use PDF_create_action() and PDF_create_annotation().
173         @exception com.pdflib.PDFlibException
174         PDF output cannot be finished after an exception.
175     */
add_weblink( double llx, double lly, double urx, double ury, String url)176     public final void add_weblink(
177     double llx, double lly, double urx, double ury, String url)
178     throws PDFlibException
179     {
180 	PDF_add_weblink(p, llx, lly, urx, ury, url);
181     }
182 
183     /** Draw a counterclockwise circular arc segment.
184         @exception com.pdflib.PDFlibException
185         PDF output cannot be finished after an exception.
186      */
arc(double x, double y, double r, double alpha, double beta)187     public final void arc(double x, double y, double r, double alpha, double beta)
188     throws PDFlibException
189     {
190 	PDF_arc(p, x, y, r, alpha, beta);
191     }
192 
193     /** Draw a clockwise circular arc segment.
194         @exception com.pdflib.PDFlibException
195         PDF output cannot be finished after an exception.
196     */
arcn(double x, double y, double r, double alpha, double beta)197     public final void arcn(double x, double y, double r, double alpha, double beta)
198     throws PDFlibException
199     {
200 	PDF_arcn(p, x, y, r, alpha, beta);
201     }
202 
203     /** @deprecated Use PDF_create_annotation().
204 		@exception com.pdflib.PDFlibException
205         PDF output cannot be finished after an exception.
206      */
attach_file( double llx, double lly, double urx, double ury, String filename, String description, String author, String mimetype, String icon)207     public final void attach_file(
208     double llx, double lly, double urx, double ury, String filename,
209     String description, String author, String mimetype, String icon)
210     throws PDFlibException
211     {
212 	PDF_attach_file(p, llx, lly, urx, ury, filename,
213 	    description, author, mimetype, icon);
214     }
215 
216     /** Create a new PDF file subject to various options.
217         @return -1 on error, and 1 otherwise.
218         @exception com.pdflib.PDFlibException
219         PDF output cannot be finished after an exception.
220     */
begin_document(String filename, String optlist)221     public final int begin_document(String filename, String optlist)
222     throws PDFlibException
223     {
224         return PDF_begin_document(p, filename, optlist);
225     }
226 
227     /** Start a Type 3 font definition.
228         @exception com.pdflib.PDFlibException
229         PDF output cannot be finished after an exception.
230     */
begin_font( String name, double a, double b, double c, double d, double e, double f, String optlist)231     public final void begin_font(
232     String name, double a, double b, double c, double d, double e, double f,
233 	String optlist)
234     throws PDFlibException
235     {
236 	PDF_begin_font(p, name, a, b, c, d, e, f, optlist);
237     }
238 
239     /** Start a glyph definition for a Type 3 font.
240         @exception com.pdflib.PDFlibException
241         PDF output cannot be finished after an exception.
242     */
begin_glyph( String glyphname, double wx, double llx, double lly, double urx, double ury)243     public final void begin_glyph(
244     String glyphname, double wx, double llx, double lly, double urx, double ury)
245     throws PDFlibException
246     {
247 	PDF_begin_glyph(p, glyphname, wx, llx, lly, urx, ury);
248     }
249 
250     /** Open a structure element or other content item with attributes supplied
251         as options.
252         @return An item handle.
253         @exception com.pdflib.PDFlibException
254         PDF output cannot be finished after an exception.
255     */
begin_item(String tag, String optlist)256     public final int begin_item(String tag, String optlist)
257     throws PDFlibException
258     {
259         return PDF_begin_item(p, tag, optlist);
260     }
261 
262     /** Start a layer for subsequent output on the page (requires PDF 1.5).
263         @exception com.pdflib.PDFlibException
264         PDF output cannot be finished after an exception.
265     */
begin_layer(int layer)266     public final void begin_layer(int layer)
267     throws PDFlibException
268     {
269         PDF_begin_layer(p, layer);
270     }
271 
272     /** @deprecated Use PDF_begin_page_ext().
273         @exception com.pdflib.PDFlibException
274         PDF output cannot be finished after an exception.
275     */
begin_page(double width, double height)276     public final void begin_page(double width, double height)
277     throws PDFlibException
278     {
279         PDF_begin_page(p, width, height);
280     }
281 
282     /** Add a new page to the document, and specify various options.
283         @exception com.pdflib.PDFlibException
284         PDF output cannot be finished after an exception.
285     */
begin_page_ext(double width, double height, String optlist)286     public final void begin_page_ext(double width, double height, String optlist)
287     throws PDFlibException
288     {
289         PDF_begin_page_ext(p, width, height, optlist);
290     }
291 
292     /** Start a pattern definition.
293     	@return  A pattern handle.
294         @exception com.pdflib.PDFlibException
295         PDF output cannot be finished after an exception.
296     */
begin_pattern( double width, double height, double xstep, double ystep, int painttype)297     public final int begin_pattern(
298     double width, double height, double xstep, double ystep, int painttype)
299     throws PDFlibException
300     {
301 	return PDF_begin_pattern(p, width, height, xstep, ystep, painttype);
302     }
303 
304     /** @deprecated Use PDF_begin_template_ext().
305         @exception com.pdflib.PDFlibException
306         PDF output cannot be finished after an exception.
307     */
begin_template(double width, double height)308     public final int begin_template(double width, double height)
309     throws PDFlibException
310     {
311 	return PDF_begin_template(p, width, height);
312     }
313 
314     /** Start a template definition.
315         @return  A template handle which can be used in subsequent
316 	image-related calls, especially PDF_ fit_image().
317         @exception com.pdflib.PDFlibException
318         PDF output cannot be finished after an exception.
319     */
begin_template_ext(double width, double height, String optlist)320     public final int begin_template_ext(double width, double height, String optlist)
321     throws PDFlibException
322     {
323 	return PDF_begin_template_ext(p, width, height, optlist);
324     }
325 
326     /** Draw a circle.
327         @exception com.pdflib.PDFlibException
328         PDF output cannot be finished after an exception.
329     */
circle(double x, double y, double r)330     public final void circle(double x, double y, double r)
331     throws PDFlibException
332     {
333 	PDF_circle(p, x, y, r);
334     }
335 
336     /** Use the current path as clipping path, and terminate the path.
337         @exception com.pdflib.PDFlibException
338         PDF output cannot be finished after an exception.
339     */
clip()340     public final void clip()
341     throws PDFlibException
342     {
343 	PDF_clip(p);
344     }
345 
346     /** @deprecated Use PDF_end_document().
347         @exception com.pdflib.PDFlibException
348         PDF output cannot be finished after an exception.
349     */
close()350     public final void close()
351     throws PDFlibException
352     {
353         PDF_close(p);
354     }
355 
356     /** Close an image.
357         @exception com.pdflib.PDFlibException
358         PDF output cannot be finished after an exception.
359     */
close_image(int image)360     public final void close_image(int image)
361     throws PDFlibException
362     {
363 	PDF_close_image(p, image);
364     }
365 
366     /** @deprecated Use PDF_close_pdi_document().
367         @exception com.pdflib.PDFlibException
368         PDF output cannot be finished after an exception.
369      */
close_pdi(int doc)370     public final void close_pdi(int doc)
371     throws PDFlibException
372     {
373 	PDF_close_pdi(p, doc);
374     }
375 
376     /** Close all open PDI page handles, and close the input PDF document.
377         @exception com.pdflib.PDFlibException
378         PDF output cannot be finished after an exception.
379     */
close_pdi_document(int doc)380     public final void close_pdi_document(int doc)
381     throws PDFlibException
382     {
383 	PDF_close_pdi_document(p, doc);
384     }
385 
386     /** Close the page handle, and free all page-related resources.
387         @exception com.pdflib.PDFlibException
388         PDF output cannot be finished after an exception.
389     */
close_pdi_page(int page)390     public final void close_pdi_page(int page)
391     throws PDFlibException
392     {
393 	PDF_close_pdi_page(p, page);
394     }
395 
396     /** Close the current path.
397         @exception com.pdflib.PDFlibException
398         PDF output cannot be finished after an exception.
399     */
closepath()400     public final void closepath()
401     throws PDFlibException
402     {
403 	PDF_closepath(p);
404     }
405 
406     /** Close the path, fill, and stroke it.
407         @exception com.pdflib.PDFlibException
408         PDF output cannot be finished after an exception.
409     */
closepath_fill_stroke()410     public final void closepath_fill_stroke()
411     throws PDFlibException
412     {
413 	PDF_closepath_fill_stroke(p);
414     }
415 
416     /** Close the path, and stroke it.
417         @exception com.pdflib.PDFlibException
418         PDF output cannot be finished after an exception.
419     */
closepath_stroke()420     public final void closepath_stroke()
421     throws PDFlibException
422     {
423 	PDF_closepath_stroke(p);
424     }
425 
426     /** Apply a transformation matrix to the current coordinate system.
427         @exception com.pdflib.PDFlibException
428         PDF output cannot be finished after an exception.
429     */
concat( double a, double b, double c, double d, double e, double f)430     public final void concat(
431     double a, double b, double c, double d, double e, double f)
432     throws PDFlibException
433     {
434 	PDF_concat(p, a, b, c, d, e, f);
435     }
436 
437     /** Print text at the next line.
438         @exception com.pdflib.PDFlibException
439         PDF output cannot be finished after an exception.
440     */
continue_text(String text)441     public final void continue_text(String text)
442     throws PDFlibException
443     {
444 	PDF_continue_text(p, text);
445     }
446 
447     /** Create a 3D view (requires PDF 1.6).
448         @return A 3D view handle, or -1 on error.
449         @exception com.pdflib.PDFlibException
450         PDF output cannot be finished after an exception.
451     */
create_3dview(String username, String optlist)452     public final int create_3dview(String username, String optlist)
453     throws PDFlibException
454     {
455         return PDF_create_3dview(p, username, optlist);
456     }
457 
458     /** Create an action which can be applied to various objects and events.
459         @return An action handle.
460 		@exception com.pdflib.PDFlibException
461 		PDF output cannot be finished after an exception.
462     */
create_action(String type, String optlist)463     public final int create_action(String type, String optlist)
464     throws PDFlibException
465     {
466 	return PDF_create_action(p, type, optlist);
467     }
468 
469     /** Create a rectangular annotation on the current page.
470 		@exception com.pdflib.PDFlibException
471 		PDF output cannot be finished after an exception.
472     */
create_annotation( double llx, double lly, double urx, double ury, String type, String optlist)473     public final void create_annotation(
474     double llx, double lly, double urx, double ury, String type, String optlist)
475     throws PDFlibException
476     {
477         PDF_create_annotation(p, llx, lly, urx, ury, type, optlist);
478     }
479 
480     /** Create a bookmark subject to various options.
481         @return A handle for the generated bookmark.
482         @exception com.pdflib.PDFlibException
483         PDF output cannot be finished after an exception.
484      */
create_bookmark(String text, String optlist)485     public final int create_bookmark(String text, String optlist)
486     throws PDFlibException
487     {
488         return PDF_create_bookmark(p, text, optlist);
489     }
490 
491     /** Create a form field on the current page subject to various options.
492         @exception com.pdflib.PDFlibException
493         PDF output cannot be finished after an exception.
494     */
create_field(double llx, double lly, double urx, double ury, String name, String type, String optlist)495     public final void create_field(double llx, double lly, double urx, double ury,
496     String name, String type, String optlist)
497     throws PDFlibException
498     {
499         PDF_create_field(p, llx, lly, urx, ury, name, type, optlist);
500     }
501 
502     /** Create a form field group subject to various options.
503         @exception com.pdflib.PDFlibException
504         PDF output cannot be finished after an exception.
505     */
create_fieldgroup( String name, String optlist)506     public final void create_fieldgroup(
507     String name, String optlist)
508     throws PDFlibException
509     {
510         PDF_create_fieldgroup(p, name, optlist);
511     }
512 
513     /** Create a graphics state object subject to various options.
514         @return A graphics state handle.
515         @exception com.pdflib.PDFlibException
516         PDF output cannot be finished after an exception.
517     */
create_gstate(String optlist)518     public final int create_gstate(String optlist)
519     throws PDFlibException
520     {
521         return PDF_create_gstate(p, optlist);
522     }
523 
524     /** Create a named virtual read-only file from data provided in memory.
525         @exception com.pdflib.PDFlibException
526         PDF output cannot be finished after an exception.
527     */
create_pvf(String filename, byte[] data, String optlist)528     public final void create_pvf(String filename, byte[] data, String optlist)
529     throws PDFlibException
530     {
531 	PDF_create_pvf(p, filename, data, optlist);
532     }
533 
534     /** Create a Textflow object from text contents, inline options, and
535     	explicit options.
536         @return A Textflow handle, or -1 on error.
537         @exception com.pdflib.PDFlibException
538         PDF output cannot be finished after an exception.
539     */
create_textflow(String text, String optlist)540     public final int create_textflow(String text, String optlist)
541     throws PDFlibException
542     {
543         return PDF_create_textflow(p, text, optlist);
544     }
545 
546     /** Draw a Bezier curve from the current point, using 3 more control points.
547         @exception com.pdflib.PDFlibException
548         PDF output cannot be finished after an exception.
549      */
curveto( double x1, double y1, double x2, double y2, double x3, double y3)550     public final void curveto(
551     double x1, double y1, double x2, double y2, double x3, double y3)
552     throws PDFlibException
553     {
554 	PDF_curveto(p, x1, y1, x2, y2, x3, y3);
555     }
556 
557     /** Create a new layer definition (requires PDF 1.5).
558         @return A layer handle.
559         @exception com.pdflib.PDFlibException
560         PDF output cannot be finished after an exception.
561      */
define_layer( String name, String optlist)562     public final int define_layer(
563     String name, String optlist)
564     throws PDFlibException
565     {
566 	return PDF_define_layer(p, name, optlist);
567     }
568 
569     /** Define hierarchical, group and lock condition among layers (requires
570         PDF 1.5).
571 	    @exception com.pdflib.PDFlibException
572         PDF output cannot be finished after an exception.
573      */
set_layer_dependency( String type, String optlist)574     public final void set_layer_dependency(
575     String type, String optlist)
576     throws PDFlibException
577     {
578 	PDF_set_layer_dependency(p, type, optlist);
579     }
580 
581     /** Delete a PDFlib object and free all internal resources.
582         Never throws any PDFlib exception.
583      */
delete()584     public final void delete()
585     {
586         PDF_delete(p);
587         p = (long) 0;
588     }
589 
590     /** Delete a named virtual file and free its data structures (but not the
591         contents).
592         @return -1 if the virtual file exists but is locked, and
593         1 otherwise.
594         @exception com.pdflib.PDFlibException
595         PDF output cannot be finished after an exception.
596     */
delete_pvf(String filename)597     public final int delete_pvf(String filename)
598     throws PDFlibException
599     {
600 	return PDF_delete_pvf(p, filename);
601     }
602 
603     /** Delete a table and all associated data structures.
604         @exception com.pdflib.PDFlibException
605         PDF output cannot be finished after an exception.
606     */
delete_table(int table, String optlist)607     public final void delete_table(int table, String optlist)
608     throws PDFlibException
609     {
610         PDF_delete_table(p, table, optlist);
611     }
612 
613     /** Delete a Textflow and all associated data structures.
614         @exception com.pdflib.PDFlibException
615         PDF output cannot be finished after an exception.
616     */
delete_textflow(int textflow)617     public final void delete_textflow(int textflow)
618     throws PDFlibException
619     {
620         PDF_delete_textflow(p, textflow);
621     }
622 
623     /** Add a glyph name and/or Unicode value to a custom encoding.
624         @exception com.pdflib.PDFlibException
625         PDF output cannot be finished after an exception.
626     */
encoding_set_char( String encoding, int slot, String glyphname, int uv)627     public final void encoding_set_char(
628     String encoding, int slot, String glyphname, int uv)
629     throws PDFlibException
630     {
631         PDF_encoding_set_char(p, encoding, slot, glyphname, uv);
632     }
633 
634     /** Close the generated PDF document and apply various options.
635         @exception com.pdflib.PDFlibException
636         PDF output cannot be finished after an exception.
637     */
end_document(String optlist)638     public final void end_document(String optlist)
639     throws PDFlibException
640     {
641         PDF_end_document(p, optlist);
642     }
643 
644     /** Terminate a Type 3 font definition.
645         @exception com.pdflib.PDFlibException
646         PDF output cannot be finished after an exception.
647     */
end_font()648     public final void end_font()
649     throws PDFlibException
650     {
651 	PDF_end_font(p);
652     }
653 
654     /** Terminate a glyph definition for a Type 3 font.
655         @exception com.pdflib.PDFlibException
656         PDF output cannot be finished after an exception.
657     */
end_glyph()658     public final void end_glyph()
659     throws PDFlibException
660     {
661 	PDF_end_glyph(p);
662     }
663 
664     /** Close a structure element or other content item.
665         @exception com.pdflib.PDFlibException
666         PDF output cannot be finished after an exception.
667     */
end_item(int id)668     public final void end_item(int id)
669     throws PDFlibException
670     {
671 	PDF_end_item(p, id);
672     }
673 
674     /** Deactivate all active layers (requires PDF 1.5).
675         @exception com.pdflib.PDFlibException
676         PDF output cannot be finished after an exception.
677     */
end_layer()678     public final void end_layer()
679     throws PDFlibException
680     {
681 	PDF_end_layer(p);
682     }
683 
684     /** @deprecated Use PDF_end_page_ext().
685         @exception com.pdflib.PDFlibException
686         PDF output cannot be finished after an exception.
687     */
end_page()688     public final void end_page()
689     throws PDFlibException
690     {
691         PDF_end_page(p);
692     }
693 
694     /** Finish a page, and apply various options.
695         @exception com.pdflib.PDFlibException
696         PDF output cannot be finished after an exception.
697     */
end_page_ext(String optlist)698     public final void end_page_ext(String optlist)
699     throws PDFlibException
700     {
701         PDF_end_page_ext(p, optlist);
702     }
703 
704     /** Finish a pattern definition.
705         @exception com.pdflib.PDFlibException
706         PDF output cannot be finished after an exception.
707     */
end_pattern()708     public final void end_pattern()
709     throws PDFlibException
710     {
711 	PDF_end_pattern(p);
712     }
713 
714     /** Finish a template definition.
715         @exception com.pdflib.PDFlibException
716         PDF output cannot be finished after an exception.
717     */
end_template()718     public final void end_template()
719     throws PDFlibException
720     {
721 	PDF_end_template(p);
722     }
723 
724     /** End the current path without filling or stroking it.
725         @exception com.pdflib.PDFlibException
726         PDF output cannot be finished after an exception.
727     */
endpath()728     public final void endpath()
729     throws PDFlibException
730     {
731 	PDF_endpath(p);
732     }
733 
734     /** Fill the interior of the path with the current fill color.
735         @exception com.pdflib.PDFlibException
736         PDF output cannot be finished after an exception.
737     */
fill()738     public final void fill()
739     throws PDFlibException
740     {
741 	PDF_fill(p);
742     }
743 
744     /** Fill an image block with variable data according to its properties.
745         @return -1 on error, and 1 otherwise.
746         @exception com.pdflib.PDFlibException
747         PDF output cannot be finished after an exception.
748     */
fill_imageblock( int page, String blockname, int image, String optlist)749     public final int fill_imageblock(
750     int page, String blockname, int image, String optlist)
751     throws PDFlibException
752     {
753 	return PDF_fill_imageblock(p, page, blockname, image, optlist);
754     }
755 
756     /** Fill a PDF block with variable data according to its properties.
757         @return -1 on error, and 1 otherwise.
758         @exception com.pdflib.PDFlibException
759         PDF output cannot be finished after an exception.
760     */
fill_pdfblock( int page, String blockname, int contents, String optlist)761     public final int fill_pdfblock(
762     int page, String blockname, int contents, String optlist)
763     throws PDFlibException
764     {
765 	return PDF_fill_pdfblock(p, page, blockname, contents, optlist);
766     }
767 
768     /** Fill and stroke the path with the current fill and stroke color.
769         @exception com.pdflib.PDFlibException
770         PDF output cannot be finished after an exception.
771     */
fill_stroke()772     public final void fill_stroke()
773     throws PDFlibException
774     {
775 	PDF_fill_stroke(p);
776     }
777 
778     /** Fill a text block with variable data according to its properties.
779         @return -1 on error, and 1 otherwise.
780         @exception com.pdflib.PDFlibException
781         PDF output cannot be finished after an exception.
782     */
fill_textblock( int page, String blockname, String text, String optlist)783     public final int fill_textblock(
784     int page, String blockname, String text, String optlist)
785     throws PDFlibException
786     {
787 	return PDF_fill_textblock(p, page, blockname, text, optlist);
788     }
789 
790     /** @deprecated Use  PDF_load_font().
791         @exception com.pdflib.PDFlibException
792         PDF output cannot be finished after an exception.
793      */
findfont(String fontname, String encoding, int options)794     public final int findfont(String fontname, String encoding, int options)
795     throws PDFlibException
796     {
797 	return PDF_findfont(p, fontname, encoding, options);
798     }
799 
800     /** Place an image or template on the page, subject to various options.
801         @exception com.pdflib.PDFlibException
802         PDF output cannot be finished after an exception.
803     */
fit_image(int image, double x, double y, String optlist)804     public final void fit_image(int image, double x, double y, String optlist)
805     throws PDFlibException
806     {
807 	PDF_fit_image(p, image, x, y, optlist);
808     }
809 
810     /** Place an imported PDF page on the page subject to various options.
811         @exception com.pdflib.PDFlibException
812         PDF output cannot be finished after an exception.
813     */
fit_pdi_page(int page, double x, double y, String optlist)814     public final void fit_pdi_page(int page, double x, double y, String optlist)
815     throws PDFlibException
816     {
817 	PDF_fit_pdi_page(p, page, x, y, optlist);
818     }
819 
820     /** Fully or partially place a table on the page.
821         @return A string which specifies the reason for returning.
822         @exception com.pdflib.PDFlibException
823         PDF output cannot be finished after an exception.
824     */
fit_table(int table, double llx, double lly, double urx, double ury, String optlist)825     public final String fit_table(int table, double llx, double lly,
826     double urx, double ury, String optlist)
827     throws PDFlibException
828     {
829         return PDF_fit_table(p, table, llx, lly, urx, ury, optlist);
830     }
831 
832     /** Format the next portion of a Textflow into a rectangular area.
833         @return A string which specifies the reason for returning.
834         @exception com.pdflib.PDFlibException
835         PDF output cannot be finished after an exception.
836     */
fit_textflow(int textflow, double llx, double lly, double urx, double ury, String optlist)837     public final String fit_textflow(int textflow, double llx, double lly,
838     double urx, double ury, String optlist)
839     throws PDFlibException
840     {
841         return PDF_fit_textflow(p, textflow, llx, lly, urx, ury, optlist);
842     }
843 
844     /** Place a single line of text at position (x, y) subject to
845         various options.
846         @exception com.pdflib.PDFlibException
847         PDF output cannot be finished after an exception.
848     */
fit_textline( String text, double x, double y, String optlist)849     public final void fit_textline(
850     String text, double x, double y, String optlist)
851     throws PDFlibException
852     {
853 	PDF_fit_textline(p, text, x, y, optlist);
854     }
855 
856     /** Get the name of the API function which threw the last exception
857         or failed.
858         @return Name of an API function.
859      */
get_apiname()860     public final String get_apiname()
861     {
862         return PDF_get_apiname(p);
863     }
864 
865     /** Get the contents of the PDF output buffer.
866         @return A buffer full of binary PDF data for consumption by the
867 	client.
868         @exception com.pdflib.PDFlibException
869         PDF output cannot be finished after an exception.
870      */
get_buffer()871     public final byte[] get_buffer()
872     throws PDFlibException
873     {
874         return PDF_get_buffer(p);
875     }
876 
877     /** Get the text of the last thrown exception or the reason of
878         a failed function call.
879         @return Text containing the description of the most recent error
880         condition.
881      */
get_errmsg()882     public final String get_errmsg()
883     {
884         return PDF_get_errmsg(p);
885     }
886 
887     /** Get the number of the last thrown exception or the reason of a failed
888         function call.
889         @return The error code of the most recent error condition.
890      */
get_errnum()891     public final int get_errnum()
892     {
893         return PDF_get_errnum(p);
894     }
895 
896     /** Get the contents of some PDFlib parameter with string type.
897         @return  The string value of the parameter as a hypertext string.
898         @exception com.pdflib.PDFlibException
899         PDF output cannot be finished after an exception.
900      */
get_parameter(String key, double modifier)901     public final String get_parameter(String key, double modifier)
902     throws PDFlibException
903     {
904 	return PDF_get_parameter(p, key, modifier);
905     }
906 
907     /** @deprecated Use  PDF_pcos_get_string().
908         @exception com.pdflib.PDFlibException
909         PDF output cannot be finished after an exception.
910     */
get_pdi_parameter( String key, int doc, int page, int reserved)911     public final String get_pdi_parameter(
912     String key, int doc, int page, int reserved)
913     throws PDFlibException
914     {
915 	return PDF_get_pdi_parameter(p, key, doc, page, reserved);
916     }
917 
918     /** @deprecated Use  PDF_pcos_get_number().
919         @exception com.pdflib.PDFlibException
920         PDF output cannot be finished after an exception.
921     */
get_pdi_value( String key, int doc, int page, int reserved)922     public final double get_pdi_value(
923     String key, int doc, int page, int reserved)
924     throws PDFlibException
925     {
926 	return PDF_get_pdi_value(p, key, doc, page, reserved);
927     }
928 
929     /** Get the value of some PDFlib parameter with numerical type.
930         @return The numerical value of the parameter.
931         @exception com.pdflib.PDFlibException
932         PDF output cannot be finished after an exception.
933      */
get_value(String key, double modifier)934     public final double get_value(String key, double modifier)
935     throws PDFlibException
936     {
937 	return PDF_get_value(p, key, modifier);
938     }
939 
940     /** Query detailed information about a loaded font.
941         @return The value of some font property as requested by keyword.
942         @exception com.pdflib.PDFlibException
943         PDF output cannot be finished after an exception.
944     */
info_font(int font, String keyword, String optlist)945     public final double info_font(int font, String keyword, String optlist)
946     throws PDFlibException
947     {
948         return PDF_info_font(p, font, keyword, optlist);
949     }
950 
951     /** Query information about a matchbox on the current page.
952         @return The value of some matchbox parameter as requested
953 	by keyword.
954         @exception com.pdflib.PDFlibException
955         PDF output cannot be finished after an exception.
956     */
info_matchbox(String boxname, int num, String keyword)957     public final double info_matchbox(String boxname, int num, String keyword)
958     throws PDFlibException
959     {
960         return PDF_info_matchbox(p, boxname, num, keyword);
961     }
962 
963     /** Retrieve table information related to the most recently placed table
964    instance.
965         @return The value of some table parameter as requested by keyword.
966         @exception com.pdflib.PDFlibException
967         PDF output cannot be finished after an exception.
968     */
info_table(int table, String keyword)969     public final double info_table(int table, String keyword)
970     throws PDFlibException
971     {
972         return PDF_info_table(p, table, keyword);
973     }
974 
975     /** Perform textline formatting and query the resulting metrics.
976         @return The value of some text metric value as requested by keyword.
977         @exception com.pdflib.PDFlibException
978         PDF output cannot be finished after an exception.
979     */
info_textline(String text, String keyword, String optlist)980     public final double info_textline(String text, String keyword,
981     String optlist)
982     throws PDFlibException
983     {
984         return PDF_info_textline(p, text, keyword, optlist);
985     }
986 
987     /** Query the current state of a Textflow.
988         @return The value of some Textflow parameter as requested by keyword.
989         @exception com.pdflib.PDFlibException
990         PDF output cannot be finished after an exception.
991     */
info_textflow(int textflow, String keyword)992     public final double info_textflow(int textflow, String keyword)
993     throws PDFlibException
994     {
995         return PDF_info_textflow(p, textflow, keyword);
996     }
997 
998     /** Reset all color and graphics state parameters to their defaults.
999         @exception com.pdflib.PDFlibException
1000         PDF output cannot be finished after an exception.
1001      */
initgraphics()1002     public final void initgraphics()
1003     throws PDFlibException
1004     {
1005 	PDF_initgraphics(p);
1006     }
1007 
1008     /** Draw a line from the current point to another point.
1009         @exception com.pdflib.PDFlibException
1010         PDF output cannot be finished after an exception.
1011     */
lineto(double x, double y)1012     public final void lineto(double x, double y)
1013     throws PDFlibException
1014     {
1015 	PDF_lineto(p, x, y);
1016     }
1017 
1018     /** Load a 3D model from a disk-based or virtual file (requires PDF 1.6).
1019         @return A 3D handle, or -1 on error.
1020         @exception com.pdflib.PDFlibException
1021         PDF output cannot be finished after an exception.
1022     */
load_3ddata(String filename, String optlist)1023     public final int load_3ddata(String filename, String optlist)
1024     throws PDFlibException
1025     {
1026         return PDF_load_3ddata(p, filename, optlist);
1027     }
1028 
1029     /** Search for a font and prepare it for later use.
1030         @return A font handle.
1031         @exception com.pdflib.PDFlibException
1032         PDF output cannot be finished after an exception.
1033      */
load_font(String fontname, String encoding, String optlist)1034     public final int load_font(String fontname, String encoding, String optlist)
1035     throws PDFlibException
1036     {
1037 	return PDF_load_font(p, fontname, encoding, optlist);
1038     }
1039 
1040     /** Search for an ICC profile, and prepare it for later use.
1041         @return A profile handle.
1042         @exception com.pdflib.PDFlibException
1043         PDF output cannot be finished after an exception.
1044     */
load_iccprofile(String profilename, String optlist)1045     public final int load_iccprofile(String profilename, String optlist)
1046     throws PDFlibException
1047     {
1048 	return PDF_load_iccprofile(p, profilename, optlist);
1049     }
1050 
1051     /** Open a disk-based or virtual image file subject to various options.
1052         @return An image handle, or -1 on error.
1053         @exception com.pdflib.PDFlibException
1054         PDF output cannot be finished after an exception.
1055     */
load_image( String imagetype, String filename, String optlist)1056     public final int load_image(
1057     String imagetype, String filename, String optlist)
1058     throws PDFlibException
1059     {
1060 	return PDF_load_image(p, imagetype, filename, optlist);
1061     }
1062 
1063     /** Find a built-in spot color name, or make a named spot color from the
1064         current fill color.
1065         @return A color handle.
1066         @exception com.pdflib.PDFlibException
1067         PDF output cannot be finished after an exception.
1068     */
makespotcolor(String spotname)1069     public final int makespotcolor(String spotname)
1070     throws PDFlibException
1071     {
1072 	return PDF_makespotcolor(p, spotname);
1073     }
1074 
1075     /** Set the current point.
1076         @exception com.pdflib.PDFlibException
1077         PDF output cannot be finished after an exception.
1078     */
moveto(double x, double y)1079     public final void moveto(double x, double y)
1080     throws PDFlibException
1081     {
1082 	PDF_moveto(p, x, y);
1083     }
1084 
1085     /** Create a new PDFlib object.
1086         @exception com.pdflib.PDFlibException
1087         PDF output cannot be finished after an exception.
1088     */
pdflib()1089     public pdflib()
1090     throws PDFlibException
1091     {
1092         p = PDF_new();
1093     }
1094 
1095     /** @deprecated Use PDF_load_image().
1096         @exception com.pdflib.PDFlibException
1097         PDF output cannot be finished after an exception.
1098      */
open_CCITT( String filename, int width, int height, int BitReverse, int K, int BlackIs1)1099     public final int open_CCITT(
1100     String filename, int width, int height, int BitReverse, int K, int BlackIs1)
1101     throws PDFlibException
1102     {
1103 	return PDF_open_CCITT(p, filename, width, height, BitReverse, K,
1104 		BlackIs1);
1105     }
1106 
1107     /** @deprecated Use PDF_begin_document().
1108         @exception com.pdflib.PDFlibException
1109         PDF output cannot be finished after an exception.
1110     */
open_file(String filename)1111     public final int open_file(String filename)
1112     throws PDFlibException
1113     {
1114         return PDF_open_file(p, filename);
1115     }
1116 
1117     /** @deprecated Use PDF_load_image() with virtual files.
1118         @exception com.pdflib.PDFlibException
1119         PDF output cannot be finished after an exception.
1120      */
open_image( String imagetype, String source, byte[] data, long length, int width, int height, int components, int bpc, String params)1121     public final int open_image(
1122     String imagetype, String source, byte[] data, long length, int width,
1123     int height, int components, int bpc, String params)
1124     throws PDFlibException
1125     {
1126 	return PDF_open_image(p, imagetype, source, data, length, width,
1127 	    height, components, bpc, params);
1128     }
1129 
1130     /** @deprecated Use PDF_load_image().
1131         @exception com.pdflib.PDFlibException
1132         PDF output cannot be finished after an exception.
1133      */
open_image_file( String imagetype, String filename, String stringparam, int intparam)1134     public final int open_image_file(
1135     String imagetype, String filename, String stringparam, int intparam)
1136     throws PDFlibException
1137     {
1138 	return PDF_open_image_file(p, imagetype, filename, stringparam,
1139 		intparam);
1140     }
1141 
1142     /** @deprecated Use PDF_open_pdi_document().
1143         @exception com.pdflib.PDFlibException
1144         PDF output cannot be finished after an exception.
1145      */
open_pdi(String filename, String optlist, int reserved)1146     public final int open_pdi(String filename, String optlist, int reserved)
1147     throws PDFlibException
1148     {
1149 	return PDF_open_pdi(p, filename, optlist, reserved);
1150     }
1151 
1152     /** Open a disk-based or virtual PDF document and prepare it for later use.
1153         @return A PDI document handle.
1154         @exception com.pdflib.PDFlibException
1155         PDF output cannot be finished after an exception.
1156     */
open_pdi_document(String filename, String optlist)1157     public final int open_pdi_document(String filename, String optlist)
1158     throws PDFlibException
1159     {
1160 	return PDF_open_pdi_document(p, filename, optlist);
1161     }
1162 
1163     /** Prepare a page for later use with PDF_fit_pdi_page().
1164         @return A page handle.
1165         @exception com.pdflib.PDFlibException
1166         PDF output cannot be finished after an exception.
1167     */
open_pdi_page(int doc, int pagenumber, String optlist)1168     public final int open_pdi_page(int doc, int pagenumber, String optlist)
1169     throws PDFlibException
1170     {
1171 	return PDF_open_pdi_page(p, doc, pagenumber, optlist);
1172     }
1173 
1174     /** Get the value of a pCOS path with type number or boolean.
1175         @return The numerical value of the object identified by the pCOS path.
1176         @exception com.pdflib.PDFlibException
1177         PDF output cannot be finished after an exception.
1178     */
1179 
pcos_get_number(int doc, String path)1180     public final double pcos_get_number(int doc, String path)
1181     throws PDFlibException
1182     {
1183 	return PDF_pcos_get_number(p, doc, path);
1184     }
1185 
1186     /** Get the value of a pCOS path with type name, string or boolean.
1187         @return A string with the value of the object identified by the pCOS
1188 	path.
1189         @exception com.pdflib.PDFlibException
1190         PDF output cannot be finished after an exception.
1191     */
pcos_get_string(int doc, String path)1192     public final String pcos_get_string(int doc, String path)
1193     throws PDFlibException
1194     {
1195 	return PDF_pcos_get_string(p, doc, path);
1196     }
1197 
1198     /** Get the contents of a pCOS path with type stream, fstream, or string.
1199         @return The unencrypted data contained in the stream or string.
1200         @exception com.pdflib.PDFlibException
1201         PDF output cannot be finished after an exception.
1202     */
pcos_get_stream(int doc, String optlist, String path)1203     public final byte[] pcos_get_stream(int doc, String optlist, String path)
1204     throws PDFlibException
1205     {
1206 	return PDF_pcos_get_stream(p, doc, optlist, path);
1207     }
1208 
1209     /** @deprecated Use PDF_fit_image().
1210         @exception com.pdflib.PDFlibException
1211         PDF output cannot be finished after an exception.
1212     */
place_image(int image, double x, double y, double scale)1213     public final void place_image(int image, double x, double y, double scale)
1214     throws PDFlibException
1215     {
1216 	PDF_place_image(p, image, x, y, scale);
1217     }
1218 
1219     /** @deprecated Use PDF_fit_pdi_page().
1220         @exception com.pdflib.PDFlibException
1221         PDF output cannot be finished after an exception.
1222     */
place_pdi_page( int page, double x, double y, double sx, double sy)1223     public final void place_pdi_page(
1224     int page, double x, double y, double sx, double sy)
1225     throws PDFlibException
1226     {
1227 	PDF_place_pdi_page(p, page, x, y, sx, sy);
1228     }
1229 
1230     /** Process certain elements of an imported PDF document.
1231         @return -1 on error, and 1 otherwise.
1232         @exception com.pdflib.PDFlibException
1233         PDF output cannot be finished after an exception.
1234     */
process_pdi(int doc, int page, String optlist)1235     public final int process_pdi(int doc, int page, String optlist)
1236     throws PDFlibException
1237     {
1238 	return PDF_process_pdi(p, doc, page, optlist);
1239     }
1240 
1241     /** Draw a rectangle.
1242         @exception com.pdflib.PDFlibException
1243         PDF output cannot be finished after an exception.
1244     */
rect(double x, double y, double width, double height)1245     public final void rect(double x, double y, double width, double height)
1246     throws PDFlibException
1247     {
1248 	PDF_rect(p, x, y, width, height);
1249     }
1250 
1251     /** Restore the most recently saved graphics state from the stack.
1252         @exception com.pdflib.PDFlibException
1253         PDF output cannot be finished after an exception.
1254     */
restore()1255     public final void restore()
1256     throws PDFlibException
1257     {
1258 	PDF_restore(p);
1259     }
1260 
1261     /** Resume a page to add more content to it.
1262         @exception com.pdflib.PDFlibException
1263         PDF output cannot be finished after an exception.
1264     */
resume_page(String optlist)1265     public final void resume_page(String optlist)
1266     throws PDFlibException
1267     {
1268 	PDF_resume_page(p, optlist);
1269     }
1270 
1271     /** Rotate the coordinate system.
1272         @exception com.pdflib.PDFlibException
1273         PDF output cannot be finished after an exception.
1274     */
rotate(double phi)1275     public final void rotate(double phi)
1276     throws PDFlibException
1277     {
1278 	PDF_rotate(p, phi);
1279     }
1280 
1281     /** Save the current graphics state to a stack.
1282         @exception com.pdflib.PDFlibException
1283         PDF output cannot be finished after an exception.
1284     */
save()1285     public final void save()
1286     throws PDFlibException
1287     {
1288 	PDF_save(p);
1289     }
1290 
1291     /** Scale the coordinate system.
1292         @exception com.pdflib.PDFlibException
1293         PDF output cannot be finished after an exception.
1294     */
scale(double sx, double sy)1295     public final void scale(double sx, double sy)
1296     throws PDFlibException
1297     {
1298 	PDF_scale(p, sx, sy);
1299     }
1300 
1301     /** @deprecated Use PDF_create_annotation().
1302         @exception com.pdflib.PDFlibException
1303         PDF output cannot be finished after an exception.
1304     */
set_border_color(double red, double green, double blue)1305     public final void set_border_color(double red, double green, double blue)
1306     throws PDFlibException
1307     {
1308 	PDF_set_border_color(p, red, green, blue);
1309     }
1310 
1311     /** @deprecated Use PDF_create_annotation().
1312         @exception com.pdflib.PDFlibException
1313         PDF output cannot be finished after an exception.
1314      */
set_border_dash(double b, double w)1315     public final void set_border_dash(double b, double w)
1316     throws PDFlibException
1317     {
1318 	PDF_set_border_dash(p, b, w);
1319     }
1320 
1321     /** @deprecated Use PDF_create_annotation().
1322         "dashed".
1323         @exception com.pdflib.PDFlibException
1324         PDF output cannot be finished after an exception.
1325      */
set_border_style(String style, double width)1326     public final void set_border_style(String style, double width)
1327     throws PDFlibException
1328     {
1329 	PDF_set_border_style(p, style, width);
1330     }
1331 
1332     /** Activate a graphics state object.
1333         @exception com.pdflib.PDFlibException
1334         PDF output cannot be finished after an exception.
1335     */
set_gstate(int gstate)1336     public final void set_gstate(int gstate)
1337     throws PDFlibException
1338     {
1339 	PDF_set_gstate(p, gstate);
1340     }
1341 
1342     /** Fill document information field key with value.
1343         @exception com.pdflib.PDFlibException
1344         PDF output cannot be finished after an exception.
1345     */
set_info(String key, String value)1346     public final void set_info(String key, String value)
1347     throws PDFlibException
1348     {
1349 	PDF_set_info(p, key, value);
1350     }
1351 
1352     /** Set some PDFlib parameter with string type.
1353         @exception com.pdflib.PDFlibException
1354         PDF output cannot be finished after an exception.
1355     */
set_parameter(String key, String value)1356     public final void set_parameter(String key, String value)
1357     throws PDFlibException
1358     {
1359 	PDF_set_parameter(p, key, value);
1360     }
1361 
1362     /** Set the position for text output on the page.
1363         @exception com.pdflib.PDFlibException
1364         PDF output cannot be finished after an exception.
1365     */
set_text_pos(double x, double y)1366     public final void set_text_pos(double x, double y)
1367     throws PDFlibException
1368     {
1369 	PDF_set_text_pos(p, x, y);
1370     }
1371 
1372     /** Set the value of some PDFlib parameter with numerical type.
1373         @exception com.pdflib.PDFlibException
1374         PDF output cannot be finished after an exception.
1375     */
set_value(String key, double value)1376     public final void set_value(String key, double value)
1377     throws PDFlibException
1378     {
1379 	PDF_set_value(p, key, value);
1380     }
1381 
1382     /** Set the current color space and color.
1383         @exception com.pdflib.PDFlibException
1384         PDF output cannot be finished after an exception.
1385      */
setcolor( String fstype, String colorspace, double c1, double c2, double c3, double c4)1386     public final void setcolor(
1387     String fstype, String colorspace, double c1, double c2, double c3, double c4)
1388     throws PDFlibException
1389     {
1390 	PDF_setcolor(p, fstype, colorspace, c1, c2, c3, c4);
1391     }
1392 
1393     /** Set the current dash pattern.
1394         @exception com.pdflib.PDFlibException
1395         PDF output cannot be finished after an exception.
1396     */
setdash(double b, double w)1397     public final void setdash(double b, double w)
1398     throws PDFlibException
1399     {
1400 	PDF_setdash(p, b, w);
1401     }
1402 
1403     /** Set a dash pattern defined by an option list.
1404         @exception com.pdflib.PDFlibException
1405         PDF output cannot be finished after an exception.
1406     */
setdashpattern(String optlist)1407     public final void setdashpattern(String optlist)
1408     throws PDFlibException
1409     {
1410 	PDF_setdashpattern(p, optlist);
1411     }
1412 
1413     /** Set the flatness parameter.
1414         @exception com.pdflib.PDFlibException
1415         PDF output cannot be finished after an exception.
1416     */
setflat(double flatness)1417     public final void setflat(double flatness)
1418     throws PDFlibException
1419     {
1420 	PDF_setflat(p, flatness);
1421     }
1422 
1423     /** Set the current font in the specified size.
1424         @exception com.pdflib.PDFlibException
1425         PDF output cannot be finished after an exception.
1426      */
setfont(int font, double fontsize)1427     public final void setfont(int font, double fontsize)
1428     throws PDFlibException
1429     {
1430 	PDF_setfont(p, font, fontsize);
1431     }
1432 
1433     /** Set the linecap parameter.
1434         @exception com.pdflib.PDFlibException
1435         PDF output cannot be finished after an exception.
1436     */
setlinecap(int linecap)1437     public final void setlinecap(int linecap)
1438     throws PDFlibException
1439     {
1440 	PDF_setlinecap(p, linecap);
1441     }
1442 
1443     /** Set the linejoin parameter.
1444         @exception com.pdflib.PDFlibException
1445         PDF output cannot be finished after an exception.
1446     */
setlinejoin(int linejoin)1447     public final void setlinejoin(int linejoin)
1448     throws PDFlibException
1449     {
1450 	PDF_setlinejoin(p, linejoin);
1451     }
1452 
1453     /** Set the current linewidth.
1454         @exception com.pdflib.PDFlibException
1455         PDF output cannot be finished after an exception.
1456     */
setlinewidth(double width)1457     public final void setlinewidth(double width)
1458     throws PDFlibException
1459     {
1460 	PDF_setlinewidth(p, width);
1461     }
1462 
1463     /** Explicitly set the current transformation matrix.
1464         @exception com.pdflib.PDFlibException
1465         PDF output cannot be finished after an exception.
1466     */
setmatrix( double a, double b, double c, double d, double e, double f)1467     public final void setmatrix(
1468     double a, double b, double c, double d, double e, double f)
1469     throws PDFlibException
1470     {
1471 	PDF_setmatrix(p, a, b, c, d, e, f);
1472     }
1473 
1474     /** Set the miter limit.
1475         @exception com.pdflib.PDFlibException
1476         PDF output cannot be finished after an exception.
1477     */
setmiterlimit(double miter)1478     public final void setmiterlimit(double miter)
1479     throws PDFlibException
1480     {
1481 	PDF_setmiterlimit(p, miter);
1482     }
1483 
1484     /** @deprecated Use PDF_setdashpattern().
1485         @exception com.pdflib.PDFlibException
1486         PDF output cannot be finished after an exception.
1487     */
setpolydash(float[] dasharray)1488     public final void setpolydash(float[] dasharray)
1489     throws PDFlibException
1490     {
1491 	PDF_setpolydash(p, dasharray);
1492     }
1493 
1494     /** Define a blend from the current fill color to another color (requires
1495         PDF 1.4).
1496         @return A shading handle.
1497         @exception com.pdflib.PDFlibException
1498         PDF output cannot be finished after an exception.
1499     */
shading( String shtype, double x0, double y0, double x1, double y1, double c1, double c2, double c3, double c4, String optlist)1500     public final int shading(
1501     String shtype, double x0, double y0, double x1, double y1,
1502     double c1, double c2, double c3, double c4, String optlist)
1503     throws PDFlibException
1504     {
1505 	return PDF_shading(p, shtype, x0, y0, x1, y1, c1, c2, c3, c4, optlist);
1506     }
1507 
1508     /** Define a shading pattern using a shading object (requires PDF 1.4).
1509         @return A pattern handle.
1510         @exception com.pdflib.PDFlibException
1511         PDF output cannot be finished after an exception.
1512     */
shading_pattern(int shading, String optlist)1513     public final int shading_pattern(int shading, String optlist)
1514     throws PDFlibException
1515     {
1516 	return PDF_shading_pattern(p, shading, optlist);
1517     }
1518 
1519     /** Fill an area with a shading, based on a shading object (requires PDF 1.4).
1520         @exception com.pdflib.PDFlibException
1521         PDF output cannot be finished after an exception.
1522     */
shfill(int shading)1523     public final void shfill(int shading)
1524     throws PDFlibException
1525     {
1526 	PDF_shfill(p, shading);
1527     }
1528 
1529     /** Print text in the current font and size at the current position.
1530         @exception com.pdflib.PDFlibException
1531         PDF output cannot be finished after an exception.
1532     */
show(String text)1533     public final void show(String text)
1534     throws PDFlibException
1535     {
1536 	PDF_show(p, text);
1537     }
1538 
1539     /** @deprecated Use PDF_fit_textline() or PDF_fit_textflow().
1540         @exception com.pdflib.PDFlibException
1541         PDF output cannot be finished after an exception.
1542      */
show_boxed(String text, double left, double bottom, double width, double height, String hmode, String feature)1543     public final int show_boxed(String text, double left, double bottom,
1544         double width, double height, String hmode, String feature)
1545     throws PDFlibException
1546     {
1547 	return PDF_show_boxed(p, text, left, bottom, width, height,
1548 	    	hmode, feature);
1549     }
1550 
1551     /** Print text in the current font.
1552         @exception com.pdflib.PDFlibException
1553         PDF output cannot be finished after an exception.
1554     */
show_xy(String text, double x, double y)1555     public final void show_xy(String text, double x, double y)
1556     throws PDFlibException
1557     {
1558 	PDF_show_xy(p, text, x, y);
1559     }
1560 
1561     /** Skew the coordinate system.
1562         @exception com.pdflib.PDFlibException
1563         PDF output cannot be finished after an exception.
1564      */
skew(double alpha, double beta)1565     public final void skew(double alpha, double beta)
1566     throws PDFlibException
1567     {
1568 	PDF_skew(p, alpha, beta);
1569     }
1570 
1571     /** Calculate the width of text in an arbitrary font.
1572         @return The width of text.
1573         @exception com.pdflib.PDFlibException
1574         PDF output cannot be finished after an exception.
1575      */
stringwidth(String text, int font, double fontsize)1576     public final double stringwidth(String text, int font, double fontsize)
1577     throws PDFlibException
1578     {
1579 	return PDF_stringwidth(p, text, font, fontsize);
1580     }
1581 
1582     /** Stroke the path with the current color and line width, and clear it.
1583         @exception com.pdflib.PDFlibException
1584         PDF output cannot be finished after an exception.
1585     */
stroke()1586     public final void stroke()
1587     throws PDFlibException
1588     {
1589 	PDF_stroke(p);
1590     }
1591 
1592     /** Suspend the current page so that it can later be resumed.
1593         @exception com.pdflib.PDFlibException
1594         PDF output cannot be finished after an exception.
1595     */
suspend_page(String optlist)1596     public final void suspend_page(String optlist)
1597     throws PDFlibException
1598     {
1599 	PDF_suspend_page(p, optlist);
1600     }
1601 
1602     /** Translate the origin of the coordinate system.
1603         @exception com.pdflib.PDFlibException
1604         PDF output cannot be finished after an exception.
1605     */
translate(double tx, double ty)1606     public final void translate(double tx, double ty)
1607     throws PDFlibException
1608     {
1609 	PDF_translate(p, tx, ty);
1610     }
1611 
1612     // ------------------------------------------------------------------------
1613     // private functions
1614 
1615     private long p;
1616 
finalize()1617     protected final void finalize()
1618     throws PDFlibException
1619     {
1620 	PDF_delete(p);
1621 	p = (long) 0;
1622     }
1623 
classFinalize()1624     private final static void classFinalize() {
1625     }
1626 
PDF_activate_item(long jp, int jid)1627     private final static native void PDF_activate_item(long jp, int jid) throws PDFlibException;
PDF_add_bookmark(long jp, String jarg1, int jarg2, int jarg3)1628     private final static native int PDF_add_bookmark(long jp, String jarg1, int jarg2, int jarg3) throws PDFlibException;
PDF_add_table_cell(long jp, int jtable, int jcolumn, int jrow, String jtext, String joptlist)1629     private final static native int PDF_add_table_cell(long jp, int jtable, int jcolumn, int jrow, String jtext, String joptlist) throws PDFlibException;
PDF_add_launchlink(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5)1630     private final static native void PDF_add_launchlink(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5) throws PDFlibException;
PDF_add_locallink(long jp, double jarg1, double jarg2, double jarg3, double jarg4, int jarg5, String jarg6)1631     private final static native void PDF_add_locallink(long jp, double jarg1, double jarg2, double jarg3, double jarg4, int jarg5, String jarg6) throws PDFlibException;
PDF_add_nameddest(long jp, String jname, String joptlist)1632     private final static native void PDF_add_nameddest(long jp, String jname, String joptlist) throws PDFlibException;
PDF_add_note(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5, String jarg6, String jarg7, int jarg8)1633     private final static native void PDF_add_note(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5, String jarg6, String jarg7, int jarg8) throws PDFlibException;
PDF_add_pdflink(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5, int jarg6, String jarg7)1634     private final static native void PDF_add_pdflink(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5, int jarg6, String jarg7) throws PDFlibException;
PDF_add_textflow(long jp, int jtextflow, String jtext, String joptlist)1635     private final static native int PDF_add_textflow(long jp, int jtextflow,  String jtext, String joptlist) throws PDFlibException;
PDF_add_thumbnail(long jp, int jarg1)1636     private final static native void PDF_add_thumbnail(long jp, int jarg1) throws PDFlibException;
PDF_add_weblink(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5)1637     private final static native void PDF_add_weblink(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5) throws PDFlibException;
PDF_arc(long jp, double jarg1, double jarg2, double jarg3, double jarg4, double jarg5)1638     private final static native void PDF_arc(long jp, double jarg1, double jarg2, double jarg3, double jarg4, double jarg5) throws PDFlibException;
PDF_arcn(long jp, double jarg1, double jarg2, double jarg3, double jarg4, double jarg5)1639     private final static native void PDF_arcn(long jp, double jarg1, double jarg2, double jarg3, double jarg4, double jarg5) throws PDFlibException;
PDF_attach_file(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5, String jarg6, String jarg7, String jarg8, String jarg9)1640     private final static native void PDF_attach_file(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5, String jarg6, String jarg7, String jarg8, String jarg9) throws PDFlibException;
PDF_begin_document(long jp, String jarg1, String jarg2)1641     private final static native int PDF_begin_document(long jp, String jarg1, String jarg2) throws PDFlibException;
PDF_begin_font(long jp, String jname, double ja, double jb, double jc, double jd, double je, double jf, String optlist)1642     private final static native void PDF_begin_font(long jp, String jname, double ja, double jb, double jc, double jd, double je, double jf, String optlist) throws PDFlibException;
PDF_begin_glyph(long jp, String jname, double jwx, double jllx, double jlly, double jurx, double jury)1643     private final static native void PDF_begin_glyph(long jp, String jname, double jwx, double jllx, double jlly, double jurx, double jury) throws PDFlibException;
PDF_begin_item(long jp, String jtag, String joptlist)1644     private final static native int PDF_begin_item(long jp, String jtag, String joptlist) throws PDFlibException;
PDF_begin_layer(long jp, int jlayer)1645     private final static native void PDF_begin_layer(long jp, int jlayer) throws PDFlibException;
PDF_begin_page(long jp, double jarg1, double jarg2)1646     private final static native void PDF_begin_page(long jp, double jarg1, double jarg2) throws PDFlibException;
PDF_begin_page_ext(long jp, double jarg1, double jarg2, String jarg3)1647     private final static native void PDF_begin_page_ext(long jp, double jarg1, double jarg2, String jarg3) throws PDFlibException;
PDF_begin_pattern(long jp, double jarg1, double jarg2, double jarg3, double jarg4, int jarg5)1648     private final static native int PDF_begin_pattern(long jp, double jarg1, double jarg2, double jarg3, double jarg4, int jarg5) throws PDFlibException;
PDF_begin_template(long jp, double jarg1, double jarg2)1649     private final static native int PDF_begin_template(long jp, double jarg1, double jarg2) throws PDFlibException;
PDF_begin_template_ext(long jp, double jarg1, double jarg2, String joptlist)1650     private final static native int PDF_begin_template_ext(long jp, double jarg1, double jarg2, String joptlist) throws PDFlibException;
PDF_circle(long jp, double jarg1, double jarg2, double jarg3)1651     private final static native void PDF_circle(long jp, double jarg1, double jarg2, double jarg3) throws PDFlibException;
PDF_clip(long jp)1652     private final static native void PDF_clip(long jp) throws PDFlibException;
PDF_close_image(long jp, int jarg1)1653     private final static native void PDF_close_image(long jp, int jarg1) throws PDFlibException;
PDF_close(long jp)1654     private final static native void PDF_close(long jp) throws PDFlibException;
PDF_closepath_fill_stroke(long jp)1655     private final static native void PDF_closepath_fill_stroke(long jp) throws PDFlibException;
PDF_closepath(long jp)1656     private final static native void PDF_closepath(long jp) throws PDFlibException;
PDF_closepath_stroke(long jp)1657     private final static native void PDF_closepath_stroke(long jp) throws PDFlibException;
PDF_close_pdi(long jp, int jarg1)1658     private final static native void PDF_close_pdi(long jp, int jarg1) throws PDFlibException;
PDF_close_pdi_document(long jp, int jarg1)1659     private final static native void PDF_close_pdi_document(long jp, int jarg1) throws PDFlibException;
PDF_close_pdi_page(long jp, int jarg1)1660     private final static native void PDF_close_pdi_page(long jp, int jarg1) throws PDFlibException;
PDF_concat(long jp, double a, double b, double c, double d, double e, double f)1661     private final static native void PDF_concat(long jp, double a, double b, double c, double d, double e, double f) throws PDFlibException;
PDF_continue_text(long jp, String jarg1)1662     private final static native void PDF_continue_text(long jp, String jarg1) throws PDFlibException;
PDF_create_3dview(long jp, String jusername, String joptlist)1663     private final static native int PDF_create_3dview(long jp, String jusername, String joptlist) throws PDFlibException;
PDF_create_action(long jp, String jtype, String joptlist)1664     private final static native int PDF_create_action(long jp, String jtype, String joptlist) throws PDFlibException;
PDF_create_annotation(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5, String jarg6)1665     private final static native void PDF_create_annotation(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jarg5, String jarg6) throws PDFlibException;
PDF_create_bookmark(long jp, String jarg1, String joptlist)1666     private final static native int PDF_create_bookmark(long jp, String jarg1, String joptlist) throws PDFlibException;
PDF_create_field(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jname, String jtype, String joptlist)1667     private final static native void PDF_create_field(long jp, double jarg1, double jarg2, double jarg3, double jarg4, String jname, String jtype, String joptlist) throws PDFlibException;
PDF_create_fieldgroup(long jp, String jname, String joptlist)1668     private final static native void PDF_create_fieldgroup(long jp, String jname, String joptlist) throws PDFlibException;
PDF_create_gstate(long jp, String joptlist)1669     private final static native int PDF_create_gstate(long jp, String joptlist) throws PDFlibException;
PDF_create_pvf(long jp, String jfilename, byte[] jdata, String joptlist)1670     private final static native void PDF_create_pvf(long jp, String jfilename, byte[] jdata, String joptlist) throws PDFlibException;
PDF_create_textflow(long jp, String jtext, String joptlist)1671     private final static native int PDF_create_textflow(long jp, String jtext, String joptlist) throws PDFlibException;
PDF_curveto(long jp, double jarg1, double jarg2, double jarg3, double jarg4, double jarg5, double jarg6)1672     private final static native void PDF_curveto(long jp, double jarg1, double jarg2, double jarg3, double jarg4, double jarg5, double jarg6) throws PDFlibException;
PDF_define_layer(long jp, String jname, String joptlist)1673     private final static native int PDF_define_layer(long jp, String jname, String joptlist) throws PDFlibException;
PDF_set_layer_dependency(long jp, String jtype, String joptlist)1674     private final static native void PDF_set_layer_dependency(long jp, String jtype, String joptlist) throws PDFlibException;
PDF_delete(long jp)1675     private final static native synchronized void PDF_delete(long jp);
PDF_delete_pvf(long jp, String jfilename)1676     private final static native int PDF_delete_pvf(long jp, String jfilename) throws PDFlibException;
PDF_delete_table(long jp, int table, String joptlist)1677     private final static native void PDF_delete_table(long jp, int table, String joptlist) throws PDFlibException;
PDF_delete_textflow(long jp, int jtextflow)1678     private final static native void PDF_delete_textflow(long jp, int jtextflow) throws PDFlibException;
PDF_encoding_set_char(long jp, String jencoding, int jslot, String jglyphname, int juv)1679     private final static native void PDF_encoding_set_char(long jp, String jencoding, int jslot, String jglyphname, int juv) throws PDFlibException;
PDF_end_document(long jp, String jarg1)1680     private final static native int PDF_end_document(long jp, String jarg1) throws PDFlibException;
PDF_end_font(long jp)1681     private final static native void PDF_end_font(long jp) throws PDFlibException;
PDF_end_glyph(long jp)1682     private final static native void PDF_end_glyph(long jp) throws PDFlibException;
PDF_end_item(long jp, int jid)1683     private final static native void PDF_end_item(long jp, int jid) throws PDFlibException;
PDF_end_layer(long jp)1684     private final static native void PDF_end_layer(long jp) throws PDFlibException;
PDF_end_page(long jp)1685     private final static native void PDF_end_page(long jp) throws PDFlibException;
PDF_end_page_ext(long jp, String jarg1)1686     private final static native void PDF_end_page_ext(long jp, String jarg1) throws PDFlibException;
PDF_endpath(long jp)1687     private final static native void PDF_endpath(long jp) throws PDFlibException;
PDF_end_pattern(long jp)1688     private final static native void PDF_end_pattern(long jp) throws PDFlibException;
PDF_end_template(long jp)1689     private final static native void PDF_end_template(long jp) throws PDFlibException;
PDF_fill_imageblock(long jp, int jpage, String jblockname, int jimage, String joptlist)1690     private final static native int PDF_fill_imageblock(long jp, int jpage, String jblockname, int jimage, String joptlist) throws PDFlibException;
PDF_fill(long jp)1691     private final static native void PDF_fill(long jp) throws PDFlibException;
PDF_fill_pdfblock(long jp, int jpage, String jblockname, int jcontents, String joptlist)1692     private final static native int PDF_fill_pdfblock(long jp, int jpage, String jblockname, int jcontents, String joptlist) throws PDFlibException;
PDF_fill_stroke(long jp)1693     private final static native void PDF_fill_stroke(long jp) throws PDFlibException;
PDF_fill_textblock(long jp, int jpage, String jblockname, String jtext, String joptlist)1694     private final static native int PDF_fill_textblock(long jp, int jpage, String jblockname, String jtext, String joptlist) throws PDFlibException;
PDF_findfont(long jp, String jarg1, String jarg2, int jarg3)1695     private final static native int PDF_findfont(long jp, String jarg1, String jarg2, int jarg3) throws PDFlibException;
PDF_fit_image(long jp, int jimage, double jx, double jy, String joptlist)1696     private final static native void PDF_fit_image(long jp, int jimage, double jx, double jy, String joptlist) throws PDFlibException;
PDF_fit_pdi_page(long jp, int jpage, double jx, double jy, String joptlist)1697     private final static native void PDF_fit_pdi_page(long jp, int jpage, double jx, double jy, String joptlist) throws PDFlibException;
PDF_fit_table(long jp, int jtable, double jllx, double jlly, double jurx, double jury, String joptlist)1698     private final static native String PDF_fit_table(long jp, int jtable, double jllx, double jlly, double jurx, double jury, String joptlist) throws PDFlibException;
PDF_fit_textflow(long jp, int jtextflow, double jllx, double jlly, double jurx, double jury, String joptlist)1699     private final static native String PDF_fit_textflow(long jp, int jtextflow, double jllx, double jlly, double jurx, double jury, String joptlist) throws PDFlibException;
PDF_fit_textline(long jp, String jtext, double jx, double jy, String joptlist)1700     private final static native void PDF_fit_textline(long jp, String jtext, double jx, double jy, String joptlist) throws PDFlibException;
PDF_get_apiname(long jp)1701     private final static native String PDF_get_apiname(long jp);
PDF_get_buffer(long jp)1702     private final static native byte[] PDF_get_buffer(long jp) throws PDFlibException;
PDF_get_errmsg(long jp)1703     private final static native String PDF_get_errmsg(long jp);
PDF_get_errnum(long jp)1704     private final static native int PDF_get_errnum(long jp);
PDF_get_parameter(long jp, String key, double mod)1705     private final static native String PDF_get_parameter(long jp, String key, double mod) throws PDFlibException;
PDF_get_pdi_parameter(long jp, String jarg2, int jarg3, int jarg4, int jarg5)1706     private final static native String PDF_get_pdi_parameter(long jp, String jarg2, int jarg3, int jarg4, int jarg5) throws PDFlibException;
PDF_get_pdi_value(long jp, String jarg1, int jarg2, int jarg3, int jarg4)1707     private final static native double PDF_get_pdi_value(long jp, String jarg1, int jarg2, int jarg3, int jarg4) throws PDFlibException;
PDF_get_value(long jp, String key, double mod)1708     private final static native double PDF_get_value(long jp, String key, double mod) throws PDFlibException;
PDF_info_font(long jp, int jfont, String jkeyword, String optlist)1709     private final static native double PDF_info_font(long jp, int jfont, String jkeyword, String optlist) throws PDFlibException;
PDF_info_matchbox(long jp, String boxname, int jnum, String jkeyword)1710     private final static native double PDF_info_matchbox(long jp, String boxname, int jnum, String jkeyword) throws PDFlibException;
PDF_info_table(long jp, int jtable, String jkeyword)1711     private final static native double PDF_info_table(long jp, int jtable, String jkeyword) throws PDFlibException;
PDF_info_textline(long jp, String jtext, String jkeyword, String joptlist)1712     private final static native double PDF_info_textline(long jp, String jtext, String jkeyword, String joptlist) throws PDFlibException;
PDF_info_textflow(long jp, int jtextflow, String jkeyword)1713     private final static native double PDF_info_textflow(long jp, int jtextflow, String jkeyword) throws PDFlibException;
PDF_initgraphics(long jp)1714     private final static native void PDF_initgraphics(long jp) throws PDFlibException;
PDF_lineto(long jp, double jarg1, double jarg2)1715     private final static native void PDF_lineto(long jp, double jarg1, double jarg2) throws PDFlibException;
PDF_load_3ddata(long jp, String jfilename, String joptlist)1716     private final static native int PDF_load_3ddata(long jp, String jfilename, String joptlist) throws PDFlibException;
PDF_load_font(long jp, String jfontname, String jencoding, String joptlist)1717     private final static native int PDF_load_font(long jp, String jfontname, String jencoding, String joptlist) throws PDFlibException;
PDF_load_iccprofile(long jp, String jprofilename, String joptlist)1718     private final static native int PDF_load_iccprofile(long jp, String jprofilename, String joptlist) throws PDFlibException;
PDF_load_image(long jp, String jimagetype, String jfilename, String joptlist)1719     private final static native int PDF_load_image(long jp, String jimagetype, String jfilename, String joptlist) throws PDFlibException;
PDF_makespotcolor(long jp, String jarg1)1720     private final static native int PDF_makespotcolor(long jp, String jarg1) throws PDFlibException;
PDF_moveto(long jp, double jarg1, double jarg2)1721     private final static native void PDF_moveto(long jp, double jarg1, double jarg2) throws PDFlibException;
PDF_new()1722     private final static native synchronized long PDF_new() throws PDFlibException;
PDF_open_CCITT(long jp, String jarg1, int jarg2, int jarg3, int jarg4, int jarg5, int jarg6)1723     private final static native int PDF_open_CCITT(long jp, String jarg1, int jarg2, int jarg3, int jarg4, int jarg5, int jarg6) throws PDFlibException;
PDF_open_file(long jp, String jarg1)1724     private final static native int PDF_open_file(long jp, String jarg1) throws PDFlibException;
PDF_open_image_file(long jp, String jarg1, String jarg2, String jarg3, int jarg4)1725     private final static native int PDF_open_image_file(long jp, String jarg1, String jarg2, String jarg3, int jarg4) throws PDFlibException;
PDF_open_image(long jp, String jarg1, String jarg2, byte[] jarg3, long jarg4, int jarg5, int jarg6, int jarg7, int jarg8, String jarg9)1726     private final static native int PDF_open_image(long jp, String jarg1, String jarg2, byte[] jarg3, long jarg4, int jarg5, int jarg6, int jarg7, int jarg8, String jarg9) throws PDFlibException;
PDF_open_pdi(long jp, String jarg1, String jarg2, int jarg3)1727     private final static native int PDF_open_pdi(long jp, String jarg1, String jarg2, int jarg3) throws PDFlibException;
PDF_open_pdi_document(long jp, String jarg1, String jarg2)1728     private final static native int PDF_open_pdi_document(long jp, String jarg1, String jarg2) throws PDFlibException;
PDF_open_pdi_page(long jp, int jarg1, int jarg2, String jarg3)1729     private final static native int PDF_open_pdi_page(long jp, int jarg1, int jarg2, String jarg3) throws PDFlibException;
PDF_pcos_get_number(long jp, int jdoc, String jpath)1730     private final static native double PDF_pcos_get_number(long jp, int jdoc, String jpath) throws PDFlibException;
PDF_pcos_get_string(long jp, int jdoc, String jpath)1731     private final static native String PDF_pcos_get_string(long jp, int jdoc, String jpath) throws PDFlibException;
PDF_pcos_get_stream(long jp, int jdoc, String joptlist, String jpath)1732     private final static native byte[] PDF_pcos_get_stream(long jp, int jdoc, String joptlist, String jpath) throws PDFlibException;
PDF_place_image(long jp, int jarg1, double jarg2, double jarg3, double jarg4)1733     private final static native void PDF_place_image(long jp, int jarg1, double jarg2, double jarg3, double jarg4) throws PDFlibException;
PDF_place_pdi_page(long jp, int jarg1, double jarg2, double jarg3, double jarg4, double jarg5)1734     private final static native void PDF_place_pdi_page(long jp, int jarg1, double jarg2, double jarg3, double jarg4, double jarg5) throws PDFlibException;
PDF_process_pdi(long jp, int jdoc, int jpage, String joptlist)1735     private final static native int PDF_process_pdi(long jp, int jdoc, int jpage, String joptlist) throws PDFlibException;
PDF_rect(long jp, double jarg1, double jarg2, double jarg3, double jarg4)1736     private final static native void PDF_rect(long jp, double jarg1, double jarg2, double jarg3, double jarg4) throws PDFlibException;
PDF_restore(long jp)1737     private final static native void PDF_restore(long jp) throws PDFlibException;
PDF_resume_page(long jp, String joptlist)1738     private final static native void PDF_resume_page(long jp, String joptlist) throws PDFlibException;
PDF_rotate(long jp, double jarg1)1739     private final static native void PDF_rotate(long jp, double jarg1) throws PDFlibException;
PDF_save(long jp)1740     private final static native void PDF_save(long jp) throws PDFlibException;
PDF_scale(long jp, double jarg1, double jarg2)1741     private final static native void PDF_scale(long jp, double jarg1, double jarg2) throws PDFlibException;
PDF_set_border_color(long jp, double jarg1, double jarg2, double jarg3)1742     private final static native void PDF_set_border_color(long jp, double jarg1, double jarg2, double jarg3) throws PDFlibException;
PDF_set_border_dash(long jp, double jarg1, double jarg2)1743     private final static native void PDF_set_border_dash(long jp, double jarg1, double jarg2) throws PDFlibException;
PDF_set_border_style(long jp, String jarg1, double jarg2)1744     private final static native void PDF_set_border_style(long jp, String jarg1, double jarg2) throws PDFlibException;
PDF_setcolor(long jp, String jarg1, String jarg2, double jarg3, double jarg4, double jarg5, double jarg6)1745     private final static native void PDF_setcolor(long jp, String jarg1, String jarg2, double jarg3, double jarg4, double jarg5, double jarg6) throws PDFlibException;
PDF_setdash(long jp, double jarg1, double jarg2)1746     private final static native void PDF_setdash(long jp, double jarg1, double jarg2) throws PDFlibException;
PDF_setdashpattern(long jp, String joptlist)1747     private final static native void PDF_setdashpattern(long jp, String joptlist) throws PDFlibException;
PDF_setflat(long jp, double jarg1)1748     private final static native void PDF_setflat(long jp, double jarg1) throws PDFlibException;
PDF_setfont(long jp, int jarg1, double jarg2)1749     private final static native void PDF_setfont(long jp, int jarg1, double jarg2) throws PDFlibException;
PDF_set_gstate(long jp, int jhandle)1750     private final static native void PDF_set_gstate(long jp, int jhandle) throws PDFlibException;
PDF_set_info(long jp, String jarg1, String jarg2)1751     private final static native void PDF_set_info(long jp, String jarg1, String jarg2) throws PDFlibException;
PDF_setlinecap(long jp, int jarg1)1752     private final static native void PDF_setlinecap(long jp, int jarg1) throws PDFlibException;
PDF_setlinejoin(long jp, int jarg1)1753     private final static native void PDF_setlinejoin(long jp, int jarg1) throws PDFlibException;
PDF_setlinewidth(long jp, double jarg1)1754     private final static native void PDF_setlinewidth(long jp, double jarg1) throws PDFlibException;
PDF_setmatrix(long jp, double jarg1, double jarg2, double jarg3, double jarg4, double jarg5, double jarg6)1755     private final static native void PDF_setmatrix(long jp, double jarg1, double jarg2, double jarg3, double jarg4, double jarg5, double jarg6) throws PDFlibException;
PDF_setmiterlimit(long jp, double jarg1)1756     private final static native void PDF_setmiterlimit(long jp, double jarg1) throws PDFlibException;
PDF_set_parameter(long jp, String jarg1, String jarg2)1757     private final static native void PDF_set_parameter(long jp, String jarg1, String jarg2) throws PDFlibException;
PDF_setpolydash(long jp, float[] jarg1)1758     private final static native void PDF_setpolydash(long jp, float[] jarg1) throws PDFlibException;
PDF_set_text_pos(long jp, double jarg1, double jarg2)1759     private final static native void PDF_set_text_pos(long jp, double jarg1, double jarg2) throws PDFlibException;
PDF_set_value(long jp, String jarg1, double jarg2)1760     private final static native void PDF_set_value(long jp, String jarg1, double jarg2) throws PDFlibException;
PDF_shading(long jp, String jshtype, double jx0, double jy0, double jx1, double jy1, double jc1, double jc2, double jc3, double jc4, String joptlist)1761     private final static native int PDF_shading(long jp, String jshtype, double jx0, double jy0, double jx1, double jy1, double jc1, double jc2, double jc3, double jc4, String joptlist) throws PDFlibException;
PDF_shading_pattern(long jp, int jshading, String joptlist)1762     private final static native int PDF_shading_pattern(long jp, int jshading, String joptlist) throws PDFlibException;
PDF_shfill(long jp, int jshading)1763     private final static native void PDF_shfill(long jp, int jshading) throws PDFlibException;
PDF_show_boxed(long jp, String jarg1, double jarg2, double jarg3, double jarg4, double jarg5, String jarg6, String jarg7)1764     private final static native int PDF_show_boxed(long jp, String jarg1, double jarg2, double jarg3, double jarg4, double jarg5, String jarg6, String jarg7) throws PDFlibException;
PDF_show(long jp, String jarg1)1765     private final static native void PDF_show(long jp, String jarg1) throws PDFlibException;
PDF_show_xy(long jp, String jarg1, double jarg2, double jarg3)1766     private final static native void PDF_show_xy(long jp, String jarg1, double jarg2, double jarg3) throws PDFlibException;
PDF_skew(long jp, double jarg1, double jarg2)1767     private final static native void PDF_skew(long jp, double jarg1, double jarg2) throws PDFlibException;
PDF_stringwidth(long jp, String jarg1, int jarg2, double jarg3)1768     private final static native double PDF_stringwidth(long jp, String jarg1, int jarg2, double jarg3) throws PDFlibException;
PDF_stroke(long jp)1769     private final static native void PDF_stroke(long jp) throws PDFlibException;
PDF_suspend_page(long jp, String joptlist)1770     private final static native void PDF_suspend_page(long jp, String joptlist) throws PDFlibException;
PDF_translate(long jp, double jarg1, double jarg2)1771     private final static native void PDF_translate(long jp, double jarg1, double jarg2) throws PDFlibException;
1772 }
1773