Search Unity

Save the screen shot as a .pdf format

Discussion in 'Scripting' started by schetty, May 21, 2013.

  1. schetty

    schetty

    Joined:
    Jul 23, 2012
    Posts:
    424
    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:
    Code (csharp):
    1. if(GUI.Button(Rect(200,100, 50,50), "Print")){
    2.       Application.CaptureScreenshot("Screenshot.pdf");
    3. }
    Thanks.
     
  2. schetty

    schetty

    Joined:
    Jul 23, 2012
    Posts:
    424
    is there any chance to do this...?
     
  3. DanielQuick

    DanielQuick

    Joined:
    Dec 31, 2010
    Posts:
    3,137
    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.

     
  4. schetty

    schetty

    Joined:
    Jul 23, 2012
    Posts:
    424
    so, Is there any other way to do this function ?
     
  5. DanielQuick

    DanielQuick

    Joined:
    Dec 31, 2010
    Posts:
    3,137
    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.
     
  6. UNITY3D_TEAM

    UNITY3D_TEAM

    Joined:
    Apr 23, 2012
    Posts:
    720
    as i already said it : Application.CaptureScreenshot

    allow to get only image format .not a pdf .
     
  7. schetty

    schetty

    Joined:
    Jul 23, 2012
    Posts:
    424
    using the libraries function can we convert the image to pdf at runtime?
     
  8. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,250
    Not with the built in libraries, but you might want to check the asset store to see if you can buy something.
     
  9. schetty

    schetty

    Joined:
    Jul 23, 2012
    Posts:
    424
    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
     
  10. fenden

    fenden

    Joined:
    Dec 22, 2014
    Posts:
    8
    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!
     
  11. deepportion

    deepportion

    Joined:
    Jul 7, 2017
    Posts:
    6
    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 .
     
  12. Alosh

    Alosh

    Joined:
    Jul 9, 2012
    Posts:
    5
    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.
     
  13. gabearts

    gabearts

    Joined:
    Jun 30, 2014
    Posts:
    10
    Agreed. It's useful to convert your documentation in-game into an instruction PDF manual.
     
    YousifRagab and Monsterwald like this.