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

PPTX to PPT

Participant ,
Dec 15, 2009 Dec 15, 2009

I am having problems converting PPTX files to PDF files with CFPDF. It is doing odd things like adding "Click to edit master slide" text to the slide and what not. CFPDF doesn't seem to have this issue with PPT files.

Is there a way to convert PPTX files to PPT files before using CFPDF to convert them to PDFs? Simply renaming the file with CFFILE doesn't seem to actually change the file to a PPT file.

Thank you

2.0K
Translate
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
Valorous Hero ,
Dec 15, 2009 Dec 15, 2009

I am having problems converting PPTX files to PDF files

with CFPDF. It is doing odd things like adding "Click to

edit master slide" text to the slide and what not. CFPDF

doesn't seem to have this issue with PPT files.

Do you mean using cfdocument and Open Office? According to the documentation only Microsoft PowerPoint from 97 to 2003 are supported. I asked whether 2007 was supported in the cfbug database. But it was never really clarified. My assumption would be "no, not officially". But having said that, Open Office does support most features of PPTX, so most things will probably work, just not everything.

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS9D9ADC95-B37C-4aae-B5D1-84D72FF83BEB.html

Simply renaming the file with CFFILE doesn't seem to actually

change the file to a PPT file.

Correct. They are totally different formats. So renaming would not do it.

Translate
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
Participant ,
Dec 16, 2009 Dec 16, 2009

Thank you very much for the reply and the URL, what a great piece of info to have.

I figured out a way for Open Office to convert the PPTx to PPT (odp actually) but CFPDF doesn't seem to like the ODP file format. Do you know there is something I need to tweak to get CFPDF to work with the Open Office filetype ODP?

Translate
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
Valorous Hero ,
Dec 16, 2009 Dec 16, 2009

I figured out a way for Open Office to convert the PPTx to

PPT (odp actually) but CFPDF doesn't seem to like the ODP

file format. Do you know there is something I need to tweak

to get CFPDF to work with the Open Office filetype ODP?

You keep mentioning cfpdf, I am assuming you mean cfdocument? All cfdocument does is pass the conversion request off to OpenOffice, which performs the actual conversion. So any issues in the conversion are likely caused by OpenOffice itself. ie Something it is not capable of converting.

I have worked much with ODP files. I would suggest you first try converting both the pptx and odp files in OpenOffice directly. If it does not work there, it will not work with cfdocument either.

Translate
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
Participant ,
Dec 16, 2009 Dec 16, 2009

You are correct, I am using CFDocument not CFPDF.

I can open the ODP file in OpenOffice and save it as a PDF without issue. It's when I use the CFDocument tag that I end up with gibberish.

In the link you provided it states that PPT to PDF conversion can Optionally use Open Office. How do I make sure that CFDocument is using Open Office to do the conversion?

Is it possible that my code is not using Open Office for the conversion?

<!--- Use ODFConverter to convert PPTX to PPT/ODP --->

<cfexecute name="path_to_converter\odfconverter.exe"
                  arguments="/I sourceFile.pptx"
                  timeout="100"
                  outputFile="destinationFile.odp">

</cfexecute>

<!--- Try to convert the ODP file to PDF --->

<cfdocument
    format="pdf"
    srcfile="#directory#\sourceFile.odp"
    filename="#directory#\destinationFile.pdf"
    overwrite="yes">    
</cfdocument>

Translate
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
Valorous Hero ,
Dec 16, 2009 Dec 16, 2009

Check the CF Administrator under Server Settings > Document . If the OpenOffice path is correct and populated CF should be using OpenOffice to do the conversion.

As far as the conversion to ODP a) I do not know how reliable that program is and b) Since OpenOffice can do conversion from ODP to PDF I would assume it would work from CfDocument as well. Though it is not listed under the supported conversion formats.

Translate
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
Participant ,
Dec 16, 2009 Dec 16, 2009

The Open Office path is specified in the CFIDE/Administrator. I guess I'll keep plugging away at the code.

I appreciate all the help.

Josh

Translate
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
Valorous Hero ,
Dec 16, 2009 Dec 16, 2009
LATEST

I tried converting an *.odp to *.pdf using cfdocument, but it bombed. Since it is not listed as supported anyway, you may need to use something like the JODConverter. (It uses OpenOffice as well, but can convert *.odp files).

http://cfsearching.blogspot.com/2009/04/coldfusion-in-search-of-wordrtf-to-pdf.html

However, the base problem here is you need a good file to start with. If OpenOffice (or whatever program you are using to convert to *.pptx => *.odp format) does not properly interpret the file you are passing in, the final output will be garbage. At the very least it will be mangled like your original results.

There may be some commercial products that produce better results. But really .. the only program that truly understands the *.pptx format, and how to convert it to other formats, is MS Office.

-Leigh

Translate
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