Save the screen shot as a .pdf format

Hi,

I have tried to save my unity scene as a pdf format, i can export the image as a pdf, but i cannot able to open that file. I dont know what the issue in this, i have tried to open that file in another system too but there also it didn’t open.

Please help me to solve this issue.

I have used this code:

if(GUI.Button(Rect(200,100, 50,50), "Print")){
      Application.CaptureScreenshot("Screenshot.pdf");
}

Thanks.

is there any chance to do this…?

I won’t be able to answer your question, but I can tell you that you’re going about it the wrong way. Application.CaptureScreenShot can only save PNG files.

so, Is there any other way to do this function ?

There is no Unity function I know of to take a screenshot as a PDF, however I’m sure there are libraries/examples out there which will convert the PNG image into PDF.

as i already said it : Application.CaptureScreenshot

allow to get only image format .not a pdf .

using the libraries function can we convert the image to pdf at runtime?

Not with the built in libraries, but you might want to check the asset store to see if you can buy something.

i got this link. Here there is one image to pdf converter available i dont know how much its useful check this whether we can use this script inside our unity.

http://www.codeproject.com/Articles/28609/Converting-Image-Files-to-PDF

Thank you all for giving guide on save screen shot as PDF. I also thought to save screen shoot as images such as JPEG and then convert image to PDF. Upper resource is of great help.
Besides, I’m also looking for some control that can save webpages as PDF directly. Hope someone can give ideas on it. Thanks!

unity is not for application mainly , it a game engine , people treat their weekness using any sort of application with the same technologies “unity”, nest time you will find someone asking how build a website with unity 3d !!! this is crazy sorry .

I don’t see how this is crazy. Unity grew beyond being just a game engine into data visualization and other fields. Asking for a PDF export is not as crazy as you might think.

3 Likes

Agreed. It’s useful to convert your documentation in-game into an instruction PDF manual.

2 Likes