Re: Updating a structure - data goes AWOL

2018-06-14 Thread Chuck Miller via 4D_Tech
How about using sql to bring data from old database into new one 

Regards

Chuck

Sent from my iPhone

> On Jun 14, 2018, at 8:36 PM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I'm updating a client's database from an old version of my app, in 4D v12,
> to the latest version, using v16. There have been various modifications to
> the structure in between the version they are using and the current
> version. Tables have been added, deleted, repurposed. The result is that
> when the database is opened in the v16 version, some of the tables are lost.
> 
> I figured out that I should be able to fix this by using GET MISSING TABLE
> NAMES and REGENERATE MISSING TABLE.
> 
> But some of the missing table names are the same as some "live" table names
> in the updated structure.
> So I changed the names of those tables in the old structure by adding "_x"
> to each one. e.g. "data_61" becomes "data_61_x" etc.
> 
> However, after opening the database in the updated (v16) structure, the
> missing table names list shows the ORIGINAL table names, not the MODIFIED
> ONES! "data_61_x" has reverted to "data_61", etc. So if I try to use
> REGENERATE MISSING TABLE, nothing happens because there is already a table
> with that name.
> 
> ​Any ideas about this?
> Pat​
> 
> -- 
> *
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Sometimes speed bites

2018-06-14 Thread Robert McKeever via 4D_Tech
4D v15 Server, new Mac Pro tower, 10.13.5.

The code has been running on an older MacPro tower for many years. Now a second 
office. So, it gets the old tower, and the main office gets the new one.

I put in an update last night that added even more speed. Yeah, everyone likes 
speed.

Part of the process is the creation of a consult letter, which is then handed 
off to a second process for editing, releasing the patient record in the 
process. So, the primary process creates the letter in a template, saves it, 
does an UNLOAD RECORD. If the letter editing process has never been started, 
then it creates a new process, handing off the letter id, and all is well.

But if the letter editing process is sitting idle waiting for another letter to 
edit, it is resumed, and I get a message from 4D that you are trying to edit a 
letter that you are already editing. Damn, now running too fast. 4D is not 
recognizing the UNLOAD RECORD in the resumed process. So, a LOAD RECORD/If 
Locked loop does what is necessary.

Not sure about v16 yet.
_
Bob McKeever  http://www.mswl.com 
McKeever's Software Wizardry
Port Coquitlam, B.C.
bobmckee...@mac.com




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Updating a structure - data goes AWOL

2018-06-14 Thread Pat Bensky via 4D_Tech
I'm updating a client's database from an old version of my app, in 4D v12,
to the latest version, using v16. There have been various modifications to
the structure in between the version they are using and the current
version. Tables have been added, deleted, repurposed. The result is that
when the database is opened in the v16 version, some of the tables are lost.

I figured out that I should be able to fix this by using GET MISSING TABLE
NAMES and REGENERATE MISSING TABLE.

But some of the missing table names are the same as some "live" table names
in the updated structure.
So I changed the names of those tables in the old structure by adding "_x"
to each one. e.g. "data_61" becomes "data_61_x" etc.

However, after opening the database in the updated (v16) structure, the
missing table names list shows the ORIGINAL table names, not the MODIFIED
ONES! "data_61_x" has reverted to "data_61", etc. So if I try to use
REGENERATE MISSING TABLE, nothing happens because there is already a table
with that name.

​Any ideas about this?
Pat​

-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Musing on creating PDFs in 4D

2018-06-14 Thread JOHN BAUGHMAN via 4D_Tech
Yes, Kapoho Bay was one of the most unique locations in all of the islands. 
Just give it a million or so years, however, and it could be the Waikiki, long 
lost by then, replacement.  Provided we humans are still around to enjoy it. 
Makes one realize how small a speck in time each of our lives are in comparison 
to the life of our planet.

Here on Oahu we have had little affect from the volcano so far. A bit of VOG 
has creeped in every now and then, but so minor that not everyone has felt it’s 
effects. I did feel the 5+ earthquake a couple of weeks ago. I am a bit 
concerned for my older Son and Grandkids who live in Volcano, a community just 
up the road from Hilo. No foreseeable threat from the lava, but if the Trades 
give way to Kona or worse no winds for any length of time, VOG  could present 
some serious issues for the Hilo side of the island.

John

John Baughman
1331 Auwaiku Street
Kailua, Hawaii  96734
(808) 262-0328
john...@hawaii.rr.com

> On Jun 14, 2018, at 1:47 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> John,
> That is so true. Anymore a lot of documents actually get handed around via
> email or other online methods and never actually printed at all. PDF is
> what that was made for. And like I said - PDFs are hard if you can't use an
> OS print engine.
> 
> BTW - really sad to see Kapoho buried in lava. We stayed there for a couple
> of weeks about four years ago. I have nothing but good memories of that
> visit. How are things on your side of the island?
> 
> On Thu, Jun 14, 2018 at 1:58 PM JOHN BAUGHMAN via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Thanks. Lots of good stuff. I should take a look at QPDF. Up to now my PDF
>> requirements have been primarily to recreate existing hard copy forms in 4D
>> filled out from record data. I don’t need to fix what is not broken, but
>> PDF requirements seems to have creeped to the forefront in every new
>> project I take on or feature requests in my existing projects.
>> 
>> --
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *We go vote - they go home*
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Musing on creating PDFs in 4D

2018-06-14 Thread Kirk Brooks via 4D_Tech
John,
That is so true. Anymore a lot of documents actually get handed around via
email or other online methods and never actually printed at all. PDF is
what that was made for. And like I said - PDFs are hard if you can't use an
OS print engine.

BTW - really sad to see Kapoho buried in lava. We stayed there for a couple
of weeks about four years ago. I have nothing but good memories of that
visit. How are things on your side of the island?

On Thu, Jun 14, 2018 at 1:58 PM JOHN BAUGHMAN via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Thanks. Lots of good stuff. I should take a look at QPDF. Up to now my PDF
> requirements have been primarily to recreate existing hard copy forms in 4D
> filled out from record data. I don’t need to fix what is not broken, but
> PDF requirements seems to have creeped to the forefront in every new
> project I take on or feature requests in my existing projects.
>
> --
Kirk Brooks
San Francisco, CA
===

*We go vote - they go home*
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Content Security Policy - inline style

2018-06-14 Thread Timothy Penner via 4D_Tech
I think it's telling you that the page does not have a default-src self tag. 
Therefore Content-Security-Policy (CSP) is blocking the loading of inline 
styles
https://content-security-policy.com/

Quote: "The default-src is the default policy for loading content such as 
JavaScript, Images, CSS, Fonts, AJAX requests, Frames, HTML5 Media. See the 
Source List Reference for possible values."
https://content-security-policy.com/#source_list

The comments on this stack overflow post suggest not using inline css at all 
because it is unsafe:
https://stackoverflow.com/questions/17766817/refused-to-apply-inline-style-because-it-violates-the-following-content-security/18428346

-Tim



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Musing on creating PDFs in 4D

2018-06-14 Thread JOHN BAUGHMAN via 4D_Tech
Kirk,

Thanks. Lots of good stuff. I should take a look at QPDF. Up to now my 
PDF requirements have been primarily to recreate existing hard copy forms in 4D 
filled out from record data. I don’t need to fix what is not broken, but PDF 
requirements seems to have creeped to the forefront in every new project I take 
on or feature requests in my existing projects.

John


John Baughman
1331 Auwaiku Street
Kailua, Hawaii  96734
(808) 262-0328
john...@hawaii.rr.com

> On Jun 14, 2018, at 10:48 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> John,
> Using QPDF is much like using PRINT FORM. The plugin commands allow you to
> precisely control where on the page something (text, line, image) will
> appear. Unlike PRINT FORM you can add to existing pages. This greatly
> simplifies, for instance, adding page numbers in the form of "Page x of y".
> You can traverse back and forth through your pages if necessary.
> 
> QPDF allows me to use templates. These can be pre-formatted PDFs or I can
> build one on the fly. My usual workflow in a method is to create the
> document and set the meta data (author, date, subject, etc. - stuff I don't
> think you can do at all when creating PDFs via print engines). Then I'll
> make the page template with things like the report header and footer info.
> Then I basically run down the page adding material just like I would with
> PRINT FORM. I like to make my methods that add material to the page
> functions that return the last y value. Coupled with a method to check for
> available space and handle page breaks it works well.
> 
> I may get around to locating these methods in a component for ease of reuse
> as I think about.
> 
> A few other things I can do with the plugin are include existing PDFs. This
> didn't seem like an incredibly useful feature at first but it is. In the
> case of sales quotes some salesmen like to include cut sheets, drawings or
> brochures from the vendor with their bid. Another use is creating or
> reading PDF forms. If you have a PDF form you must populate but the form is
> really just a scan of something you can still place text in the appropriate
> locations on the page. It's a pain but you only have to do it once.
> 
> Another benefit I don't believe is available any other way is adding
> bookmarks and internal references. Bookmarks are what you see in the
> sidebar and allow you to navigate large documents. Internal references are
> like anchors on a web page and work the same way.
> 
> Don't get me wrong, I have not abandoned traditional print forms by any
> means. It takes some effort to build a PDF form in code for anything beyond
> very simple needs. It's not the right solution for everything. But for
> certain types of documents I'm finding working with it a very deep breath
> of fresh air.
> 
> On Thu, Jun 14, 2018 at 11:07 AM JOHN BAUGHMAN via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Interesting. I have never had a situation where I did not have a
>> relatively  good idea of what a document will look like such that I
>> couldn't create 1 or more variable populated forms to cover all the
>> possibilities.
>> 
>> 
>> John Baughman
>> 1331 Auwaiku Street
>> Kailua, Hawaii  96734
>> (808) 262-0328
>> john...@hawaii.rr.com
>> 
>>> On Jun 14, 2018, at 7:14 AM, Kirk Brooks via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>>> 
>>> John,
>>> Yes. No 4D form printing at all.
>>> 
>>> On Thu, Jun 14, 2018 at 10:14 AM JOHN BAUGHMAN via 4D_Tech <
>>> 4d_tech@lists.4d.com> wrote:
>>> 
 Kirk, are you talking about creating the pdf strictly in code?
 
 Otherwise, as Pat pointed out 4D Write Pro can be used, as can 4D forms…
 
 SET PRINT OPTION(Destination option;3;$FolderPath+"MyTest.pdf")
 OPEN PRINTING JOB
 Print form("MyTest4DForm";Form header)
 CLOSE PRINTING JOB
 
 PDFs from 4D forms using this methodology works both on the client and
>> on
 the server.
 
 
 John Baughman
 1331 Auwaiku Street
 Kailua, Hawaii  96734
 (808) 262-0328
 john...@hawaii.rr.com
 
> On Jun 14, 2018, at 5:37 AM, Pat Bensky via 4D_Tech <
 4d_tech@lists.4d.com> wrote:
> 
> Another option, which may or may not be suitable depending on the
 project,
> is to build the document with 4DWrite Pro and then simply set the print
> option and print it:
> 
> *SET PRINT OPTION*(Orientation option;iPrintOption) // landscape or
 portrait
> 
> *SET PRINT OPTION*(Destination option;3;$pathname)  // PDF
> 
> *WP USE PAGE SETUP*(oWPdoc)
> 
> *WP PRINT*(oWPdoc)
> 
> *SHOW ON DISK*($pathname)
> 
> This will require you to learn how to program Write Pro, but I think
>> that
> will be a bit simpler than learning how to create PDFs, it won't cost
>> you
> any extra, and those skills might come in handy for other 4D projects
>> :)
> 
> Pat
> 
> On Thu, 14 Jun 2018 at 16:22, Kirk Brooks via 4D_Tech <

Content Security Policy - inline style

2018-06-14 Thread Randy Engle via 4D_Tech
I have a particular customer that is able to come up with all kinds of security 
snafus on a regular basis.

The latest is causing our web app to be really foobar in Chrome, Firefox, Edge
IE seems to be OK

Anyone care to provide a 1/2 cup of enlightenment to this wondrous, mystical 
area.

The error messages in Developer Tools read something like this:

Refused to apply inline style because it violates the following Content 
Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' 
keyword, a hash ('sha256-Y9v1MZrln1N8aPBY5lmpxYKwFkcp/nyBMMEnn7WFjuw='), or a 
nonce ('nonce-...') is required to enable inline execution. Note also that 
'style-src' was not explicitly set, so 'default-src' is used as a fallback.

A given web page has many, many of these error messages.

Help!  Big points to anyone who can provide anything!

Many thanks

Randy Engle, Director
XC2 Software LLC – XC2LIVE!


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Musing on creating PDFs in 4D

2018-06-14 Thread Kirk Brooks via 4D_Tech
John,
Using QPDF is much like using PRINT FORM. The plugin commands allow you to
precisely control where on the page something (text, line, image) will
appear. Unlike PRINT FORM you can add to existing pages. This greatly
simplifies, for instance, adding page numbers in the form of "Page x of y".
You can traverse back and forth through your pages if necessary.

QPDF allows me to use templates. These can be pre-formatted PDFs or I can
build one on the fly. My usual workflow in a method is to create the
document and set the meta data (author, date, subject, etc. - stuff I don't
think you can do at all when creating PDFs via print engines). Then I'll
make the page template with things like the report header and footer info.
Then I basically run down the page adding material just like I would with
PRINT FORM. I like to make my methods that add material to the page
functions that return the last y value. Coupled with a method to check for
available space and handle page breaks it works well.

I may get around to locating these methods in a component for ease of reuse
as I think about.

A few other things I can do with the plugin are include existing PDFs. This
didn't seem like an incredibly useful feature at first but it is. In the
case of sales quotes some salesmen like to include cut sheets, drawings or
brochures from the vendor with their bid. Another use is creating or
reading PDF forms. If you have a PDF form you must populate but the form is
really just a scan of something you can still place text in the appropriate
locations on the page. It's a pain but you only have to do it once.

Another benefit I don't believe is available any other way is adding
bookmarks and internal references. Bookmarks are what you see in the
sidebar and allow you to navigate large documents. Internal references are
like anchors on a web page and work the same way.

Don't get me wrong, I have not abandoned traditional print forms by any
means. It takes some effort to build a PDF form in code for anything beyond
very simple needs. It's not the right solution for everything. But for
certain types of documents I'm finding working with it a very deep breath
of fresh air.

On Thu, Jun 14, 2018 at 11:07 AM JOHN BAUGHMAN via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Interesting. I have never had a situation where I did not have a
> relatively  good idea of what a document will look like such that I
> couldn't create 1 or more variable populated forms to cover all the
> possibilities.
>
>
> John Baughman
> 1331 Auwaiku Street
> Kailua, Hawaii  96734
> (808) 262-0328
> john...@hawaii.rr.com
>
> > On Jun 14, 2018, at 7:14 AM, Kirk Brooks via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > John,
> > Yes. No 4D form printing at all.
> >
> > On Thu, Jun 14, 2018 at 10:14 AM JOHN BAUGHMAN via 4D_Tech <
> > 4d_tech@lists.4d.com> wrote:
> >
> >> Kirk, are you talking about creating the pdf strictly in code?
> >>
> >> Otherwise, as Pat pointed out 4D Write Pro can be used, as can 4D forms…
> >>
> >> SET PRINT OPTION(Destination option;3;$FolderPath+"MyTest.pdf")
> >> OPEN PRINTING JOB
> >> Print form("MyTest4DForm";Form header)
> >> CLOSE PRINTING JOB
> >>
> >> PDFs from 4D forms using this methodology works both on the client and
> on
> >> the server.
> >>
> >>
> >> John Baughman
> >> 1331 Auwaiku Street
> >> Kailua, Hawaii  96734
> >> (808) 262-0328
> >> john...@hawaii.rr.com
> >>
> >>> On Jun 14, 2018, at 5:37 AM, Pat Bensky via 4D_Tech <
> >> 4d_tech@lists.4d.com> wrote:
> >>>
> >>> Another option, which may or may not be suitable depending on the
> >> project,
> >>> is to build the document with 4DWrite Pro and then simply set the print
> >>> option and print it:
> >>>
> >>> *SET PRINT OPTION*(Orientation option;iPrintOption) // landscape or
> >> portrait
> >>>
> >>> *SET PRINT OPTION*(Destination option;3;$pathname)  // PDF
> >>>
> >>> *WP USE PAGE SETUP*(oWPdoc)
> >>>
> >>> *WP PRINT*(oWPdoc)
> >>>
> >>> *SHOW ON DISK*($pathname)
> >>>
> >>> This will require you to learn how to program Write Pro, but I think
> that
> >>> will be a bit simpler than learning how to create PDFs, it won't cost
> you
> >>> any extra, and those skills might come in handy for other 4D projects
> :)
> >>>
> >>> Pat
> >>>
> >>> On Thu, 14 Jun 2018 at 16:22, Kirk Brooks via 4D_Tech <
> >> 4d_tech@lists.4d.com>
> >>> wrote:
> >>>
>  I just chimed in on a conversation on the forums about using PDF
> Creator
>  . In this
> >> case
>  the OP was asking about making it work on the server. I'm sure anyone
> >> who
>  tried to make that work just gave a little sympathetic groan.
> 
>  ​Making PDFs is hard. True - with a Mac or Win10 it's become pretty
> >> easy to
>  print-to-PDF. This is really a user-interface feature though. If you
> >> need
>  to build a PDF in code and want to work with the BLOB of that document
>  using the OS print features starts to fall apart. If you 

Re: Objects without Stylesheets suddenly displayed as Wingdings!

2018-06-14 Thread Jeffrey Kain via 4D_Tech
This has happened randomly and occasionally since the first Windows version of 
4D was released. 

You always need to use style sheets.

> On Jun 13, 2018, at 2:57 PM, Cheryl Michels via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> When I look at these objects, I note that the developer did not assign a 
> style sheet to them.  Against our SOP, but that is a different story.  So, 
> using Form Introspection, I have discovered over 14,000 objects without 
> stylesheets.  Not a trivial task to set them all.

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Objects without Stylesheets suddenly displayed as Wingdings!

2018-06-14 Thread Cheryl Michels via 4D_Tech
A recent Windows update (Windows 10, version 1803) has resulted in at least two 
of our customer sites reporting that certain form objects are now displaying as 
Wingdings.  When I look at these objects, I note that the developer did not 
assign a style sheet to them.  Against our SOP, but that is a different story.  
So, using Form Introspection, I have discovered over 14,000 objects without 
stylesheets.  Not a trivial task to set them all.

