pdfmodule.java
来自「RESIN 3.2 最新源码」· Java 代码 · 共 1,945 行 · 第 1/3 页
JAVA
1,945 行
/* * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved * * This file is part of Resin(R) Open Source * * Each copy or derived work must preserve the copyright notice and this * notice unmodified. * * Resin Open Source 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 of the License, or * (at your option) any later version. * * Resin Open Source 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, or any warranty * of NON-INFRINGEMENT. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License * along with Resin Open Source; if not, write to the * * Free Software Foundation, Inc. * 59 Temple Place, Suite 330 * Boston, MA 02111-1307 USA * * @author Scott Ferguson */package com.caucho.quercus.lib.pdf;import com.caucho.quercus.QuercusModuleException;import com.caucho.quercus.annotation.NotNull;import com.caucho.quercus.annotation.Optional;import com.caucho.quercus.env.BooleanValue;import com.caucho.quercus.env.Env;import com.caucho.quercus.env.Value;import com.caucho.quercus.module.AbstractQuercusModule;import com.caucho.util.L10N;import com.caucho.vfs.Path;import java.io.IOException;import java.util.logging.Logger;/** * PHP PDF routines. */public class PDFModule extends AbstractQuercusModule { private static final L10N L = new L10N(PDFModule.class); private static final Logger log = Logger.getLogger(PDFModule.class.getName()); /** * Returns true for the mysql extension. */ public String []getLoadedExtensions() { return new String[] { "pdf" }; } /** * Activates a created element. */ public static boolean pdf_activate_item(Env env, @NotNull PDF pdf, int id) { env.stub("pdf_activate_item"); return false; } /** * Adds an annotation */ public static boolean pdf_add_annotation(Env env, @NotNull PDF pdf) { env.stub("pdf_add_annotation"); return false; } /** * Adds an bookmarkannotation */ public static boolean pdf_add_bookmark(Env env, @NotNull PDF pdf) { env.stub("pdf_add_bookmark"); return false; } /** * Adds an launchlink */ public static boolean pdf_add_launchlink(Env env, @NotNull PDF pdf, double llx, double lly, double urx, double ury, String filename) { env.stub("pdf_add_launchlink"); return false; } /** * Adds a locallink */ public static boolean pdf_add_locallink(Env env, @NotNull PDF pdf, double llx, double lly, double urx, double ury, int page, String dest) { env.stub("pdf_add_locallink"); return false; } /** * Creates a named destination */ public static boolean pdf_add_nameddest(Env env, @NotNull PDF pdf, String name, @Optional String optlist) { env.stub("pdf_add_nameddest"); return false; } /** * Creates an annotation */ public static boolean pdf_add_note(Env env, @NotNull PDF pdf, double llx, double lly, double urx, double ury, String contents, String title, String icon, int open) { env.stub("pdf_add_note"); return false; } /** * Creates an outline */ public static boolean pdf_add_outline(Env env, @NotNull PDF pdf, String name, @Optional String optlist) { env.stub("pdf_add_outline"); return false; } /** * Creates a file link annotation */ public static boolean pdf_add_pdflink(Env env, @NotNull PDF pdf, double llx, double lly, double urx, double ury, String filename, int page, String dest) { env.stub("pdf_add_pdflink"); return false; } /** * Adds a thumbnail */ public static boolean pdf_add_thumbnail(Env env, @NotNull PDF pdf, @NotNull PDFImage image) { env.stub("pdf_add_thumbnail"); return false; } /** * Adds a web link */ public static boolean pdf_add_weblink(Env env, @NotNull PDF pdf, double llx, double lly, double urx, double ury, String url) { env.stub("pdf_add_weblink"); return false; } /** * Creates a counterclockwise arc */ public static boolean pdf_arc(@NotNull PDF pdf, double x1, double y1, double r, double a, double b) { if (pdf == null) return false; return pdf.arc(x1, y1, r, a, b); } /** * Creates a clockwise arc */ public static boolean pdf_arcn(@NotNull PDF pdf, double x1, double y1, double r, double a, double b) { if (pdf == null) return false; return pdf.arcn(x1, y1, r, a, b); } /** * Adds a file attachment */ public static boolean pdf_attach_file(Env env, @NotNull PDF pdf, double llx, double lly, double urx, double ury, String filename, String description, String author, String mimetype, String icon) { env.stub("pdf_attach_file"); return false; } /** * Starts the document. */ public static boolean pdf_begin_document(@NotNull PDF pdf, @Optional String fileName, @Optional String optList) { try { if (pdf == null) return false; return pdf.begin_document(fileName, optList); } catch (IOException e) { throw new QuercusModuleException(e); } } /** * Starts a font definition */ public static boolean pdf_begin_font(Env env, @NotNull PDF pdf, String fileName, double a, double b, double c, double d, double e, double f, @Optional String optList) { env.stub("pdf_begin_font"); return false; } /** * Starts a glyph definition */ public static boolean pdf_begin_glyph(Env env, @NotNull PDF pdf, String glyphname, double wx, double llx, double lly, double urx, double ury) { env.stub("pdf_begin_glyph"); return false; } /** * Starts a structure element */ public static boolean pdf_begin_item(Env env, @NotNull PDF pdf, String tag, String optlist) { env.stub("pdf_begin_item"); return false; } /** * Starts a pdf layer */ public static boolean pdf_begin_layer(Env env, @NotNull PDF pdf, int layer) { env.stub("pdf_begin_layer"); return false; } /** * Starts the page. */ public static boolean pdf_begin_page_ext(@NotNull PDF pdf, double w, double h, @Optional String optlist) { try { if (pdf == null) return false; return pdf.begin_page_ext(w, h, optlist); } catch (IOException e) { throw new QuercusModuleException(e); } } /** * Starts the page. */ public static boolean pdf_begin_page(@NotNull PDF pdf, double w, double h) { try { if (pdf == null) return false; return pdf.begin_page(w, h); } catch (IOException e) { throw new QuercusModuleException(e); } } /** * Starts a pattern */ public static boolean pdf_begin_pattern(Env env, @NotNull PDF pdf, double w, double h, double xStep, double yStep, int paintType) { env.stub("pdf_begin_pattern"); return false; } /** * Starts a template */ public static boolean pdf_begin_template(Env env, @NotNull PDF pdf, double w, double h) { env.stub("pdf_begin_template"); return false; } /** * Draws a circle */ public static boolean pdf_circle(@NotNull PDF pdf, double x, double y, double r) { if (pdf == null) return false; return pdf.circle(x, y, r); } /** * Clips the path. */ public static boolean pdf_clip(@NotNull PDF pdf) { if (pdf == null) return false; return pdf.clip(); } /** * Closes an image */ public static boolean pdf_close_image(Env env, @NotNull PDF pdf, PDFImage image) { env.stub("pdf_close_image"); return false; } /** * Closes a page */ public static boolean pdf_close_pdi_page(Env env, @NotNull PDF pdf, int page) { env.stub("pdf_close_pdi_page"); return false; } /** * Closes a document */ public static boolean pdf_close_pdi(Env env, @NotNull PDF pdf, int doc) { env.stub("pdf_close_pdi"); return false; } /** * Closes the pdf document. */ public static boolean pdf_close(@NotNull PDF pdf) { try { if (pdf == null) return false; return pdf.close(); } catch (IOException e) { throw new QuercusModuleException(e); } } /** * Closes the path, fill, and stroke it. */ public static boolean pdf_closepath_fill_stroke(@NotNull PDF pdf) { if (pdf == null) return false; return pdf.closepath_fill_stroke(); } /** * Closes the path and stroke it. */ public static boolean pdf_closepath_stroke(@NotNull PDF pdf) { if (pdf == null) return false; return pdf.closepath_stroke(); } /** * Closes the path. */ public static boolean pdf_closepath(@NotNull PDF pdf) { if (pdf == null) return false; return pdf.closepath(); } /** * Concatenates a transformation matrix */ public static boolean pdf_concat(@NotNull PDF pdf, double a, double b, double c, double d, double e, double f) { if (pdf == null) return false; return pdf.concat(a, b,c, d, e, f); } /** * Continues text at the next line. */ public static boolean pdf_continue_text(@NotNull PDF pdf, String text) { if (pdf == null) return false; return pdf.continue_text(text); } /** * Creates an action. */ public static boolean pdf_create_action(Env env, @NotNull PDF pdf, String type, @Optional String optList) { env.stub("pdf_create_action"); return false; } /** * Creates a rectangular annotation */ public static boolean pdf_create_annotation(Env env, @NotNull PDF pdf, double llx, double lly, double urx, double ury, String type, @Optional String optList) { env.stub("pdf_create_annotation"); return false; } /** * Creates a bookmark */ public static boolean pdf_create_bookmark(Env env, @NotNull PDF pdf, String text, @Optional String optList) { env.stub("pdf_create_bookmark"); return false; } /** * Creates a form field. */ public static boolean pdf_create_field(Env env, @NotNull PDF pdf, double llx, double lly, double urx, double ury, String name, String type, @Optional String optList) { env.stub("pdf_create_field"); return false; } /** * Creates a form field group. */ public static boolean pdf_create_fieldgroup(Env env, @NotNull PDF pdf, String name, @Optional String optList) { env.stub("pdf_create_fieldgroup"); return false; } /** * Creates a graphics state */ public static boolean pdf_create_gstate(Env env, @NotNull PDF pdf, @Optional String optList) { env.stub("pdf_create_gstate"); return false; } /** * Creates a virtual file */ public static boolean pdf_create_pvf(Env env, @NotNull PDF pdf, String filename, String data, @Optional String optList) { env.stub("pdf_create_pvf"); return false; } /** * Creates a textflow object */ public static boolean pdf_create_textflow(Env env, @NotNull PDF pdf, String text,
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?