Chart in PDF-file ?

Discussion in 'Android Questions' started by Paulsche, Sep 14, 2012.

  1. Paulsche

    Paulsche Well-Known Member Licensed User

    first question:
    I just create with pdfwriter library multiple report output as a PDF file,
    It is also possible the chart graphics output to a PDF file?

    second question:
    can be values ​​from a table in the PDF file format right justified?
     
    Last edited: Sep 14, 2012
  2. Paulsche

    Paulsche Well-Known Member Licensed User

    Chart as Bitmap then in PDF-File ?

    Is there a way to save the chart as a bitmap graphic,
    Bitmap I can save to a PDF file.
    Maybe in the code above is a screenshot of the area of the chart would be possible?
     
  3. hdtvirl

    hdtvirl Active Member Licensed User

    You can save a canvas to a bit map using the following code , I have no idea how the PDF library works so I cannot say if you can write a bitmap directly to it. I only use png format.

    Dim Out As OutputStream
    Out = File.OpenOutput(File.DirDefaultExternal, "FileName.png",False)
    CanvasName.Bitmap.WriteToStream(Out,100,"PNG")
    Out.Close

    CanvasName = your canvas name
    FileName.png = what ever file name you want to give it.
    Out = stream to write out
    100 = 100% quality
    PNG = format you want to save in.


    Hope this helps

    Regards

    BOB
     
  4. klaus

    klaus Expert Licensed User

    Yes you can.
    Attached an example program it's a combination of the LineCharts1 program of the User's Guide and a small test program from Matthias (for special characters like öäéü) in the german forum.

    Best regards.
     

    Attached Files:

  5. hdtvirl

    hdtvirl Active Member Licensed User

    Klaus, as always you have the answer.




    Regards


    BOB
     
  6. Paulsche

    Paulsche Well-Known Member Licensed User

    Thanks Klaus, works fine !


    Danke Klaus, funktioniert bestens ! :sign0098:
     
  7. JOTHA

    JOTHA Well-Known Member Licensed User

    Hallo Klaus, hat Matthias das Problem mit den Umlauten irgendwie gelöst?
    Das zweite Problem beim PDFWriter ist, das man keine Zeilenumbrüche (Wrap) machen kann ...
     
  8. klaus

    klaus Expert Licensed User

    Für die Umlaute siehe hier.
    Für das zweite Problem habe Ich keine Ahnung.
    Wird das nicht automatisch durch Seitenbreite gemacht ?
     
  9. JOTHA

    JOTHA Well-Known Member Licensed User

    ... leider nicht. Wenn das mit dem Zeilenumbruch gelöst wäre, dann wäre es perfekt!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice