It is currently Sun Dec 15, 2019 2:53 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: VecVi - Create and output documents using VectorDrawing lib
PostPosted: Tue Dec 19, 2017 8:13 pm 
Offline
User
User
User avatar

Joined: Sun Mar 22, 2009 2:53 pm
Posts: 54
Location: GER, Saxony
Hi,

I've written this for another project where I needed a print preview and some advances features for creating
documents (and later print them or save them to pdf) like automatic page breaks, headers, footers etc.

Main features:
  • creating a document once and later output it to CanvasGadet, Window, Image, printer, pdf (not windows) or svg (only Linux)
  • text and image cells with custom border, filling, text alignment, font etc.
  • horizontal, vertical and free lines
  • rectangles, curves, ellipses and ellipse segments
  • auto-invoked headers and footers, for the whole document or for a single page
  • auto page breaks
  • avoiding page breaks within connected element blocks
  • auto page numbers with free start value, excluding of pages from numbering, total number of pages etc.
  • possibility to display the document as single pages or as a list of pages (for print preview, see example code)

It's still work in progress and not tested in all cases, but I think I'ts already useable.

code: https://raw.githubusercontent.com/hgzh/ ... r/VecVi.pb
example: https://raw.githubusercontent.com/hgzh/ ... preview.pb

Image

_________________
Win10 x64 | PB 5.70


Top
 Profile  
Reply with quote  
 Post subject: Re: VecVi - Create and output documents using VectorDrawing
PostPosted: Wed Dec 20, 2017 4:36 am 
Offline
Addict
Addict

Joined: Fri Aug 28, 2015 6:10 pm
Posts: 1046
Location: Portugal
Nice work.

Did you try

http://www.purebasic.fr/english/viewtopic.php?f=12&t=67703

The purePDF module on the forum can also be used to create PDF documents on windows systems.

Regards

CD

_________________
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.


Top
 Profile  
Reply with quote  
 Post subject: Re: VecVi - Create and output documents using VectorDrawing
PostPosted: Thu Dec 21, 2017 6:05 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4548
Location: Lyon - France
Thanks a lot for sharing this great code 8)
Works fine here W7 x86 / V5.61 x86

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: VecVi - Create and output documents using VectorDrawing
PostPosted: Sat Dec 23, 2017 12:02 am 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1704
Location: Germany (Saxony, Deutscheinsiedel)
Very interesting! Runs fine here on Win10, thank you :D

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: VecVi - Create and output documents using VectorDrawing
PostPosted: Fri Feb 01, 2019 6:22 pm 
Offline
User
User
User avatar

Joined: Sun Mar 22, 2009 2:53 pm
Posts: 54
Location: GER, Saxony
After a long time, I uploaded a new version with some smaller bug fixes and
a new output channel (image on canvas) to improve performance.

I've also written a fork of VecVi that uses PurePDF to create pdf files on windows,
if someone is interested in this, I can publish it, too.

_________________
Win10 x64 | PB 5.70


Top
 Profile  
Reply with quote  
 Post subject: Re: VecVi - Create and output documents using VectorDrawing
PostPosted: Fri Feb 01, 2019 7:20 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3153
Location: Boston, MA
This has potential as a Report Generator. 8)
Not sure why pdf would not work on Windows?
This version does not have a save to pdf option?
v.1.06 (2019-01-31)

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: VecVi - Create and output documents using VectorDrawing
PostPosted: Sat Feb 02, 2019 7:41 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Sep 17, 2015 3:39 pm
Posts: 147
very good project, thank you for sharing :D
 

_________________
interested in Cybersecurity..


Top
 Profile  
Reply with quote  
 Post subject: Re: VecVi - Create and output documents using VectorDrawing
PostPosted: Sat Feb 02, 2019 8:21 pm 
Offline
User
User
User avatar

Joined: Sun Mar 22, 2009 2:53 pm
Posts: 54
Location: GER, Saxony
skywalk wrote:
Not sure why pdf would not work on Windows?


I use PB's PdfVectorOutput() which is not supported on Windows. On Linux and MacOS,
you can use VecVi::OutputPDF(). For PDF output on Windows, there is the fork with
PurePDF usage mentioned in my previous post.

_________________
Win10 x64 | PB 5.70


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye