JP2013025770A - Pdf creation system - Google Patents

Pdf creation system Download PDF

Info

Publication number
JP2013025770A
JP2013025770A JP2011163315A JP2011163315A JP2013025770A JP 2013025770 A JP2013025770 A JP 2013025770A JP 2011163315 A JP2011163315 A JP 2011163315A JP 2011163315 A JP2011163315 A JP 2011163315A JP 2013025770 A JP2013025770 A JP 2013025770A
Authority
JP
Japan
Prior art keywords
pdf
display
data
csv
display content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2011163315A
Other languages
Japanese (ja)
Other versions
JP5753018B2 (en
Inventor
Satoshi Sakasai
聡 逆井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Systems Ltd
Original Assignee
Hitachi Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Systems Ltd filed Critical Hitachi Systems Ltd
Priority to JP2011163315A priority Critical patent/JP5753018B2/en
Publication of JP2013025770A publication Critical patent/JP2013025770A/en
Application granted granted Critical
Publication of JP5753018B2 publication Critical patent/JP5753018B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a general-purpose PDF (Portable Document Format) creation system for coping with the addition or correction of an output PDF without requiring alteration in a system which outputs a PDF, and for reducing correction costs by securing maintenance easiness.SOLUTION: A PDF creation system 102 in a server 101 includes: a PDF template 104 for setting fixed layout which is independent of data of a PDF; a display content CSV (Comma Separated Values) storage unit 103 for storing display content CSV for setting display data to be displayed in the PDF; a database 105 for display definition XML (Extensible Markup Language) storage for storing display definition XML for setting a display definition of the display data; and a PDF creation processing unit 110 for creating data of the PDF by data-editing the display content CSV obtained from the storage unit 103 on the basis of layout obtained from the template 104 in accordance with the display definition XML obtained from the database 105, and for outputting the created data of the PDF for the creation of a PDF file 111.

Description

本発明は、コンピュータシステム(サーバ)機能によりJava(登録商標)アプリケーションを利用してPDF(Portable Document Format)を自動的に作成するPDF作成システムに関する。   The present invention relates to a PDF creation system that automatically creates a PDF (Portable Document Format) using a Java (registered trademark) application by a computer system (server) function.

従来、JavaアプリケーションでPDFを出力するコンピュータシステムでは、一般にPDFに出力するデータ内容については任意に設定することができ、データの変更も容易であるものが多いが、PDFへのデータ出力数、データ出力位置、出力文字サイズ等のデータ変更を行う場合には、システム改修を要せずに対応できる場合は少なく、システム改修を行わずにデータを変更可能にする手法が幾つか提案されている。   Conventionally, in a computer system that outputs a PDF with a Java application, the data content to be output to the PDF can generally be arbitrarily set and the data can be easily changed. However, the number of data output to the PDF, the data When changing the data such as the output position and the output character size, there are few cases where it is possible to deal with without modifying the system, and several methods have been proposed that allow the data to be changed without modifying the system.

係る周知技術としては、例えばXML(Extensible Markup Language)で記述された帳票(XML帳票)から帳票定義のXMLデータ構造情報を作成することを目的とした「帳票処理装置及び帳票処理プログラム」(特許文献1参照)や、WEB(World Wide Web)システムの画面/帳票の様式・レイアウト情報の変更をカスタマイズできる帳票システムであって、ホストコンピュータを利用して簡単に、規定用紙の設定等を実現できる帳票の出力である「帳票出力プリントシステム」(特許文献2参照)が挙げられる。   For example, “form processing apparatus and form processing program” for creating form definition XML data structure information from a form (XML form) described in XML (Extensible Markup Language) is known. 1) and a WEB (World Wide Web) system / form format / layout information that can be customized to change the form / layout information of a WEB system. "Form output printing system" (see Patent Document 2).

特開2004−21500号公報JP 2004-21500 A 特開2008−130062号公報Japanese Patent Laid-Open No. 2008-130062

上述した特許文献1に係る技術では、XMLで記述された帳票(XML帳票)についてのXMLデータ構造を解析してレイアウト情報及びデータ構造情報を抽出し、システムで処理を行って帳票として出力するものであるが、XML内に表示するデータ内容とレイアウト情報との両方が定義されているため、例えばレイアウト情報のみを変更し、データ内容は同一のPDFを出力する場合でも、新たなXMLを作成する必要があるばかりでなく、その後にデータ内容に変更を行う場合には、レイアウト情報のみが異なる複数のXMLの全てに対して変更を行う必要があるため、保守性が低いという問題がある。   In the technique according to Patent Document 1 described above, an XML data structure of a form (XML form) described in XML is analyzed, layout information and data structure information are extracted, processed by the system, and output as a form. However, since both the data contents to be displayed in the XML and the layout information are defined, for example, only the layout information is changed, and a new XML is created even when outputting the same PDF data. Not only is this necessary, but when the data contents are subsequently changed, there is a problem that the maintainability is low because it is necessary to change all of the plurality of XMLs that differ only in the layout information.

また、特許文献2に係る技術では、レイアウト情報のみならず、プリンタによる印刷時の用紙設定や出力枚数設定、更にはシステム内の処理で使用する任意の変数等を定義したXMLと、表示データを定義したCSV(Comma Separated Values)とを読み込むことで、紙や電子情報として出力するものであるが、ここではプリンタを用いた紙による出力をサポートするために、用紙設定、ページレイアウト等の情報がXMLに含まれているため、PDF出力のみを目的とした場合に比べて、XML構造が複雑となり、システム開発時の工数やXML作成時の工数が増大してしまうという問題がある。   Further, in the technique according to Patent Document 2, not only layout information, but also XML that defines paper settings and output number settings at the time of printing by a printer, and arbitrary variables used in processing in the system, and display data. By reading the defined CSV (Comma Separated Values), it is output as paper or electronic information. Here, in order to support output by paper using a printer, information such as paper settings, page layout, etc. Since it is included in XML, the XML structure becomes more complex than when only PDF output is intended, and there is a problem that man-hours for system development and XML creation increase.

