Woutero Posted April 17 Share Posted April 17 Hi Sherzod Can you or anyone else recommend a PDF library/component that works well with UniGUI? I would like to export some graphs from a UniChart to a pdf. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted April 17 Share Posted April 17 41 minutes ago, Woutero said: Hi Sherzod Can you or anyone else recommend a PDF library/component that works well with UniGUI? I would like to export some graphs from a UniChart to a pdf. Hi, why dont use just print to Windows PDF printer and show saved (printed) document to user? https://stackoverflow.com/questions/25371291/print-a-string-directly-to-printer https://www.delphibasics.co.uk/Article.php?Name=Printing https://www.google.com/search?q=delphi+print+to+printer&oq=delphi+print+to+printer&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIICAEQABgWGB7SAQg1Njg4ajBqN6gCALACAA&sourceid=chrome&ie=UTF-8 Quote Link to comment Share on other sites More sharing options...
Woutero Posted April 17 Author Share Posted April 17 Thanks for the tip Irigsoft! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 17 Share Posted April 17 3 hours ago, Woutero said: Can you or anyone else recommend a PDF library/component that works well with UniGUI? I would like to export some graphs from a UniChart to a pdf. Hello, I used this solution to generate, print pdf: http://pdfmake.org/#/ Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 17 Share Posted April 17 Quote Link to comment Share on other sites More sharing options...
Woutero Posted April 17 Author Share Posted April 17 Thank you Sherzod! Quote Link to comment Share on other sites More sharing options...
Woutero Posted April 17 Author Share Posted April 17 3 hours ago, irigsoft said: Hi, why dont use just print to Windows PDF printer and show saved (printed) document to user? https://stackoverflow.com/questions/25371291/print-a-string-directly-to-printer https://www.delphibasics.co.uk/Article.php?Name=Printing https://www.google.com/search?q=delphi+print+to+printer&oq=delphi+print+to+printer&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIICAEQABgWGB7SAQg1Njg4ajBqN6gCALACAA&sourceid=chrome&ie=UTF-8 Irigsoft So when one select, Print to PDF via the Delphi PrintDialog (see below), where is the PDF file saved? Or rather, how can I set the folder where the PDF is saved? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted April 17 Share Posted April 17 40 minutes ago, Woutero said: Irigsoft So when one select, Print to PDF via the Delphi PrintDialog (see below), where is the PDF file saved? Or rather, how can I set the folder where the PDF is saved? Hi, I give you example how to do it with delphi, but you can find more examples and try to print directly without PrintDialog (because dialog shown on server side and can't be usefull) @Woutero, here is some kind of examples: https://forum.lazarus.freepascal.org/index.php?topic=47640.0 Printer.SetPrinter('Microsoft Print To PDF'); Printer.Copies:=1; // PrintDialog1.PrintToFile:=true; // Printer.FileName:=suggestFileName()+'.pdf'; doPrint(); "For me your code is working. Please see attached demo. It checks whether the "Microsoft print to PDF" printer is available, selects it and sets the filename by setting the FileName property. (When the printer is not found it opens the PrintDialog)." https://forum.lazarus.freepascal.org/index.php?PHPSESSID=lhgjmk83bcjm7trnihen5tbt77&action=dlattach;topic=47640.0;attach=34509 Quote Link to comment Share on other sites More sharing options...
Woutero Posted April 17 Author Share Posted April 17 Thanks so much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.