gPDF - is alive once again

After a hiatus from this project for quite some time, and the prodding of a few members of this forum, I decided to try and solve the annoying issue with gPDF that forced me to take if offline originally. Well the good news is, I have :slight_smile:

gPDF is a Xojo custom class that allows you to produce PDF documents using the CANVAS/GRAPHICS syntax you already know. It supports most all the Xojo graphics commands (except for PixMapshape), along with a few new commands to support the PDF requirements.

Right now, it works for OSX/macOS (Cocoa only), and for Windows 7/10. I tried it as a console app, and while it did in fact produce a viable PDF, the sizes and coordinates were off, this is an issue I will continue to pursue. I do not know if it works under Linux or not (it should, but I have no way to test it)

There is a demo that contains an encrypted version of the class available form the gPDF webpage (below). It produces 3 different PDF files each one excersizing a different set of commands. The code that drives the test cases is not encyrpted, and you can examine, or change it to see if this class might fill a need in your project work. The only restriction in the demo is that it watermarks each page.

This class is not (nor was it intended to be) as robust as something like DynaPDF… what it was/is intended for is to create simple to medium complex PDF files using the simple graphics command syntax you have already been using.

the gPDF homepage is : www.rdS.com/gpdf

There you will find a link to the online documentation, as well as a download for the demo project in a standard ZIP file
The purchase buttons are currently disabled. I want to wait and see if any of you have any feedback that might prompt a tweek or two first.

Nice to see you nailed it Dave! Kudos :slight_smile:
I’m in need to create PDF documents later this year in a WE project(aka console). I’ll see what progress you’ve done regarding console support then and evaluate!

Great work!

Congratulations, Dave. I am sure gPDF will fill a much needed place in Xojo third party tools.

VirtualBox is free, works nicely with OS X, and it supports Linux Mint, which is IMO the best Ubuntu based distribution for Xojo.

Problem is I don’t have a clue what it takes to install Linux… I installed a BSD version years ago, and got lost in trying to get a GUI interface… So if someone else wants to vet gPDF for Linux, thats fine… What I have read here about Linux, there are dozens of versions some work, some don’t, some people like this on, others like that one…

So by “no way to test it”… I meant more, I don’t know “how”, and this one app isn’t incentive enough to invest days or weeks just trying to get a platform, and then being unable to tell if issues are my class, or an improper/incompatible environment.

Albin… I don’t do “Xojo for Web”, so even if I make it work for a “Console App”, I’m not sure that would mean it would work for a “Web” app as well??? But that may be my lack of understanding… And if you are interested… I can send you a eval copy with the platform pragmas removed… This way you can at least see if it creates a PDF (and I can see if it creates it with the same “wrong” metrics)

A WE app is basically a console app if I have understood correctly :slight_smile:
A WebApplication inherits from ServiceApplication that inherits from ConsoleApplication.
Anyone should correct me if I’m wrong here.

Dave - To get a VM installed just try just about any of the available tools and you’ll find that installing a VM is not hard
Installing from a DVD to a real machine is similarly not much harder especially if its a “live cd” which can be booted

For a VM

  1. Get a tool like Virtual Box, Parallels, VMWare for your OS
    I use Parallels so instructions are specific to installing there

  2. Then go download an ISO from one of the distributions (Ubuntu, Centos, Mint etc)
    Ubuntu - https://www.ubuntu.com/download/desktop/contribute?version=16.04.1&architecture=amd64
    Centos - http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1511.iso
    Mint - https://www.linuxmint.com/edition.php?id=218

  3. At this point start whatever tool you grabbed in step 1

  4. most have an “install from ISO” - so select the ISO you downloaded

  5. you can also select where to save the disk files for you installed version

  6. patiently wait while the ISO is installed - you may have to answer a few prompts to create a user, etc

And getting off topic now (sorry Dave), but just a general reminder that Microsoft have free time-limited VMs available at https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/. Very useful.

[quote=293074:@Albin Kiland]A WE app is basically a console app if I have understood correctly :slight_smile:
A WebApplication inherits from ServiceApplication that inherits from ConsoleApplication.
Anyone should correct me if I’m wrong here.[/quote]

When the Console version comes along, it should indeed be theoretically possible to use it for Web.

Ok… I just

  • Installed Virtual Box on my OSX machine
  • Downloaded the Mint ISO from the link Norman provided
  • When I started VBox it asked what OS I wanted so I told it 32bit Linux (other)
  • and this display appeared immediately

  • I click on the Linux line on the right and a “terminal like” window appears with this message

[quote]This kernel requires the following features not present on the CPU:
pae
Unable to boot - please use a kernel appropriate for your CPU
[/quote]

after searching… it turns out you have to set a flag in VBox to not expect PAE…
so as of right now I “think” its loading… I have a black screen showing :slight_smile: and the NAT indicator is flashing

No idea
I dont use Virtual Box so cant even being to help you

One thing is you WILL want to reconfigure the emulated hardware to have a LOT more than 256 Mb ram and probably more than 256 mg graphics vram

I run my Parallels VMS with 4Gb RAM and at least 512 mb graphics vram

this doesn’t seem right… the screen has been black for like 10 min…
VBox only allows up to 128mg for video…

guess before it didn’t like the RAM setting… cuz now it actually did something! Thanks

128 ?
I think you’ll find you’ll hate it being that low

Its one reason I bought Parallels way back when & update it once a year or so
It does a pretty decent job running with all kinds of configs

well 128 is the max it allows… Don’t have the $$ to buy Parallels every time a new macOS comes out… plus the last time I DID buy it… it trashed the entire VM …

Am downloading Xojo for Linux now… (FYI… Mint is WAY different than the BSD I played with a while back :slight_smile: )

Only problem I have is a message that indicates I am running is “software rendering mode” for the display. I have read a bunch of web posts, but they are written by Linux geeks so I have no idea what they are saying… but that also will most likely contribute to a less than optimal experience :slight_smile:

Don’t worry about the software rendering mode stuff. It works just fine. You are not going to play games under Linux anyway.

JUST FYI
Its likely to be a lot slower than the VM emulating a low end graphics card with 256mb or more VRAM

Virtualbox allows 256Mb for video ram, certainly on OSX anyway. You have to tick the graphic options as shown, then the video ram sliders adjust to allow up to 256 :

Yes… I have that exact same box… and it STOPS at 128meg [and it balks if I attempt to choose 2D video acc.]
perhaps it has different limits depending on the client OS?

[quote=293138:@Dave S]Yes… I have that exact same box… and it STOPS at 128meg [and it balks if I attempt to choose 2D video acc.]
perhaps it has different limits depending on the client OS?[/quote]

Possibly yes. I have not tried Linux for some time.

Mayhaps it limits it depending on the available VRAM like Photoshop does.