本発明は、このような問題点を解決すべくなされたもので、その技術的課題は、PDFを出力するシステムで出力PDFの追加や修正を行う際、改修を要せずに対応可能であると共に、保守容易性を確保して修正コストの低減化を図り得る汎用的なPDF作成システムを提供することにある。   The present invention has been made to solve such problems, and the technical problem can be dealt with without requiring refurbishment when adding or correcting an output PDF in a PDF output system. At the same time, it is an object to provide a general-purpose PDF creation system capable of ensuring the ease of maintenance and reducing the correction cost.

上記技術的課題を解決するため、本発明の第1の手段は、サーバ機能によりJavaアプリケーションを利用してPDFを作成するPDF作成システムにおいて、PDFのデータに依存しない固定のレイアウトを設定するためのPDFテンプレートと、PDFに表示する表示データを設定するための表示内容CSVを格納した表示内容CSV格納部と、表示データの表示定義を設定するための表示定義XMLを格納した表示定義XML格納部と、表示定義XML格納部から得た表示定義XMLに従い、表示内容CSV格納部から得た表示内容CSVをPDFテンプレートから得たレイアウトに基づいてデータ編集してPDFのデータを作成すると共に、作成されたPDFのデータを出力するPDG作成処理部と、を備えたことを特徴とする。   In order to solve the above technical problem, a first means of the present invention is to set a fixed layout independent of PDF data in a PDF creation system that creates a PDF by using a Java application by a server function. A PDF template, a display content CSV storage unit that stores display content CSV for setting display data to be displayed on the PDF, and a display definition XML storage unit that stores a display definition XML for setting the display definition of the display data In accordance with the display definition XML obtained from the display definition XML storage unit, the display content CSV obtained from the display content CSV storage unit is edited based on the layout obtained from the PDF template, and PDF data is created. And a PDG creation processing unit that outputs PDF data.

第2の手段は、第1の手段において、PDFテンプレートは、レイアウトとして実際に出力されるPDFのサイズ、背景色、枠線を含んでおり、表示内容CSV格納部は、表示内容CSVとしてPDFの1つのデータを1行とすると共に、PDFに表示される1項目を1カラムとして表示データを設定するもので、表示定義XML格納部は、表示定義XMLとして少なくともPDFテンプレートへの表示内容CSVの表示位置、並びにフォントをカラム毎に設定するものであることを特徴とする。   The second means is that in the first means, the PDF template includes the size, background color, and frame line of the PDF that is actually output as the layout, and the display content CSV storage unit displays the PDF as the display content CSV. The display definition XML storage unit sets the display data as at least one PDF template as the display definition XML. The display definition XML storage unit sets display data with one item as one column and one column displayed on the PDF. The position and font are set for each column.

第3の手段は、第1の手段又は第2の手段において、PDFのデータをファイル化生成するための各ファイルの格納場所を定義した設定ファイルを備え、PDG作成処理部は、設定ファイルの格納場所に応じて表示定義XML格納部から表示定義XMLを取得すると共に、表示内容CSV格納部から表示内容CSVを取得するデータ取得処理部と、データ取得処理部で取得された表示定義XMLに従った表示内容CSVをPDFテンプレートからのレイアウトに基づいてデータ編集を行ってPDFのデータを作成するPDFデータ編集処理部と、作成されたPDFのデータに対してファイル名を設定して保存してから出力するPDGデータ出力処理部と、を備えたことを特徴とする。   A third means includes a setting file that defines a storage location of each file for generating PDF data as a file in the first means or the second means, and the PDG creation processing unit stores the setting file. According to the location, the display definition XML is acquired from the display definition XML storage unit, and the data acquisition processing unit that acquires the display content CSV from the display content CSV storage unit, and the display definition XML acquired by the data acquisition processing unit A PDF data editing processing unit for editing the display contents CSV based on the layout from the PDF template to create PDF data, and setting the file name for the created PDF data, saving it, and outputting it And a PDG data output processing unit.

第4の手段は、第1の手段〜第3の手段の何れか1つの手段において、PDFテンプレートのレイアウト、表示内容CSV格納部の表示内容CSV、並びに表示定義XML格納部の表示定義XMLは、PDG作成処理部により作成されたPDFのデータの出力時におけるPDFの追加又はPDFの修正に際して、再作成又は修正可能であることを特徴とする。   According to a fourth means, in any one of the first means to the third means, the layout of the PDF template, the display content CSV of the display content CSV storage unit, and the display definition XML of the display definition XML storage unit are: When PDF data created by the PDG creation processing unit is output, it can be re-created or modified when adding or modifying PDF.

本発明のPDF作成システムによれば、PDFについてのレイアウトとデータ構造とをPDF作成処理部から分離し、別個に作成して管理することが可能となるため、PDFの追加や変更に際してのシステムの改修が不要となる。また、レイアウトのみの変更やデータ構造のみの変更が発生した場合でも、それぞれに対応するPDFテンプレートのレイアウトや表示定義XML格納部の表示定義XML、並びに表示内容CSV格納部の表示内容CSVのデータのみを修正することによって、その後の管理が容易になる。その結果として、PDFの追加や変更の容易性を確保でき、システム改修が不要なために運用上での費用を低減化することができる。   According to the PDF creation system of the present invention, the layout and data structure of the PDF can be separated from the PDF creation processing unit, and can be created and managed separately. No renovation is required. Even when only a layout change or a data structure change occurs, only the layout of the corresponding PDF template, the display definition XML of the display definition XML storage unit, and the display content CSV data of the display content CSV storage unit only After that, the subsequent management becomes easier. As a result, the ease of adding or changing PDF can be ensured, and system repair is not required, so that operational costs can be reduced.

