开发者

Creating RTF and printing as PDF

I'm trying to do the following(in this order):

  1. Create a Rich Text Format file

  2. Add company image to the top of page and write the data to the RTF

  3. Print the RTF file as PDF through CutePDF or other printer that are able to convert my RTF to a PDF and thereby save locally on the users PC - The pdf should be saved at a location without prompting the user

  4. After this is done, the RTF file should be deleted and return a message, that confirms the action is successfully done.

Other stuff:

The website where these actions take place, are not meant to host the outcome(the PDFs) but these are supposed to be saved on the users PC. (is this possible without prompting the user to save it? i imagine the website would write directly to the users PC instead of doing the work on the website and save it and then transfer the file to the PC)

OBS: i do not wish to use any 3th party program/DLL other then the converter like cutePDF :)

My question is quite simple i hope :)

Will this 开发者_运维问答work?


No. You can send the PDF back to the user but the user will either be prompted to download the file or it will open automatically (depending on the user's configuration and the response headers you're sending). Without using some sort of plugin you can't save any files directly to the user's computer.

If it was possible to write a file directly to the user's the world as we know it would have ceased to exist. Cities would lie in ruin as idle youtube commentators roamed the streets in violent gangs yelling "FIRST" and engaging in brutal and pointless gang wars. A generation of youth superbly trained by video games would manage to destroy civilization in a matter of days. Fortunately civilization would eventually be rebuilt by Minecraft players but it would take time.

If that functionality is really vital I would suggest looking at a plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