Has anyone else run into this problem?  Is there something I can do globally 
that I'm not thinking of?  Is there something that is causing it to select 
Wingdings that I can undo?

Cheryl Michels
President and System Architect
che...@freezerworks.com
(425) 673-1974
www.freezerworks.com
Dataworks Development, Inc.
Providing secure and configurable data management solutions for research and 
clinical labs since 1987.
[Description: 
cid:image003.png@01D3FCEC.D2F77330]

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Delay process bug

2018-06-14 Thread Bryan Green via 4D_Tech
> On Jun 13, 2018, at 14:28, Chuck Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> What does that mean? If you have a cron job process running on server that 
> wakes every 5 minutes to check and launch other processes. Is that what you 
> consider short term scheduling?

Actually, that's exactly what I meant -- short-term (5 minutes, 10 minutes, 
etc.) kind of delay using DELAY PROCESS is more stable than something like 12 
hours, 1 day, etc. using DELAY PROCESS.

You're in my head, Chuck!

-- bag


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Musing on creating PDFs in 4D

2018-06-14 Thread JOHN BAUGHMAN via 4D_Tech
Interesting. I have never had a situation where I did not have a relatively  
good idea of what a document will look like such that I couldn't create 1 or 
more variable populated forms to cover all the possibilities.


John Baughman
1331 Auwaiku Street
Kailua, Hawaii  96734
(808) 262-0328
john...@hawaii.rr.com

> On Jun 14, 2018, at 7:14 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> John,
> Yes. No 4D form printing at all.
> 
> On Thu, Jun 14, 2018 at 10:14 AM JOHN BAUGHMAN via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Kirk, are you talking about creating the pdf strictly in code?
>> 
>> Otherwise, as Pat pointed out 4D Write Pro can be used, as can 4D forms…
>> 
>> SET PRINT OPTION(Destination option;3;$FolderPath+"MyTest.pdf")
>> OPEN PRINTING JOB
>> Print form("MyTest4DForm";Form header)
>> CLOSE PRINTING JOB
>> 
>> PDFs from 4D forms using this methodology works both on the client and on
>> the server.
>> 
>> 
>> John Baughman
>> 1331 Auwaiku Street
>> Kailua, Hawaii  96734
>> (808) 262-0328
>> john...@hawaii.rr.com
>> 
>>> On Jun 14, 2018, at 5:37 AM, Pat Bensky via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>>> 
>>> Another option, which may or may not be suitable depending on the
>> project,
>>> is to build the document with 4DWrite Pro and then simply set the print
>>> option and print it:
>>> 
>>> *SET PRINT OPTION*(Orientation option;iPrintOption) // landscape or
>> portrait
>>> 
>>> *SET PRINT OPTION*(Destination option;3;$pathname)  // PDF
>>> 
>>> *WP USE PAGE SETUP*(oWPdoc)
>>> 
>>> *WP PRINT*(oWPdoc)
>>> 
>>> *SHOW ON DISK*($pathname)
>>> 
>>> This will require you to learn how to program Write Pro, but I think that
>>> will be a bit simpler than learning how to create PDFs, it won't cost you
>>> any extra, and those skills might come in handy for other 4D projects :)
>>> 
>>> Pat
>>> 
>>> On Thu, 14 Jun 2018 at 16:22, Kirk Brooks via 4D_Tech <
>> 4d_tech@lists.4d.com>
>>> wrote:
>>> 
 I just chimed in on a conversation on the forums about using PDF Creator
 . In this
>> case
 the OP was asking about making it work on the server. I'm sure anyone
>> who
 tried to make that work just gave a little sympathetic groan.
 
 ​Making PDFs is hard. True - with a Mac or Win10 it's become pretty
>> easy to
 print-to-PDF. This is really a user-interface feature though. If you
>> need
 to build a PDF in code and want to work with the BLOB of that document
 using the OS print features starts to fall apart. If you want to do
>> this on
 the server it's a complete non starter in my view. ​
 
 ​This is where things get tricky in 4D land. Actually pretty much
 everywhere I suspect but I don't know everywhere. It's actually
>> possible to
 build perfectly valid PDFs in native 4D. Neil Denis gave a Summit
 presentation in 2016 demonstrating this. Working with his demo gave me a
 workable solution for a bit. But sometimes the PDFs wouldn't be valid
>> and
 wouldn't always open. I don't think it had anything to do with Neil's
>> work
 but my own additions.
 
 From here I spent way too much time building my own PDF component in all
 native 4D. PDF language is all text based so there's no reason you
>> can't do
 it in native 4D (well, without the flate/deflate compression). But it is
 hard. The challenge was sort of interesting to me and I now have a
>> fairly
 good understanding of how a PDF document is structured internally. In
>> the
 end I had a working solution for a specific set of uses and the files
>> were
 always valid . The
>> problem
 was it wasn't a full solution. I didn't have bookmark capability, for
 example. Or form fields. It was decent but very limited.
 
 BTW - making PDF is hard. Debugging PDF is even harder.
 
 Prior to that I tried most of the other options I heard folks talk about
 here: PHP, HTMLTOX, various schemes for managing printing on user
>> machines
 and probably some others I've blocked out of my memory. All of them
>> worked
 to varying degrees of success but all of them also required a slightly
 different way of coding, for the ones that build the PDF in code. I
>> could
 never sell the idea of the pricier solutions (this is for the in-house
>> app
 I wrote).
 
 A couple of months ago the need for more robust PDF features came up.
 Looking at my work I realized it just wasn't worthwhile for me to spend
>> the
 time to build it out in my own component so I took another look around
>> at
 the available options. I happened to email Rob Laveaux with some
>> question
 about his plugins. He got back to me suggesting I look at QPDF instead.
>> And
 here is where this turns into a big plug for QPDF. The licensing on the
 older set is pricey. And at 1k euro QPDF isn't cheap but it 

Re: Difference between OB Copy and :=

2018-06-14 Thread Cannon Smith via 4D_Tech
Thanks Miyako. I was able to test this this morning and found that it does 
indeed work in v17! That’s great.

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




> On Jun 13, 2018, at 9:21 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> off the top of *my* head I understand the fix is not limited to object 
> notation.
> 
> it was an optimisation made for wakanda server that somehow got lost on its 
> way to 4D object fields.
> 
> so it's a fix at the database level.
> 
>> 2018/06/14 11:54、Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> のメール:
>> 
>> I haven’t had time to try this myself today, but do you know off the top of 
>> your head if this is only fixed when using dot notation? Or is it fixed when 
>> for the old style of code as well (when we had to traverse the object tree 
>> to the children, getting a reference to the child and then changing the 
>> child object without changing the parent object)?
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Is there any reason to not use Windows 64bit for v16R6 clients (Mac 64bit Server)?

2018-06-14 Thread Dave Nasralla via 4D_Tech
Thanks Pat and Wayne.

On the 4D side I'm 32 bit free (no 4D Write). I spoke with our IT guys
and they said there are some 32 bit machines out there, but they want
to get rid of them, so moving to 64bit will force them out of the wood
work and get them upgraded. Not sure if that is the nicest way to do
things

dave

On Thu, Jun 14, 2018 at 10:28 AM, Wayne Stewart via 4D_Tech
<4d_tech@lists.4d.com> wrote:
> I’d run 64 bit if I could (plugins permitting etc).
>
> On Fri, 15 Jun 2018 at 00:54, Dave Nasralla via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
>> Hey All,
>>
>> We recently moved all our 4D apps to v16R6, partly to get ready for
>> the Macs going 64bit only. (I thought High Sierra was the last OS to
>> support 32bit, but Apple announced that the next OS, Mojave will still
>> support it - and be the last).
>>
>> Our 4D server is Mac as well, and now everything Mac is 64bit for us.
>>
>> We also have Windows clients. Is there any reason to not run 64bit
>> Windows on the client side (assuming my Windows clients have 64 bit
>> OS's)? Right now I deployed v16r6 on 32bit windows machines.
>>
>> Any thoughts or insights are welcome.
>>
>> dave
>>
>> --
>> David Nasralla
>> Clean Air Engineering
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
>
> --
>
> Regards,
>
> Wayne
>
>
> [image: --]
> Wayne Stewart
> [image: http://]about.me/waynestewart
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
David Nasralla
Clean Air Engineering
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Default Font ? 4D 15.4 & Windows 10

2018-06-14 Thread Wayne Stewart via 4D_Tech
Hi,

I wouldn't hard code Segoe UI necessarily.

What I do is on startup I launch a small window with a text variable
set to automatic (probably static text would work as well).

I then run OBJECT Get font(*;"My Text") etc to retrieve the font name
and store that in an IP variable.  I guess you could use storage
nowadays.

<>Dlg_FontName_t:=OBJECT Get font(*;"Dlg_Text1_t")
<>Dlg_FontSize_i:=OBJECT Get font size(*;"Dlg_Text1_t")
<>Dlg_FontStyle_i:=OBJECT Get font style(*;"Dlg_Text1_t")
OBJECT GET COORDINATES(*;"Dlg_Text1_t";$Left_i;$Top_i;$Right_i;$Bottom_i)
<>Dlg_FontHeight_i:=$Bottom_i-$Top_i

Then you could call

OBJECT SET FONT(*;"@";"<>Dlg_FontName_t")

This way you will get the correct font on startup for different systems.


Regards,

Wayne


Wayne Stewart
about.me/waynestewart




On 15 June 2018 at 03:29, Jim Hays via 4D_Tech <4d_tech@lists.4d.com> wrote:
> How about:
>
> OBJECT SET FONT(*;"@";"Segoe UI")
>
>
>
> On Thu, Jun 14, 2018 at 10:28 AM David Rose via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
>> Has anyone found a solution? (BTW, I just received a report of this problem
>> from a Windows 7 user.)
>>
>>
>>
>> --
>> Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Default Font ? 4D 15.4 & Windows 10

2018-06-14 Thread Jim Hays via 4D_Tech
How about:

OBJECT SET FONT(*;"@";"Segoe UI")



On Thu, Jun 14, 2018 at 10:28 AM David Rose via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Has anyone found a solution? (BTW, I just received a report of this problem
> from a Windows 7 user.)
>
>
>
> --
> Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Musing on creating PDFs in 4D

2018-06-14 Thread Kirk Brooks via 4D_Tech
John,
Yes. No 4D form printing at all.

On Thu, Jun 14, 2018 at 10:14 AM JOHN BAUGHMAN via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Kirk, are you talking about creating the pdf strictly in code?
>
> Otherwise, as Pat pointed out 4D Write Pro can be used, as can 4D forms…
>
> SET PRINT OPTION(Destination option;3;$FolderPath+"MyTest.pdf")
> OPEN PRINTING JOB
> Print form("MyTest4DForm";Form header)
> CLOSE PRINTING JOB
>
> PDFs from 4D forms using this methodology works both on the client and on
> the server.
>
>
> John Baughman
> 1331 Auwaiku Street
> Kailua, Hawaii  96734
> (808) 262-0328
> john...@hawaii.rr.com
>
> > On Jun 14, 2018, at 5:37 AM, Pat Bensky via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > Another option, which may or may not be suitable depending on the
> project,
> > is to build the document with 4DWrite Pro and then simply set the print
> > option and print it:
> >
> > *SET PRINT OPTION*(Orientation option;iPrintOption) // landscape or
> portrait
> >
> > *SET PRINT OPTION*(Destination option;3;$pathname)  // PDF
> >
> > *WP USE PAGE SETUP*(oWPdoc)
> >
> > *WP PRINT*(oWPdoc)
> >
> > *SHOW ON DISK*($pathname)
> >
> > This will require you to learn how to program Write Pro, but I think that
> > will be a bit simpler than learning how to create PDFs, it won't cost you
> > any extra, and those skills might come in handy for other 4D projects :)
> >
> > Pat
> >
> > On Thu, 14 Jun 2018 at 16:22, Kirk Brooks via 4D_Tech <
> 4d_tech@lists.4d.com>
> > wrote:
> >
> >> I just chimed in on a conversation on the forums about using PDF Creator
> >> . In this
> case
> >> the OP was asking about making it work on the server. I'm sure anyone
> who
> >> tried to make that work just gave a little sympathetic groan.
> >>
> >> ​Making PDFs is hard. True - with a Mac or Win10 it's become pretty
> easy to
> >> print-to-PDF. This is really a user-interface feature though. If you
> need
> >> to build a PDF in code and want to work with the BLOB of that document
> >> using the OS print features starts to fall apart. If you want to do
> this on
> >> the server it's a complete non starter in my view. ​
> >>
> >> ​This is where things get tricky in 4D land. Actually pretty much
> >> everywhere I suspect but I don't know everywhere. It's actually
> possible to
> >> build perfectly valid PDFs in native 4D. Neil Denis gave a Summit
> >> presentation in 2016 demonstrating this. Working with his demo gave me a
> >> workable solution for a bit. But sometimes the PDFs wouldn't be valid
> and
> >> wouldn't always open. I don't think it had anything to do with Neil's
> work
> >> but my own additions.
> >>
> >> From here I spent way too much time building my own PDF component in all
> >> native 4D. PDF language is all text based so there's no reason you
> can't do
> >> it in native 4D (well, without the flate/deflate compression). But it is
> >> hard. The challenge was sort of interesting to me and I now have a
> fairly
> >> good understanding of how a PDF document is structured internally. In
> the
> >> end I had a working solution for a specific set of uses and the files
> were
> >> always valid . The
> problem
> >> was it wasn't a full solution. I didn't have bookmark capability, for
> >> example. Or form fields. It was decent but very limited.
> >>
> >> BTW - making PDF is hard. Debugging PDF is even harder.
> >>
> >> Prior to that I tried most of the other options I heard folks talk about
> >> here: PHP, HTMLTOX, various schemes for managing printing on user
> machines
> >> and probably some others I've blocked out of my memory. All of them
> worked
> >> to varying degrees of success but all of them also required a slightly
> >> different way of coding, for the ones that build the PDF in code. I
> could
> >> never sell the idea of the pricier solutions (this is for the in-house
> app
> >> I wrote).
> >>
> >> A couple of months ago the need for more robust PDF features came up.
> >> Looking at my work I realized it just wasn't worthwhile for me to spend
> the
> >> time to build it out in my own component so I took another look around
> at
> >> the available options. I happened to email Rob Laveaux with some
> question
> >> about his plugins. He got back to me suggesting I look at QPDF instead.
> And
> >> here is where this turns into a big plug for QPDF. The licensing on the
> >> older set is pricey. And at 1k euro QPDF isn't cheap but it has the same
> >> no-hassel many of his products do. QPDF uses a C library (DynaPDF,
> which is
> >> a large chunk of the licensing fee).
> >>
> >> Working with QPDF did require me to refactor the methods that produce my
> >> key documents. And I had to spend some time prior to that learning how
> to
> >> work with the new command set. I think the time I spent studying the
> Adobe
> >> docs on PDF construction helped make this go faster. The result is what
> I
> >> consider a 

Re: Musing on creating PDFs in 4D

2018-06-14 Thread JOHN BAUGHMAN via 4D_Tech
Kirk, are you talking about creating the pdf strictly in code?

Otherwise, as Pat pointed out 4D Write Pro can be used, as can 4D forms…

SET PRINT OPTION(Destination option;3;$FolderPath+"MyTest.pdf")
OPEN PRINTING JOB
Print form("MyTest4DForm";Form header)
CLOSE PRINTING JOB

PDFs from 4D forms using this methodology works both on the client and on the 
server.


John Baughman
1331 Auwaiku Street
Kailua, Hawaii  96734
(808) 262-0328
john...@hawaii.rr.com

> On Jun 14, 2018, at 5:37 AM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Another option, which may or may not be suitable depending on the project,
> is to build the document with 4DWrite Pro and then simply set the print
> option and print it:
> 
> *SET PRINT OPTION*(Orientation option;iPrintOption) // landscape or portrait
> 
> *SET PRINT OPTION*(Destination option;3;$pathname)  // PDF
> 
> *WP USE PAGE SETUP*(oWPdoc)
> 
> *WP PRINT*(oWPdoc)
> 
> *SHOW ON DISK*($pathname)
> 
> This will require you to learn how to program Write Pro, but I think that
> will be a bit simpler than learning how to create PDFs, it won't cost you
> any extra, and those skills might come in handy for other 4D projects :)
> 
> Pat
> 
> On Thu, 14 Jun 2018 at 16:22, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> 
>> I just chimed in on a conversation on the forums about using PDF Creator
>> . In this case
>> the OP was asking about making it work on the server. I'm sure anyone who
>> tried to make that work just gave a little sympathetic groan.
>> 
>> ​Making PDFs is hard. True - with a Mac or Win10 it's become pretty easy to
>> print-to-PDF. This is really a user-interface feature though. If you need
>> to build a PDF in code and want to work with the BLOB of that document
>> using the OS print features starts to fall apart. If you want to do this on
>> the server it's a complete non starter in my view. ​
>> 
>> ​This is where things get tricky in 4D land. Actually pretty much
>> everywhere I suspect but I don't know everywhere. It's actually possible to
>> build perfectly valid PDFs in native 4D. Neil Denis gave a Summit
>> presentation in 2016 demonstrating this. Working with his demo gave me a
>> workable solution for a bit. But sometimes the PDFs wouldn't be valid and
>> wouldn't always open. I don't think it had anything to do with Neil's work
>> but my own additions.
>> 
>> From here I spent way too much time building my own PDF component in all
>> native 4D. PDF language is all text based so there's no reason you can't do
>> it in native 4D (well, without the flate/deflate compression). But it is
>> hard. The challenge was sort of interesting to me and I now have a fairly
>> good understanding of how a PDF document is structured internally. In the
>> end I had a working solution for a specific set of uses and the files were
>> always valid . The problem
>> was it wasn't a full solution. I didn't have bookmark capability, for
>> example. Or form fields. It was decent but very limited.
>> 
>> BTW - making PDF is hard. Debugging PDF is even harder.
>> 
>> Prior to that I tried most of the other options I heard folks talk about
>> here: PHP, HTMLTOX, various schemes for managing printing on user machines
>> and probably some others I've blocked out of my memory. All of them worked
>> to varying degrees of success but all of them also required a slightly
>> different way of coding, for the ones that build the PDF in code. I could
>> never sell the idea of the pricier solutions (this is for the in-house app
>> I wrote).
>> 
>> A couple of months ago the need for more robust PDF features came up.
>> Looking at my work I realized it just wasn't worthwhile for me to spend the
>> time to build it out in my own component so I took another look around at
>> the available options. I happened to email Rob Laveaux with some question
>> about his plugins. He got back to me suggesting I look at QPDF instead. And
>> here is where this turns into a big plug for QPDF. The licensing on the
>> older set is pricey. And at 1k euro QPDF isn't cheap but it has the same
>> no-hassel many of his products do. QPDF uses a C library (DynaPDF, which is
>> a large chunk of the licensing fee).
>> 
>> Working with QPDF did require me to refactor the methods that produce my
>> key documents. And I had to spend some time prior to that learning how to
>> work with the new command set. I think the time I spent studying the Adobe
>> docs on PDF construction helped make this go faster. The result is what I
>> consider a successful refactor: cleaner code, less of it, more capability,
>> better output. Plus a core PDF module that makes building new docs pretty
>> simple.
>> 
>> As I mentioned in the post on the forums I am starting to look at a 'print'
>> job as more of 'producing a document' than a piece of paper. If it's
>> something that needs to be stored, shared, 

Re: Musing on creating PDFs in 4D

2018-06-14 Thread John DeSoi via 4D_Tech
To make the upgrade to 4D 16 64-bit, I replaced 4D Write with a Markdown editor 
using a rich text area with some expression editing features. HTML generated 
from Markdown is converted to PDF using PhantomJS. Seems to work well and no 
complaints from users. 

PhantomJS is losing future support, but both Google Chrome and Firefox support 
headless mode for generating PDFs. And there is all kinds of open source 
software for driving that on a server including some HTTP APIs.

https://github.com/RelaxedJS/ReLaXed

https://github.com/mozilla/geckodriver

https://w3c.github.io/webdriver/

John DeSoi, Ph.D.


> On Jun 14, 2018, at 10:22 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> ​Making PDFs is hard. True - with a Mac or Win10 it's become pretty easy to
> print-to-PDF. This is really a user-interface feature though. If you need
> to build a PDF in code and want to work with the BLOB of that document
> using the OS print features starts to fall apart. If you want to do this on
> the server it's a complete non starter in my view. ​

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Musing on creating PDFs in 4D

2018-06-14 Thread Pat Bensky via 4D_Tech
Another option, which may or may not be suitable depending on the project,
is to build the document with 4DWrite Pro and then simply set the print
option and print it:

*SET PRINT OPTION*(Orientation option;iPrintOption) // landscape or portrait

*SET PRINT OPTION*(Destination option;3;$pathname)  // PDF

*WP USE PAGE SETUP*(oWPdoc)

*WP PRINT*(oWPdoc)

*SHOW ON DISK*($pathname)

This will require you to learn how to program Write Pro, but I think that
will be a bit simpler than learning how to create PDFs, it won't cost you
any extra, and those skills might come in handy for other 4D projects :)

Pat

On Thu, 14 Jun 2018 at 16:22, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> I just chimed in on a conversation on the forums about using PDF Creator
> . In this case
> the OP was asking about making it work on the server. I'm sure anyone who
> tried to make that work just gave a little sympathetic groan.
>
> ​Making PDFs is hard. True - with a Mac or Win10 it's become pretty easy to
> print-to-PDF. This is really a user-interface feature though. If you need
> to build a PDF in code and want to work with the BLOB of that document
> using the OS print features starts to fall apart. If you want to do this on
> the server it's a complete non starter in my view. ​
>
> ​This is where things get tricky in 4D land. Actually pretty much
> everywhere I suspect but I don't know everywhere. It's actually possible to
> build perfectly valid PDFs in native 4D. Neil Denis gave a Summit
> presentation in 2016 demonstrating this. Working with his demo gave me a
> workable solution for a bit. But sometimes the PDFs wouldn't be valid and
> wouldn't always open. I don't think it had anything to do with Neil's work
> but my own additions.
>
> From here I spent way too much time building my own PDF component in all
> native 4D. PDF language is all text based so there's no reason you can't do
> it in native 4D (well, without the flate/deflate compression). But it is
> hard. The challenge was sort of interesting to me and I now have a fairly
> good understanding of how a PDF document is structured internally. In the
> end I had a working solution for a specific set of uses and the files were
> always valid . The problem
> was it wasn't a full solution. I didn't have bookmark capability, for
> example. Or form fields. It was decent but very limited.
>
> BTW - making PDF is hard. Debugging PDF is even harder.
>
> Prior to that I tried most of the other options I heard folks talk about
> here: PHP, HTMLTOX, various schemes for managing printing on user machines
> and probably some others I've blocked out of my memory. All of them worked
> to varying degrees of success but all of them also required a slightly
> different way of coding, for the ones that build the PDF in code. I could
> never sell the idea of the pricier solutions (this is for the in-house app
> I wrote).
>
> A couple of months ago the need for more robust PDF features came up.
> Looking at my work I realized it just wasn't worthwhile for me to spend the
> time to build it out in my own component so I took another look around at
> the available options. I happened to email Rob Laveaux with some question
> about his plugins. He got back to me suggesting I look at QPDF instead. And
> here is where this turns into a big plug for QPDF. The licensing on the
> older set is pricey. And at 1k euro QPDF isn't cheap but it has the same
> no-hassel many of his products do. QPDF uses a C library (DynaPDF, which is
> a large chunk of the licensing fee).
>
> Working with QPDF did require me to refactor the methods that produce my
> key documents. And I had to spend some time prior to that learning how to
> work with the new command set. I think the time I spent studying the Adobe
> docs on PDF construction helped make this go faster. The result is what I
> consider a successful refactor: cleaner code, less of it, more capability,
> better output. Plus a core PDF module that makes building new docs pretty
> simple.
>
> As I mentioned in the post on the forums I am starting to look at a 'print'
> job as more of 'producing a document' than a piece of paper. If it's
> something that needs to be stored, shared, downloaded from the web or
> produced on the server it's going to need to be produced in a blob and
> that's going to be a PDF. If it's truly something a user needs as a piece
> of paper it's a print job.
>
> Producing PDFs in code means no form editor. This isn't always a bad thing.
> Sometimes it's as much work to make a complex document render correctly
> through a 4D print form as it is to simply write the code to assemble the
> data. It really depends on the data and the document.
>
> --
> Kirk Brooks
> San Francisco, CA
> ===
>
> *We go vote - they go home*
> **
> 4D 

Re: Is there any reason to not use Windows 64bit for v16R6 clients (Mac 64bit Server)?

2018-06-14 Thread Wayne Stewart via 4D_Tech
I’d run 64 bit if I could (plugins permitting etc).

On Fri, 15 Jun 2018 at 00:54, Dave Nasralla via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hey All,
>
> We recently moved all our 4D apps to v16R6, partly to get ready for
> the Macs going 64bit only. (I thought High Sierra was the last OS to
> support 32bit, but Apple announced that the next OS, Mojave will still
> support it - and be the last).
>
> Our 4D server is Mac as well, and now everything Mac is 64bit for us.
>
> We also have Windows clients. Is there any reason to not run 64bit
> Windows on the client side (assuming my Windows clients have 64 bit
> OS's)? Right now I deployed v16r6 on 32bit windows machines.
>
> Any thoughts or insights are welcome.
>
> dave
>
> --
> David Nasralla
> Clean Air Engineering
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

-- 

Regards,

Wayne


[image: --]
Wayne Stewart
[image: http://]about.me/waynestewart

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Is there any reason to not use Windows 64bit for v16R6 clients (Mac 64bit Server)?

2018-06-14 Thread Pat Bensky via 4D_Tech
Here's one:
If you are using 4DWrite (not Pro), it won't work :)
PB

On Thu, 14 Jun 2018 at 15:54, Dave Nasralla via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hey All,
>
> We recently moved all our 4D apps to v16R6, partly to get ready for
> the Macs going 64bit only. (I thought High Sierra was the last OS to
> support 32bit, but Apple announced that the next OS, Mojave will still
> support it - and be the last).
>
> Our 4D server is Mac as well, and now everything Mac is 64bit for us.
>
> We also have Windows clients. Is there any reason to not run 64bit
> Windows on the client side (assuming my Windows clients have 64 bit
> OS's)? Right now I deployed v16r6 on 32bit windows machines.
>
> Any thoughts or insights are welcome.
>
> dave
>
> --
> David Nasralla
> Clean Air Engineering
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Musing on creating PDFs in 4D

2018-06-14 Thread Kirk Brooks via 4D_Tech
I just chimed in on a conversation on the forums about using PDF Creator
. In this case
the OP was asking about making it work on the server. I'm sure anyone who
tried to make that work just gave a little sympathetic groan.

​Making PDFs is hard. True - with a Mac or Win10 it's become pretty easy to
print-to-PDF. This is really a user-interface feature though. If you need
to build a PDF in code and want to work with the BLOB of that document
using the OS print features starts to fall apart. If you want to do this on
the server it's a complete non starter in my view. ​

​This is where things get tricky in 4D land. Actually pretty much
everywhere I suspect but I don't know everywhere. It's actually possible to
build perfectly valid PDFs in native 4D. Neil Denis gave a Summit
presentation in 2016 demonstrating this. Working with his demo gave me a
workable solution for a bit. But sometimes the PDFs wouldn't be valid and
wouldn't always open. I don't think it had anything to do with Neil's work
but my own additions.

From here I spent way too much time building my own PDF component in all
native 4D. PDF language is all text based so there's no reason you can't do
it in native 4D (well, without the flate/deflate compression). But it is
hard. The challenge was sort of interesting to me and I now have a fairly
good understanding of how a PDF document is structured internally. In the
end I had a working solution for a specific set of uses and the files were
always valid . The problem
was it wasn't a full solution. I didn't have bookmark capability, for
example. Or form fields. It was decent but very limited.

BTW - making PDF is hard. Debugging PDF is even harder.

Prior to that I tried most of the other options I heard folks talk about
here: PHP, HTMLTOX, various schemes for managing printing on user machines
and probably some others I've blocked out of my memory. All of them worked
to varying degrees of success but all of them also required a slightly
different way of coding, for the ones that build the PDF in code. I could
never sell the idea of the pricier solutions (this is for the in-house app
I wrote).

A couple of months ago the need for more robust PDF features came up.
Looking at my work I realized it just wasn't worthwhile for me to spend the
time to build it out in my own component so I took another look around at
the available options. I happened to email Rob Laveaux with some question
about his plugins. He got back to me suggesting I look at QPDF instead. And
here is where this turns into a big plug for QPDF. The licensing on the
older set is pricey. And at 1k euro QPDF isn't cheap but it has the same
no-hassel many of his products do. QPDF uses a C library (DynaPDF, which is
a large chunk of the licensing fee).

Working with QPDF did require me to refactor the methods that produce my
key documents. And I had to spend some time prior to that learning how to
work with the new command set. I think the time I spent studying the Adobe
docs on PDF construction helped make this go faster. The result is what I
consider a successful refactor: cleaner code, less of it, more capability,
better output. Plus a core PDF module that makes building new docs pretty
simple.

As I mentioned in the post on the forums I am starting to look at a 'print'
job as more of 'producing a document' than a piece of paper. If it's
something that needs to be stored, shared, downloaded from the web or
produced on the server it's going to need to be produced in a blob and
that's going to be a PDF. If it's truly something a user needs as a piece
of paper it's a print job.

Producing PDFs in code means no form editor. This isn't always a bad thing.
Sometimes it's as much work to make a complex document render correctly
through a 4D print form as it is to simply write the code to assemble the
data. It really depends on the data and the document.

-- 
Kirk Brooks
San Francisco, CA
===

*We go vote - they go home*
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Is there any reason to not use Windows 64bit for v16R6 clients (Mac 64bit Server)?

2018-06-14 Thread Dave Nasralla via 4D_Tech
Hey All,

We recently moved all our 4D apps to v16R6, partly to get ready for
the Macs going 64bit only. (I thought High Sierra was the last OS to
support 32bit, but Apple announced that the next OS, Mojave will still
support it - and be the last).

Our 4D server is Mac as well, and now everything Mac is 64bit for us.

We also have Windows clients. Is there any reason to not run 64bit
Windows on the client side (assuming my Windows clients have 64 bit
OS's)? Right now I deployed v16r6 on 32bit windows machines.

Any thoughts or insights are welcome.

dave

-- 
David Nasralla
Clean Air Engineering
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**