It is currently Wed Sep 18, 2019 2:43 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Thu Feb 21, 2019 3:42 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 891
Location: Germany
Version 2.0

I completely changed the internal structure of the module and adapted it to the structure of PDF documents (individual objects). Instead of taking the detour through countless LinkedLists, (most) data is now written directly into the objects.
The sourcecode has not only become more logical, easier to understand and clearer, but can now also be extended much more easily.

New:
  • Support of form fields (e.g. text field, checkbox, radio button & combo box)
  • AddGotoLabel() for navigation in the PDF document. (e.g. jump from the command overview via link to the corresponding page)

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Thu Feb 21, 2019 4:29 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 31, 2005 11:09 pm
Posts: 3694
Location: Italy
Interesting, thanks for sharing it.

_________________
[ My little PureBasic review ]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Sat Mar 16, 2019 5:57 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Aug 03, 2011 4:52 am
Posts: 215
Location: Beirut, Lebanon
thanks for sharing, really useful
I tried to put some arabic characters, it's got transformed to ??????, unicode isn't supported?

_________________
PureBasic: Surprisingly simple, diabolically powerful


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Sat Mar 16, 2019 6:57 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 891
Location: Germany
At the moment only Unicode characters up to 65536 are supported. Accessing characters above 65536 is very complicated.

Gesendet von meinem BAH2-W19 mit Tapatalk

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Mon Mar 25, 2019 10:52 am 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 4308
Location: Germany
Hi,

I just tested your module for the first time and ... failed.

Because I always use #PB_Any for creations. (PDF = PDF::Create(#PB_Any))
I don't know exactly why it fails, but the document is empty when I use this.
Maybe it is not allowed to use 0 as ID. And when I use the code above PDF is 0.

Here is my small addition to your code:
Code:
  Procedure.i Create(ID.i, Orientation.s="P", Unit.s="", Format.s="")  ; [*]
    Define objRes.i, Result.i
   
    If ID = #PB_Any
      Repeat
        ID = Random(99999, 1000)
      Until Not FindMapElement(PDF(), Str(ID))
    EndIf

With this small addition and ID as return value (or 0 if AddMapElement() fail) I'm able to use my normal coding style.

And thanks for your many coding stuff during the last months.

Bernd


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Mon Mar 25, 2019 1:26 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 891
Location: Germany
You can add following code after 'Define ....'.
Code:
If ID = #PB_Any : ID = MapSize(PDF()) + 1 : EndIf

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Mon Mar 25, 2019 1:42 pm 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 4308
Location: Germany
Yes, of course.
But in my version, like in PB, the lower numbers are still free for 'normal' use :mrgreen:


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Mon Mar 25, 2019 4:41 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 891
Location: Germany
infratec wrote:
Yes, of course.
But in my version, like in PB, the lower numbers are still free for 'normal' use :mrgreen:


They are not gadget numbers and the numbers are used exclusively for pbPDF.

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Mon Mar 25, 2019 4:46 pm 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 4308
Location: Germany
A file is also no gadget.
But if you not want to include it: simply write 'I don't want to do this in my code'


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Mon Mar 25, 2019 10:01 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 891
Location: Germany
infratec wrote:
A file is also no gadget.
But if you not want to include it: simply write 'I don't want to do this in my code'

No, I just meant that pbPDF doesn't use gadget numbers or file numbers and you don't have to care about it.

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Tue Mar 26, 2019 8:20 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 891
Location: Germany
Added: #PB_Any
Code:
If ID = #PB_Any
  ID = 1 : While FindMapElement(PDF(), Str(ID)) : ID + 1 : Wend
EndIf

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Thu Mar 28, 2019 5:25 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 14, 2014 12:09 pm
Posts: 233
Hi all,
Can someo one know how to generate PDF/X-3 with this excelent programm or with Gs (ghostscript) ?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Thu Jun 20, 2019 11:29 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 891
Location: Germany
Bugfix: Embed PNG images

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Tue Jun 25, 2019 7:19 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 891
Location: Germany
Bugfix: AutoPageBreak

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] pbPDF-Module
PostPosted: Thu Jun 27, 2019 8:05 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 891
Location: Germany
Update:
  • Bugfix: Preferences for footer (AutoPageBreak)
  • Bugfix: AddPage (Fonts)

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules (GitHub)

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 26 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