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

Can i save pdf in a folder...How?...Please help.

Explorer ,
May 12, 2008 May 12, 2008
Friends,

I am trying to create pdf file and save in a folder. So i can email pdf using cfmailparam.

<cfset filevar=#emp_no#&"_"&#dateformat(now(),'mm/dd/yyyy')#>
<cfdocument format="pdf" srcfile="#pdfpath#" filename="#filevar#" overwrite="yes">

i am getting an error...

same code...i created pdf using<cfdocument></cfdocument>...works fine...

but when i change to this...<cfdocument format="pdf" srcfile="#pdfpath#" filename="#filevar#" overwrite="yes">

code is throwing an error...
An exception occurred when performing document processing. The system cannot find the path specified.

Please help me....
1.3K
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

correct answers 1 Correct answer

LEGEND , May 12, 2008 May 12, 2008
Your filename attribute needs the path to the file as well as it's name.
Translate
LEGEND ,
May 12, 2008 May 12, 2008
you can't have / in a filename.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
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
Explorer ,
May 12, 2008 May 12, 2008
Thanks Azadi. Changed the code..

cfset filevar=#emp_no#&"_"&#dateformat(now(),'mm_dd_yyyy')#>
<cfdocument format="pdf" srcfile="#pdfpath#" filename="#filevar#" overwrite="yes">

Now code is running without any error.

but pdf file is not created and saved in the folder...why?.

Do i need more attribute for this?.
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
LEGEND ,
May 12, 2008 May 12, 2008
Are you sure you are looking in right folder? Try looking in the same folder as the template containing your code.
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
Explorer ,
May 12, 2008 May 12, 2008
thanks Dan,

i am confused.

I am creating a pdf and trying to save to a folder.

Please post correct code syntax.

thanks for ur help
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
LEGEND ,
May 12, 2008 May 12, 2008
Your filename attribute needs the path to the file as well as it's name.
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
Explorer ,
May 13, 2008 May 13, 2008
LATEST
thanks Dan..worked fine

u r so sweet.
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