• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ColdFusionを用いた、PDF統合方法について

New Here ,
May 14, 2024 May 14, 2024

Copy link to clipboard

Copied

ColdFusionを用いてPDF統合の検証中ですが、うまくいきません。

複数ファイル(拡張子:xls,xlsx,docx,txt,pdf)を1つのPDFファイルに統合し表示したい(PDFポートフォリオを作成、表示したい)のですが、一部ファイルがプレビュー表示されません。

 

表示する端末によっても挙動が変わってしまうのですが、TXT,PDF形式のファイルはプレビュー閲覧できています。

Excel、Wordのプレビュー閲覧ができず、「文書を開く」を押下することで作成元のアプリケーションが立ち上がり、別ウィンドウでの展開はできる状況です。

 

検証中のソースではcfpdfタグを使用し、以下設定しています。

action="merge"

package="yes"

overwrite="yes"

 

PDFポートフォリオの作成方法の変更で端末に依存せず、全ファイルのプレビュー表示ができるでしょうか。

それとも、特定のAdobe Readerでしか表示できない等、制約があるでしょうか。

Views

208

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 14, 2024 May 14, 2024

Copy link to clipboard

Copied

@a_n_ , Before we proceed, please confirm that the following Google translation of your message is correct:

 

"I'm testing PDF integration using ColdFusion, but it's not working.

I would like to combine and display multiple files (extensions: xls, xlsx, docx, txt, pdf) into one PDF file (create and display a PDF portfolio), but some files are not displayed in preview.

 

The behavior changes depending on the device used to display it, but files in TXT and PDF formats can be previewed.

It is not possible to preview Excel or Word, but clicking "Open document" launches the original application and opens the document in a separate window.

 

The source being verified uses the cfpdf tag and has the following settings.

action="merge"

package="yes"

overwrite="yes"

 

Is it possible to preview all files without depending on the device by changing the way PDF portfolios are created?

Or are there any restrictions, such as the fact that it can only be viewed with a specific Adobe Reader?"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 14, 2024 May 14, 2024

Copy link to clipboard

Copied

翻訳ありがとうございます。正しい翻訳です。

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 19, 2024 May 19, 2024

Copy link to clipboard

Copied

@a_n_ , as far as I know, you cannot use cfpdf to merge xls, xlsx, docx, txt files. You can only use it to merge PDF files.

 

So, my suggestion to you is as follows:

  1.  Find a way to convert each of the xls, xlsx, docx, txt files to PDF. Google will tell help you here. 
    Let us assume that the respective PDF conversions are xsldoc.pdf, xlsxdoc.pdf, docxdoc.pdf and txtdoc.pdf. Let us further assume that your current pdf file is doc.pdf.
  2.  Use cfpdf to merge the PDF files xsldoc.pdf, xlsxdoc.pdf, docxdoc.pdf, txtdoc.pdf. and doc.pdf.
    I shall now give you an example on my Windows 10 system.
    To test, I placed the 5 PDF files xsldoc.pdf, xlsxdoc.pdf, docxdoc.pdf, txtdoc.pdf. and doc.pdf in the directory pdfTest on my desktop.

    I then ran the following code as a CFM page:

    <cfpdf action = "merge"
    	directory = "C:\Users\BKBK\Desktop\pdfTest"
        destination = "C:\Users\BKBK\Desktop\pdfTest\merged.pdf"
        ascending = "yes"
        keepBookmark = "yes"
        overwrite = "yes">
       
    Finished merging
    

    Result:
    ColdFusion merged the 5 PDF files into one single file, merged.pdf, and stored in in the same directory (pdfTest).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 19, 2024 May 19, 2024

Copy link to clipboard

Copied

こんにちは、@a_n_ 、

私の知る限りでは、xls、xlsx、docx、txtファイルのマージにcfpdfを使うことはできません。PDFファイルのマージにしか使えません。

 

というわけで、私からの提案は以下の通りです:

xls、xlsx、docx、txtファイルをそれぞれPDFに変換する方法を見つけてください。Googleが助けてくれるでしょう。
ここでは、それぞれのPDF変換をxsldoc.pdf、xlsxdoc.pdf、docxdoc.pdf、txtdoc.pdfとします。さらに、現在のPDFファイルがdoc.pdfであるとします。
cfpdfを使って、xsldoc.pdf、xlsxdoc.pdf、docxdoc.pdf、txtdoc.pdf、doc.pdfのPDFファイルをマージします。
私のWindows 10システムでの例をお見せしよう。
テストするために、5つのPDFファイルxsldoc.pdf、xlsxdoc.pdf、docxdoc.pdf、txtdoc.pdf、doc.pdfをデスクトップ上のpdfTestディレクトリに置きました。

そして、以下のコードをCFMページとして実行しました:

<cfpdf action = "merge"
	directory = "C:\Users\BKBK\Desktop\pdfTest"
    destination = "C:\Users\BKBK\Desktop\pdfTest\merged.pdf"
    ascending = "yes"
    keepBookmark = "yes"
    overwrite = "yes">
   
Finished merging

結果:
ColdFusionは5つのPDFファイルを1つのファイルmerged.pdfにマージし、同じディレクトリ(pdfTest)に格納しました。

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 23, 2024 Jun 23, 2024

Copy link to clipboard

Copied

LATEST

Was that helpful?

 

役に立ちましたか?

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation