Hello everyone. Some time ago I found myself having to send data via email to the stage of a game. the difficulty was to build a layout graphically pretty, so I started researching how to create code from a pdf document. On the web I found a C # library which I used sharp Pdf changing some parts to create these APIs. the only thing that was not possible to do since I use mac was to create dynamically un0immagine, I have circumvented this problem by replacing all free System.Drawing with those of Unity. I hope that it will be useful. http://www.francescogallorini.com/2011/02/unity-sharp-pdf/
Hi. Thanks a lot for this resource. When I tried to use your package at first I got but it was remedied when I placed the provided pictures (picture1 and picture2) in the Project folder. Perhaps you could suggest some package that parses pdf data, for rendering pdf's ?
Hi! I am using SharpPDF to runtime PDF generation. I'm using it on Windows. I found two problems: I need to put an scaled image on a page. I'm using addImage. It doesn't scale the image but it cuts the image starting from upper-left corner with the size I would like to scale it to. How can I solve this? In MAC doesn't happen that. I have a problem adding images to a PDF file with WINDOWS. The PDF doesnt show the images well (they are grated) when I open it with ADOBE READER. But, if I open it with another pdf reader, the images are well. How can I solve this problem? On the contrary, if I use SharpPDF in MAC, this problem doesnt exist, I need to use it on Windows. I have post both questions in the page of the lib inside SourceForge but I didn't get any answer. Could anybody help me with this please?
And I got it fixed. The issue is that sharpPDF interprets the stream wrong. Grating (slanted or missing lines) is because the code doesn't know when to start a new image line properly. Say the image is 192 pixels wide but the code thinks it's 190 pixels wide. Fiddling with your image sizes or with the code will help you solve that!
Hello ringhino, I am using the sharp pdf the one which u had recommended and i am facing difficulties like: 1. How to dynamically increase the column height according to the text size at runtime. 2. How do i insert an image without using the co-routine function. 3. How to dynamically write the data on the new page if current page is filled and data is still pending. For example, there are 50 rows in my table at runtime and one first page 30rows occupy the space, then how do i dynamically write the remaining 20 rows on second page. 4. Instead of storing the file in root folder, in assets folder , how can i store the pdf at different location by selecting the folder from the system. If you or anyone can help me out with these questions with would be a great help for me... Thank you.
Hello together, very old thread but still a topic no one seems to solve now. I wanted to create and export a pdf from my Unity Build on iOS. Is there a good solution for that? Thanks & Regards
Hi, I am trying to do the same on windows. but i am not able to get the output. when i run the scene it is showing the null reference exception. NullReferenceException: Object reference not set to an instance of an object sharpPDF.pdfPage+<newAddImage>c__Iterator0.MoveNext () (at Assets/plugins/sharpPDF Plugins/pdfPage.cs:144) UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17) did anybody got the user manual or some guide for implementation.
To generate PDF file in C# try ZET-Pdf for better results. It is really helpful in generating PDF files.