本発明の実施例1に係るPDF作成システムを具備したサーバの全体的な概略構成を示した機能ブロック図である。It is the functional block diagram which showed the whole schematic structure of the server provided with the PDF production system which concerns on Example 1 of this invention. 図1に示すPDF作成システムのPDF作成処理部におけるPDF作成の動作処理を示したフローチャートである。It is the flowchart which showed the operation process of PDF creation in the PDF creation process part of the PDF creation system shown in FIG. 図1に示すPDF作成システムのファイル関連図であって、表示内容CSV格納部における表示内容CSVと表示定義XML格納用データベースにおける表示定義XMLのデータの一例を関連付けて示した模式図である。FIG. 2 is a file related diagram of the PDF creation system shown in FIG. 1, and is a schematic diagram showing an example of display content CSV in a display content CSV storage unit and display definition XML data in a display definition XML storage database. 図1に示すPDF作成システムの表示定義XML格納用データベースにおけるファイル構成形式の表示定義XMLのデータを例示した図である。FIG. 2 is a diagram exemplifying display definition XML data in a file configuration format in the display definition XML storage database of the PDF creation system shown in FIG. 1. 図1に示すPDF作成システムの表示内容CSV格納部におけるファイル構成形式の表示内容CSVのデータを例示した図である。It is the figure which illustrated the data of the display content CSV of the file structure format in the display content CSV storage part of the PDF production system shown in FIG. 図1に示すPDF作成システムのPDFテンンプレートのデータを例示した図である。It is the figure which illustrated the data of the PDF template plate of the PDF production system shown in FIG. 図1に示すPDF作成システムの設定ファイルにおけるファイル構成形式のデータを例示した図である。It is the figure which illustrated the data of the file structure format in the setting file of the PDF production system shown in FIG. 図1に示すPDF作成システムのPDF作成処理部におけるPDFデータ出力処理部から出力されるPDFのデータを例示した図である。It is the figure which illustrated the data of PDF output from the PDF data output process part in the PDF production process part of the PDF production system shown in FIG. 図2で説明したPDF作成の動作処理上におけるエラー処理パターンを表形式で例示した図である。FIG. 3 is a diagram illustrating an example of an error processing pattern in a table format in the PDF creation operation process described in FIG. 2.

以下に、本発明のPDF作成システムについて、具体的な実施例を挙げ、図面を参照して詳細に説明する。   In the following, the PDF creation system of the present invention will be described in detail with reference to the drawings with specific examples.

図1は、本発明の実施例1に係るPDF作成システム102を具備したサーバ101の全体的な概略構成を示した機能ブロック図である。   FIG. 1 is a functional block diagram illustrating an overall schematic configuration of a server 101 including a PDF creation system 102 according to the first embodiment of the present invention.

サーバ101は、Javaアプリケーションを利用してPDFを作成可能なもので、CPU(Central Processing Unit)、主メモリ、表示装置、入力操作装置、外部記憶装置等を具備して成るコンピュータ機能を有している。また、サーバ101は、CD−ROM等の記憶媒体や、ネットワーク等を介してプログラムやデータを外部記憶装置内にインストールした後、この外部記憶装置から主メモリに読み込んでCPUで処理することにより、実施例1のPDF作成システム102に係る各処理を実行する。   The server 101 can create a PDF by using a Java application, and has a computer function including a CPU (Central Processing Unit), a main memory, a display device, an input operation device, an external storage device, and the like. Yes. In addition, the server 101 installs a program or data in a storage medium such as a CD-ROM, a network, or the like in an external storage device, and then reads the program from the external storage device into the main memory and processes it by the CPU. Each process according to the PDF creation system 102 of the first embodiment is executed.

PDF作成システム102は、PDFのデータに依存しない固定のレイアウトを設定するためのPDFテンプレート104と、PDFに表示する表示データを設定するための表示内容CSVを格納した表示内容CSV格納部103と、表示データの表示定義を設定するための表示定義XMLを格納した表示定義XML格納用データベース(表示定義XML格納部)105と、PDFのデータをファイル化生成するための各ファイルの格納場所(パス)を定義した設定ファイル106と、表示定義XML格納用データベース105から得た表示定義XMLに従い、表示内容CSV格納部103から得た表示内容CSVをPDFテンプレート104から得たレイアウトに基づいてデータ編集してPDFのデータを作成すると共に、作成されたPDFのデータをPDFファイル111の作成用に出力するPDG作成処理部110と、を備えている。   The PDF creation system 102 includes a PDF template 104 for setting a fixed layout that does not depend on PDF data, a display content CSV storage unit 103 that stores display content CSV for setting display data to be displayed on the PDF, Display definition XML storage database (display definition XML storage unit) 105 storing display definition XML for setting display definition of display data, and storage location (path) of each file for generating PDF data as a file The display content CSV obtained from the display content CSV storage unit 103 is subjected to data editing based on the layout obtained from the PDF template 104 in accordance with the setting file 106 defining the display definition XML obtained from the display definition XML storage database 105. Create PDF data and the created PD It includes a PDG creation processing unit 110, the outputs of the data for creating the PDF file 111.

このうち、PDFテンプレート104は、レイアウトとして実際に出力されるPDFのサイズ、背景色、枠線を含んでおり、PDFのデータを表示しない代わりに背景や枠線については表示するようになっている。表示内容CSV格納部103は、表示内容CSVとしてPDFの1つのデータを1行とすると共に、PDFに表示される1項目を1カラムとして表示データを設定するものである。表示定義XML格納用データベース105は、表示定義XMLとして少なくともPDFテンプレート104への表示内容CSVの表示位置、並びにフォントをカラム毎に設定するものである。   Of these, the PDF template 104 includes the PDF size, background color, and frame line that are actually output as a layout, and instead of displaying PDF data, the background and frame line are displayed. . The display content CSV storage unit 103 sets display data with one item of data displayed on the PDF as one column and one column of PDF data as one row as the display content CSV. The display definition XML storage database 105 sets at least the display position of the display content CSV on the PDF template 104 and the font for each column as the display definition XML.

また、PDG作成処理部110は、設定ファイル106のパスに応じて表示定義XML格納用データベース105から表示定義XMLを取得すると共に、表示内容CSV格納部103から表示内容CSVを取得するデータ取得処理部107と、データ取得処理部107で取得された表示内容CSV及び表示定義XMLをPDFテンプレート104からのレイアウトに基づいてデータ編集を行ってPDFのデータを作成するPDFデータ編集処理部108と、作成されたPDFのデータに対してファイル名を設定して保存してからPDFファイル111の作成用に出力するPDGデータ出力処理部109と、を備えている。   The PDG creation processing unit 110 acquires the display definition XML from the display definition XML storage database 105 according to the path of the setting file 106 and acquires the display content CSV from the display content CSV storage unit 103. 107, and a PDF data editing processing unit 108 for editing the display content CSV and display definition XML acquired by the data acquisition processing unit 107 based on the layout from the PDF template 104 to generate PDF data. A PDG data output processing unit 109 that sets and saves a file name for the PDF data and outputs the data for creation of the PDF file 111.

更に、PDFテンプレート104のレイアウト、表示内容CSV格納部103の表示内容CSV、並びに表示定義XML格納用データベース105の表示定義XMLは、PDG作成処理部110により作成されたPDFのデータのPDFデータ出力処理部109からの出力時におけるPDFの追加又はPDFの修正に際して、再作成又は修正可能となっている。これにより、出力するPDFの追加、或いはPDFの修正を行う際、これらの各部のデータの作成や修正を行うだけで良く、システムの改修を行う必要がない。   Furthermore, the layout of the PDF template 104, the display content CSV of the display content CSV storage unit 103, and the display definition XML of the display definition XML storage database 105 are PDF data output processing of PDF data created by the PDG creation processing unit 110. At the time of output from the unit 109, when PDF is added or PDF is corrected, it can be recreated or corrected. As a result, when adding a PDF to be output or modifying a PDF, it is only necessary to create or modify data of these units, and it is not necessary to modify the system.

即ち、このPDF作成システムについて、具体的に云えば、表示内容CSV格納部103に格納される表示内容CSVは、PDFに表示する表示データを設定するためのもので、PDFの1つに表示するデータをCSVの1行に設定し、項目単位でカラムに設定する。PDFテンプレート104は、実際に出力されるPDFのサイズ、背景色、枠線等、PDFのデータに依存しない固定のレイアウトを設定するもので、これにより作成されるPDFは、PDFテンプレート104上に表示内容CSVにより設定されたデータを表示し、出力される形態となる。表示定義XML格納用データベース105は、PDFテンプレート104上に表示内容CSVにより設定されたデータを表示する際の表示位置、フォント、サイズを設定するもので、これらの設定についてはCSVのカラム番号毎に行う。設定ファイル106は、表示内容CSV格納部103の表示内容CSV、PDFテンプレート104のレイアウト、表示定義XML格納用データベース105の表示定義XMLについて、サーバ101上の格納場所(パス)を設定したものである。   Specifically, regarding this PDF creation system, specifically, the display content CSV stored in the display content CSV storage unit 103 is for setting display data to be displayed on the PDF, and is displayed on one of the PDFs. Data is set in one line of CSV, and set in columns in item units. The PDF template 104 sets a fixed layout that does not depend on the PDF data, such as the size, background color, frame line, etc. of the actually output PDF, and the PDF created thereby is displayed on the PDF template 104. The data set by the content CSV is displayed and output. The display definition XML storage database 105 sets the display position, font, and size when displaying the data set by the display content CSV on the PDF template 104. These settings are set for each column number of the CSV. Do. The setting file 106 sets the storage location (path) on the server 101 for the display content CSV of the display content CSV storage unit 103, the layout of the PDF template 104, and the display definition XML of the display definition XML storage database 105. .

このPDF作成システム102における基本的処理は、PDFデータ作成処理部110における各部の処理(3つの処理)に分けられる。即ち、データ取得処理107では、設定ファイル106に定義された格納場所に基づいて、表示定義XML格納用データベース105の表示定義XML、表示内容CSV格納部103の表示内容CSVを読み込んで内容を解析し、内蔵する記憶手段(メモリ)に格納する。PDFデータ編集処理部108では、PDFテンプレート104のレイアウトを読み込み、先にデータ取得処理107で読み込んで記憶した表示定義XML及び表示内容CSVの内容に対してPDFファイル111として出力するためのPDFのデータ内容を決定し、PDFを作成する。PDFデータ出力処理部109では、作成されたPDFに対してファイル名を設定してから外部記憶装置へ出力する。   The basic processing in the PDF creation system 102 is divided into processing (three processes) of each unit in the PDF data creation processing unit 110. That is, in the data acquisition process 107, based on the storage location defined in the setting file 106, the display definition XML of the display definition XML storage database 105 and the display content CSV of the display content CSV storage unit 103 are read and analyzed. And stored in a built-in storage means (memory). The PDF data editing processing unit 108 reads the layout of the PDF template 104, and the PDF data for outputting the display definition XML and the content of the display content CSV previously read and stored by the data acquisition processing 107 as the PDF file 111. Determine the content and create a PDF. The PDF data output processing unit 109 sets a file name for the created PDF and then outputs it to the external storage device.

図2は、このPDF作成システム102のPDF作成処理部110におけるPDF作成の動作処理を示したフローチャートである。   FIG. 2 is a flowchart showing the PDF creation operation processing in the PDF creation processing unit 110 of the PDF creation system 102.

PDF作成処理部110におけるPDF作成の動作処理では、まずデータ取得処理部107において、設定ファイル106を読み込んでそこに定義されている各ファイル(後述する表示内容CSV格納部103、表示定義XML格納用データベース105、及びPDFテンプレート104を示す)の格納場所(パス)を取得する(ステップS201)処理を行った後、表示定義XML格納用データベース105を読み込んで表示定義XMLに定義されている全項目表示位置情報を取得する(ステップS202)処理を行い、記憶手段(メモリ)に全項目表示位置(ステップS203)を展開する。同様に、表示内容CSV格納部103を読み込んでCSVデータの1行を取得する(ステップS204)処理を行う。因みに、ステップS201で取得した格納場所(パス)は、後の処理で各ファイルを読み込む際に利用され、設定ファイル106自体の格納場所はシステム内のプログラムに直接記載するが、各ファイルについての格納場所は設定ファイル106に記載することにより、ファイルの追加や既存ファイルの格納場所の変更があった場合でもプログラムの修正は不要となる。また、ステップS204では、表示内容CSV格納部103から表示内容CSVのデータを1行毎に読み込む。   In the PDF creation operation process in the PDF creation processing unit 110, first, the data acquisition processing unit 107 reads the setting file 106 and defines each file (display content CSV storage unit 103 and display definition XML storage described later). After the storage location (path) of the database 105 and the PDF template 104 is acquired (step S201), the display definition XML storage database 105 is read to display all items defined in the display definition XML. Processing for acquiring position information (step S202) is performed, and all item display positions (step S203) are developed in the storage means (memory). Similarly, the display content CSV storage unit 103 is read to acquire one line of CSV data (step S204). Incidentally, the storage location (path) acquired in step S201 is used when each file is read in later processing, and the storage location of the setting file 106 itself is directly described in the program in the system. By describing the location in the setting file 106, it is not necessary to modify the program even when a file is added or a storage location of an existing file is changed. In step S204, the display content CSV data is read from the display content CSV storage unit 103 line by line.

次に、PDFデータ編集処理部108において、取得したCSVデータをカラム毎に分割する(ステップS205)処理を行い、記憶手段(メモリ)に表示項目(ステップS206)として展開する。CSVデータには表示項目の他にPDFのファイル名も設定されている。更に、記憶手段(メモリ)上に展開したCSV1行のデータを先頭から1カラムずつ取得し、表示項目の1項目を取得する(ステップS207)処理を行う。このとき、カラム番号に基づいて各項目の表示情報を記憶手段(メモリ)から取得する。引き続き、PDFテンプレート104を読み込んで記憶手段(メモリ)に展開した後、表示情報に基づいてテンプレートに表示項目を表示位置に合わせて表示する(ステップS208)処理を行った後、全ての表示項目の処理を終了したか否かの判定(ステップS209)を行う。この判定の結果、処理されていなければステップS207の前へリターンしてその後の処理を繰り返すが、処理されていればPDFのデータの作成とみなしてPDFデータ出力処理歩109へ引き渡す。因みに、PDFテンプレート104にはPDFのデータ以外のレイアウトに係る表示情報(背景色や枠線)を設定しておく。また、ステップS208、S209で処理を全カラムに対して行わせることでCSVデータ1行分のPDFのデータが作成され、記憶手段(メモリ)上に完成されることになる。   Next, the PDF data editing processing unit 108 performs processing to divide the acquired CSV data for each column (step S205), and develops it as a display item (step S206) in the storage means (memory). In addition to display items, a PDF file name is set in the CSV data. Furthermore, the data of one row of CSV expanded on the storage means (memory) is acquired column by column from the top, and one item of display items is acquired (step S207). At this time, display information of each item is acquired from the storage means (memory) based on the column number. Subsequently, after the PDF template 104 is read and expanded in the storage means (memory), the display item is displayed in the template in accordance with the display position based on the display information (step S208). It is determined whether or not the process is finished (step S209). If the result of this determination is that processing has not been performed, processing returns to step S207 and the subsequent processing is repeated. However, if processing has been performed, it is considered that PDF data has been created, and the PDF data output processing step 109 is handed over. Incidentally, display information (background color and frame line) related to the layout other than the PDF data is set in the PDF template 104. Also, by performing the processing for all the columns in steps S208 and S209, PDF data for one line of CSV data is created and completed on the storage means (memory).

PDFデータ出力処理部109では、PDFデータ編集処理部108から引き渡されたCSVデータ1行分のPDFのデータについて記憶手段(メモリ)よりファイル名を取得し、ファイル名を設定し保存する(ステップS210)処理を行った後、ハードディスク等の外部記録装置へ出力することでCSVデータ1行分のPDFファイル111の生成に至るが、この後に最終的にCSVデータの全行を処理したか否かを判定(ステップS211)する。この判定の結果、処理されていれば動作処理を終了するが、処理されていなければステップS204の前にリターンしてPDF作成の完了に至るまでのCSVデータの行数分繰り返し、CSVデータに設定されている行数分のPDFデータの作成を完了させるようにする。   The PDF data output processing unit 109 acquires a file name from the storage unit (memory) for the PDF data for one line of CSV data delivered from the PDF data editing processing unit 108, sets the file name, and stores it (step S210). ) After processing, output to an external recording device such as a hard disk leads to generation of a PDF file 111 for one line of CSV data. After that, whether or not all lines of CSV data are finally processed is determined. Determination is made (step S211). If the result of this determination is that it has been processed, the operation processing is terminated. If it has not been processed, the process returns to step S204 and is repeated for the number of lines of CSV data until the PDF creation is completed, and is set as CSV data. The creation of PDF data for the number of lines that have been completed is completed.

図3は、このPDF作成システム102のファイル関連図であって、表示内容CSV格納部103における表示内容CSVと表示定義XML格納用データベース105における表示定義XMLのデータの一例を関連付けて示した模式図である。また、図4は表示定義XML格納用データベース105におけるファイル構成形式の表示定義XMLのデータを例示した図である。更に、図5は、表示内容CSV格納部103におけるファイル構成形式の表示内容CSVのデータを例示した図である。   FIG. 3 is a file-related diagram of the PDF creation system 102, and is a schematic diagram showing an example of display content CSV in the display content CSV storage unit 103 and display definition XML data in the display definition XML storage database 105 in association with each other. It is. FIG. 4 is a diagram exemplifying display definition XML data in a file configuration format in the display definition XML storage database 105. FIG. 5 is a diagram exemplifying display content CSV data in a file configuration format in the display content CSV storage unit 103.

各図を参照すれば、表示定義XML格納用データベース105における表示定義XMLの構成は大きく2つに分けられ、例えば図4に示されるように表示定義XMLの全体の設定を行うためのXML定義、設定内容、設定例のうち、XML定義にはroot(設定内容はPDF表示位置情報)の基本となる「config」(設定内容は解析情報)の項目がある。「config」項目の属性には更にXMLの種類を示すitem(設定内容はXML記載タイプ、設定例はtext)や、それに属するシステムでXMLの項目を分解して記憶手段(メモリ)に展開する旨を示すperser(設定内容はJavaプログラム名のJava格納Bean、設定例はcreatePdfParser.Java)等を設定する。   Referring to each figure, the structure of the display definition XML in the display definition XML storage database 105 is roughly divided into two, for example, an XML definition for setting the entire display definition XML as shown in FIG. Among the setting contents and setting examples, the XML definition includes an item of “config” (setting contents is analysis information) which is the basis of root (setting contents are PDF display position information). The attribute of the “config” item further indicates an item indicating the type of XML (setting contents are XML description type, setting example is text), and the XML item is decomposed and expanded in the storage means (memory) in the system belonging thereto. And the like (setting content is Java storage bean of Java program name, setting example is createPdfParser.Java) and the like.

rootの他の基本となる「location」項目には設定内容に表示位置情報を設定する。「location」項目に属するtext項目には、属性の項目毎の設定内容として、例えば「項目番号」、「X軸表示位置」、「Y軸表示位置」、「幅」、「高さ」、「フォント」、「文字サイズ」、「揃え位置」、「下線有無」といったレイアウト情報を設定する。   The display position information is set as the setting content in the “location” item which is the other root. For the text item belonging to the “location” item, for example, “item number”, “X-axis display position”, “Y-axis display position”, “width”, “height”, “ Layout information such as “font”, “character size”, “alignment position”, “underline presence / absence” is set.

表示内容CSVには、図5に示されるように1行に1つのPDFに対して出力データを設定する。更に、1行のPDFデータは出力する項目単位でカラムに分割して設定する。表示内容CSVに設定する値については任意の値を設定することが可能である。PDFにデータを出力する際には、CSVのカラム番号に基づいて表示定義XMLの「項目番号」を検索し、位置情報を取得する。   In the display content CSV, output data is set for one PDF per line as shown in FIG. Furthermore, one line of PDF data is set by dividing it into columns for each item to be output. Any value can be set for the value to be set in the display content CSV. When outputting data to the PDF, the “item number” of the display definition XML is searched based on the column number of the CSV, and the position information is acquired.

図6は、PDFテンンプレート104のデータを例示した図である。図6を参照すれば、PDFテンプレート104は、上述したようにレイアウトとして実際に出力されるPDFのサイズ、背景色、枠線を含んでおり、PDFのデータを表示しない代わりに背景や枠線について表示する様子を示している。   FIG. 6 is a diagram illustrating data of the PDF template plate 104. Referring to FIG. 6, the PDF template 104 includes the PDF size, background color, and frame line that are actually output as a layout as described above. It shows how it is displayed.

図7は、設定ファイル106におけるファイル構成形式のデータを例示した図である。図7を参照すれば、設定ファイル106は、上述したようにPDFのデータをファイル化生成するための各ファイルの格納場所(パス)を定義するためのもので、各項目に対する設定内容及び設定例を例示している。   FIG. 7 is a diagram exemplifying data in the file configuration format in the setting file 106. Referring to FIG. 7, the setting file 106 is used to define the storage location (path) of each file for generating PDF data as a file as described above. Is illustrated.

図8は、PDF作成処理部110におけるPDFデータ出力処理部109から出力されるPDFのデータを例示した図である。図8を参照すれば、図6に示した背景の枠線内の所定箇所にPDFのデータが表示された様子を示している。   FIG. 8 is a diagram illustrating PDF data output from the PDF data output processing unit 109 in the PDF creation processing unit 110. Referring to FIG. 8, the PDF data is displayed at a predetermined position within the background frame shown in FIG.

ところで、上述したPDF作成の動作処理上では、各処理中にエラーが発生する場合があり、そうした場合の対応が作業上では重要になる。図9は、図2で説明したPDF作成の動作処理上におけるエラー処理パターンを表形式で例示した図である。   By the way, in the above-described PDF creation operation process, an error may occur during each process, and handling such a case becomes important in work. FIG. 9 is a diagram exemplifying an error processing pattern in the table format on the operation processing of PDF creation described in FIG.

図9を参照してエラー発生時の対応を具体的に説明すれば、ステップS201において、データ取得処理部107で設定ファイル106が読み込めなかった場合(システムが読み込むファイルが指定されたパスに存在しなかった場合)は、その対応として、システムは何も処理することなく動作処理(プログラム)を終了する。   Referring to FIG. 9, the response when an error occurs will be described in detail. In step S201, if the setting file 106 cannot be read by the data acquisition processing unit 107 (the file read by the system exists in the specified path). If not, the system terminates the operation process (program) without performing any processing.

ステップS202において、表示定義XML格納用データベース105から表示定義XMLが読み込めなかった場合は、その対応として、システムは何も処理することなく動作処理(プログラム)を終了する。   In step S202, if the display definition XML cannot be read from the display definition XML storage database 105, the system ends the operation processing (program) without performing any processing as a countermeasure.

ステップS204において、表示内容CSV格納部103から表示内容CSVが読み込めなかった場合は、その対応として、システムは何も処理することなく動作処理(プログラム)を終了する。   In step S204, if the display content CSV cannot be read from the display content CSV storage unit 103, the system ends the operation processing (program) without performing any processing as a countermeasure.

ステップS205において、PDFデータ編集処理部108で表示内容CSVより取得したデータがCSV形式でなかった場合は、その対応として、システムは何も処理することなく動作処理(プログラム)を終了する。   In step S205, if the data acquired from the display content CSV by the PDF data editing processing unit 108 is not in the CSV format, the system ends the operation process (program) without any processing as a response.

ステップS208において、PDFテンプレート104が読み込めなかった場合は、その対応として、システムは何も処理することなく動作処理(プログラム)を終了する。また、ステップS208において、表示項目に対応する表示定義が取得できなかった場合は、その対応して表示項目はPDFには表示しない。ここでは、PDFに表示項目を表示する際、表示項目に対する表示位置が定義されていない場合があるので、そうした場合には、その表示項目をPDFに出力せず、次の表示項目の処理を行う。このような処理を行うことによって、CSVには表示データ以外のデータ(PDFファイル名等)も設定することが可能となっている。   In step S208, if the PDF template 104 cannot be read, the system ends the operation process (program) without performing any process as a countermeasure. If the display definition corresponding to the display item cannot be acquired in step S208, the display item is not displayed on the PDF correspondingly. Here, when a display item is displayed on the PDF, the display position for the display item may not be defined. In such a case, the display item is not output to the PDF and the next display item is processed. . By performing such processing, data other than display data (such as a PDF file name) can be set in the CSV.

その他、ステップS210において、PDFデータ出力処理部109でPDFファイル名が取得できなかった場合は、その対応として、「{1から連番}.pdf」で出力する。また、ステップS210において、既に同一ファイル名のPDFが存在した場合は、その対応として、既存ファイルに上書きで保存する。   In addition, when the PDF file output processing unit 109 cannot acquire the PDF file name in step S210, it outputs “{1 to serial number} .pdf” as the correspondence. In step S210, if a PDF having the same file name already exists, the existing file is overwritten and saved as the correspondence.

尚、上述した実施例1に係るPDF作成システム102では、PDF作成処理部110がデータ取得処理部107、PDFデータ編集処理部108、及びPDFデータ出力処理部109の各部による別体で構成される例を説明したが、これらは部分的又は全体的に一体的に構成することも可能であるので、本願発明のPDF作成システム102は、実施例1で開示した構成のものに限定されない。   In the PDF creation system 102 according to the first embodiment described above, the PDF creation processing unit 110 is configured as a separate unit from the data acquisition processing unit 107, the PDF data editing processing unit 108, and the PDF data output processing unit 109. Although an example has been described, since these can be partially or entirely integrated, the PDF creation system 102 of the present invention is not limited to the one disclosed in the first embodiment.

101 サーバ
102 PDF作成システム
103 表示内容CSV格納部
104 PDFテンプレート
105 表示定義XML格納用データベース
106 設定ファイル
107 データ取得処理部
108 PDFデータ編集処理部
109 PDFデータ出力処理部
110 PDF作成処理部
111 PDFファイル
DESCRIPTION OF SYMBOLS 101 Server 102 PDF creation system 103 Display content CSV storage part 104 PDF template 105 Display definition XML storage database 106 Setting file 107 Data acquisition processing part 108 PDF data edit processing part 109 PDF data output processing part 110 PDF creation processing part 111 PDF file

Claims (4)

サーバ機能によりJavaアプリケーションを利用してPDF(Portable Document Format)を作成するPDF作成システムにおいて、
前記PDFのデータに依存しない固定のレイアウトを設定するためのPDFテンプレートと、前記PDFに表示する表示データを設定するための表示内容CSV(Comma Separated Values)を格納した表示内容CSV格納部と、前記表示データの表示定義を設定するための表示定義XML(Extensible Markup Language)を格納した表示定義XML格納部と、前記表示定義XML格納部から得た前記表示定義XMLに従い、前記表示内容CSV格納部から得た前記表示内容CSVを前記PDFテンプレートから得た前記レイアウトに基づいてデータ編集して前記PDFのデータを作成すると共に、作成された前記PDFのデータを出力するPDG作成処理部と、を備えたことを特徴とするPDF作成システム。
In a PDF creation system that creates a PDF (Portable Document Format) using a Java application with a server function,
A PDF content template for setting a fixed layout independent of the PDF data; a display content CSV storage unit storing display content CSV (Comma Separated Values) for setting display data to be displayed on the PDF; From the display content CSV storage unit according to the display definition XML storage unit storing a display definition XML (Extensible Markup Language) for setting the display definition of display data, and the display definition XML obtained from the display definition XML storage unit The display content CSV obtained is edited based on the layout obtained from the PDF template to create the PDF data, and the PDF creation processing unit that outputs the created PDF data. PDF characterized by Creation system.
請求項1記載のPDF作成システムにおいて、前記PDFテンプレートは、前記レイアウトとして実際に出力される前記PDFのサイズ、背景色、枠線を含んでおり、前記表示内容CSV格納部は、前記表示内容CSVとして前記PDFの1つのデータを1行とすると共に、前記PDFに表示される1項目を1カラムとして前記表示データを設定するもので、前記表示定義XML格納部は、前記表示定義XMLとして少なくとも前記PDFテンプレートへの前記表示内容CSVの表示位置、並びにフォントを前記カラム毎に設定するものであることを特徴とするPDF作成システム。   2. The PDF creation system according to claim 1, wherein the PDF template includes a size, a background color, and a frame line of the PDF actually output as the layout, and the display content CSV storage unit stores the display content CSV. One data of the PDF is set as one row, and the display data is set with one item displayed in the PDF as one column. The display definition XML storage unit includes at least the display definition XML as the display definition XML. A PDF creation system, wherein a display position of the display content CSV on a PDF template and a font are set for each column. 請求項1又は2記載のPDF作成システムにおいて、前記PDFのデータをファイル化生成するための各ファイルの格納場所を定義した設定ファイルを備え、前記PDG作成処理部は、前記設定ファイルの前記格納場所に応じて前記表示定義XML格納部から前記表示定義XMLを取得すると共に、前記表示内容CSV格納部から前記表示内容CSVを取得するデータ取得処理部と、前記データ取得処理部で取得された前記表示定義XMLに従った前記表示内容CSVを前記PDFテンプレートからの前記レイアウトに基づいて前記データ編集を行って前記PDFのデータを作成するPDFデータ編集処理部と、作成された前記PDFのデータに対してファイル名を設定して保存してから出力するPDGデータ出力処理部と、を備えたことを特徴とするPDF作成システム。   3. The PDF creation system according to claim 1, further comprising a setting file that defines a storage location of each file for generating the PDF data as a file, wherein the PDG creation processing unit stores the storage location of the setting file. The display definition XML is acquired from the display definition XML storage unit according to the data, the data acquisition processing unit acquires the display content CSV from the display content CSV storage unit, and the display acquired by the data acquisition processing unit A PDF data editing processing unit that creates the PDF data by editing the display content CSV according to the definition XML based on the layout from the PDF template, and the created PDF data A PDG data output processing unit configured to output after setting and saving a file name PDF creation system that butterflies. 請求項1〜3の何れか1項記載のPDF作成システムにおいて、前記PDFテンプレートの前記レイアウト、前記表示内容CSV格納部の前記表示内容CSV、並びに前記表示定義XML格納部の前記表示定義XMLは、前記PDG作成処理部により作成された前記PDFのデータの出力時における前記PDFの追加又は前記PDFの修正に際して、再作成又は修正可能であることを特徴とするPDF作成システム。   4. The PDF creation system according to claim 1, wherein the layout of the PDF template, the display content CSV of the display content CSV storage unit, and the display definition XML of the display definition XML storage unit are: A PDF creation system, which can be re-created or modified when the PDF is added or the PDF is modified when the PDF data created by the PDF creation processing unit is output.
JP2011163315A 2011-07-26 2011-07-26 PDF creation system Expired - Fee Related JP5753018B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011163315A JP5753018B2 (en) 2011-07-26 2011-07-26 PDF creation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011163315A JP5753018B2 (en) 2011-07-26 2011-07-26 PDF creation system

Publications (2)

Publication Number Publication Date
JP2013025770A true JP2013025770A (en) 2013-02-04
JP5753018B2 JP5753018B2 (en) 2015-07-22

Family

ID=47783998

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011163315A Expired - Fee Related JP5753018B2 (en) 2011-07-26 2011-07-26 PDF creation system

Country Status (1)

Country Link
JP (1) JP5753018B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006268210A (en) * 2005-03-23 2006-10-05 Dainippon Printing Co Ltd Document creation support system, server, program, and recording medium
JP2011013922A (en) * 2009-07-01 2011-01-20 Canon Inc Information processing apparatus, control method, and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006268210A (en) * 2005-03-23 2006-10-05 Dainippon Printing Co Ltd Document creation support system, server, program, and recording medium
JP2011013922A (en) * 2009-07-01 2011-01-20 Canon Inc Information processing apparatus, control method, and program

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CSND200500503002; 中村 真彦: 'WebWorkBench ReportCafe 2.0 柔軟なプログラミングが可能なPDF帳票出力フ' JAVA Developer No.12 第12号, 20030701, p.24-p.25, ソフトバンクパブリッシング株式会社 *
JPN6015006459; 'FIELD NOTES:書を持って街へでかけよう CSVから帳票を生成するツールを作ってみました' [online] [検索日2015.2.13],インターネット, 20110629, 株式会社はてな *
JPN6015006461; 'PDFlib,PDFlib+PDI,PPS A library for generating PDF on the fly Version 8.0.1 チュートリアル' [online] [検索日2015.2.13],インターネット, 20101206, p.38,p.281-p.307, インターネットアーカイブ *
JPN6015006462; 中村 真彦: 'WebWorkBench ReportCafe 2.0 柔軟なプログラミングが可能なPDF帳票出力フ' JAVA Developer No.12 第12号, 20030701, p.24-p.25, ソフトバンクパブリッシング株式会社 *

Also Published As

Publication number Publication date
JP5753018B2 (en) 2015-07-22

Similar Documents

Publication Publication Date Title
CN103778234A (en) Report form generating method and device
JP6417791B2 (en) Application test support apparatus, data processing method thereof, and program
CN111797336A (en) Webpage parsing method and device, electronic equipment and medium
JP4373470B2 (en) Document conversion utilization system
JP7121363B2 (en) Version control method and version control system for large-scale electronic documents
JP5753018B2 (en) PDF creation system
JP4889338B2 (en) Screen program layout changing method, information processing apparatus, program, and recording medium
JP5388881B2 (en) Form input / output device
JP2011204069A (en) Testing method, and automatic test specification and test data generation apparatus
JP6388756B2 (en) Electronic manual output system, electronic manual output method, and electronic manual output program
JP2012118822A (en) Document creation support method, document creation support apparatus and document creation support program
JP2006113803A (en) Document processor and method therefor
JP2008165388A (en) Program update management system, program update management method and computer program
JP2008129844A (en) Stored procedure generation device, method, program, and system
JP5303967B2 (en) Typesetting device, typesetting method, and typesetting processing program
JP6331307B2 (en) Information processing apparatus, information processing apparatus control method, and program
JP4524750B2 (en) Model-driven development device, model-driven development method, and model-driven development program
JP6341259B2 (en) Typesetting device, typesetting program and typesetting method
JP2009104336A (en) Software deliverable management system and its method and program
JP2008165661A (en) Business form output device and business processing apparatus
JP5577662B2 (en) Layout device, layout method, program, and recording medium
JP2023055278A (en) Test support program, test support method, and information processing apparatus
JP5430001B2 (en) Information processing apparatus, information processing method, and program
JP5244370B2 (en) Screen design specification creation method, screen design specification creation program, and screen design specification creation device
JP5413990B2 (en) Manual creation information management device, method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140725

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150324

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150512

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150521

R150 Certificate of patent or registration of utility model

Ref document number: 5753018

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees