Re: Printing a PDF document from 4D

2019-03-20 Thread Arnaud de Montard via 4D_Tech

> Le 19 mars 2019 à 15:03, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> [...]
> so I think it is preferable to generate PDF by code than to "print" it, if 
> possible. (like with the pluggers plugin)

I have not used it myself, but as far as I can remember when a friend showed 
me, this plugin allows to work in a very similar way to Print object. 

-- 
Arnaud de Montard 




**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread Neal Schaefer via 4D_Tech
Oops - quick correction on the syntax:

HTML to DOCX:
Launch External Process ("C:\\temp\\convertdoc.exe c:\\temp\\*.htm 
c:\\temp\\*.docx /overwrite"; $blank;$outputStream_t;$errorStream_t)

HTML to PDF:
Launch External Process ("C:\\temp\\convertdoc.exe c:\\temp\\*.htm 
c:\\temp\\*.pdf /overwrite"; $blank;$outputStream_t;$errorStream_t)
**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread Julio Carneiro via 4D_Tech
Sorry Rob, my mistake!

I misread QPDF’s documentation and assumed the exact opposite, that QPDF Print 
Document was not implemented on Windows! duh!!

I’ll take another look for sure.

cheers,
julio

> On Mar 19, 2019, at 11:58 AM, Rob Laveaux via 4D_Tech <4d_tech@lists.4d.com 
> > wrote:
> 
> 
> 
>> On 19 Mar 2019, at 15:27, Julio Carneiro via 4D_Tech <4d_tech@lists.4d.com 
>> > wrote:
>> 
>> @Luc Devar, QPDF, also from pluggers.nl  
>> >, does not support printing on 
>> Windows.
> 
> 
> Hi Julio,
> 
> What makes you conclude that?
> 
> QPDF Print Document works just fine on Windows.
> It is however not yet implemented on Mac, as described in the documentation.
> 
> But there are are various alternative ways to achieve that.
> You can also render a PDF page to a picture variable and print the picture.
> 
> HTH,
> 
> - Rob Laveaux
> 
> 
> Pluggers Software
> Scholekstersingel 48
> 2496 MP  Den Haag
> The Netherlands
> 
> Email: rob.lave...@pluggers.nl  
> >
> Website: http://www.pluggers.nl  
> >
> 
> 

--
Julio Carneiro
jjfo...@gmail.com



**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread Julio Carneiro via 4D_Tech
Thanks to all that replied, Stephen J. Orth’s Win32API is the winning solution.

That’s why this is is awesome.

cheers,
julio

> On Mar 19, 2019, at 4:42 PM, ADeeg via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> 4D Tech mailing list wrote
>> Has anyone here had the need to print a PDF document from 4D, and found a
>> solution?
>> 
>> I am not talking about generating a PDF from 4D. I have an existing PDF
>> document and I need 4D to print it for me! Exactly, user selects a PDF
>> document and I have 4D command it to be printed.
>> 
>> I can use LEP, a plugin, whatever, but so far I have not found a way to do
>> it, with a 100% assurance the document will come out faithfully.
>> 
>> Oh, and this in on Windows.
>> 
>> Thanks for any pointers.
>> --
>> Julio Carneiro
> 
> Hi Julio,
> 
> I use this:
> 
> Windows: 
> $errText:=sys_ShellExecute ("print";$vt_path;"";"";1)
> With Win32Api Plugin
> 
> Mac: 
> C_TEXT($1;$POSIXPath;$HFSPath)
> $HFSPath:=$1
> $POSIXPath:=Replace string($HFSPath;":";"/")
> LAUNCH EXTERNAL PROCESS("lp \"/Volumes/"+$POSIXPath+"\"")
> 
> Regards Armin
> And if you need a solution to create pdfs on windows:
> http://www.node.de/indexplug.htm 
> 
> 
> 
> 
> --
> Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html 
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html 
> 
> Options: https://lists.4d.com/mailman/options/4d_tech 
> 
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com 
> 
> **

--
Julio Carneiro
jjfo...@gmail.com



**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread ADeeg via 4D_Tech
4D Tech mailing list wrote
> Has anyone here had the need to print a PDF document from 4D, and found a
> solution?
> 
> I am not talking about generating a PDF from 4D. I have an existing PDF
> document and I need 4D to print it for me! Exactly, user selects a PDF
> document and I have 4D command it to be printed.
> 
> I can use LEP, a plugin, whatever, but so far I have not found a way to do
> it, with a 100% assurance the document will come out faithfully.
> 
> Oh, and this in on Windows.
> 
> Thanks for any pointers.
> --
> Julio Carneiro

Hi Julio,

I use this:

Windows: 
$errText:=sys_ShellExecute ("print";$vt_path;"";"";1)
With Win32Api Plugin

Mac: 
C_TEXT($1;$POSIXPath;$HFSPath)
$HFSPath:=$1
$POSIXPath:=Replace string($HFSPath;":";"/")
LAUNCH EXTERNAL PROCESS("lp \"/Volumes/"+$POSIXPath+"\"")

Regards Armin
And if you need a solution to create pdfs on windows:
http://www.node.de/indexplug.htm




--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread Rob Laveaux via 4D_Tech


> On 19 Mar 2019, at 15:27, Julio Carneiro via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> @Luc Devar, QPDF, also from pluggers.nl , does not 
> support printing on Windows.


Hi Julio,

What makes you conclude that?

QPDF Print Document works just fine on Windows.
It is however not yet implemented on Mac, as described in the documentation.

But there are are various alternative ways to achieve that.
You can also render a PDF page to a picture variable and print the picture.

HTH,

- Rob Laveaux


Pluggers Software
Scholekstersingel 48
2496 MP  Den Haag
The Netherlands

Email: rob.lave...@pluggers.nl 
Website: http://www.pluggers.nl 





**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread Stephen J. Orth via 4D_Tech
Julio,

Here is how we use this command to print:

 $returncode:=sys_ShellExecute ("print";$path;"";"";SW_HIDE)

The $path variable contains the full path to the document I want to print.

Best,


Steve

*
  Stephen J. Orth
  The Aquila Group, Inc.  Office:  (608) 834-9213
  P.O. Box 690   Mobile:  (608) 347-6447
  Sun Prairie, WI 53590

  E-Mail:  s.o...@the-aquila-group.com
*

-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Stephen J. Orth via 
4D_Tech
Sent: Tuesday, March 19, 2019 9:30 AM
To: '4D iNug Technical' <4d_tech@lists.4d.com>
Cc: Stephen J. Orth 
Subject: RE: Printing a PDF document from 4D

Julio,

Sorry, coming into this late...

Do you have WIN32API?  If so, you can simply use the sys_shellexecute command 
to print.  It will use the native Windows application.

Best,


Steve

*
  Stephen J. Orth
  The Aquila Group, Inc.  Office:  (608) 834-9213
  P.O. Box 690   Mobile:  (608) 347-6447
  Sun Prairie, WI 53590

  E-Mail:  s.o...@the-aquila-group.com
*

-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Julio Carneiro via 
4D_Tech
Sent: Tuesday, March 19, 2019 9:27 AM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: Julio Carneiro 
Subject: Re: Printing a PDF document from 4D

I do have PDF Viewer, but on Windows you can’t print from an off-screen area, 
which means yo have to display the pdf on a form before printing it.

I forgot to mention that I need to just “print” and external PDF. Printing has 
to happen in background and in some cases for 4D Server. So, no user interface 
allowed.

@Luc Devar, QPDF, also from pluggers.nl, does not support printing on Windows.


**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread Julio Carneiro via 4D_Tech
I do have PDF Viewer, but on Windows you can’t print from an off-screen area, 
which means yo have to display the pdf on a form before printing it.

I forgot to mention that I need to just “print” and external PDF. Printing has 
to happen in background and in some cases for 4D Server. So, no user interface 
allowed.

@Luc Devar, QPDF, also from pluggers.nl, does not support printing on Windows.

So, none of Rob’s plugins work in my case.

> On Mar 19, 2019, at 9:29 AM, UKVetDerm via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> RE:  There is another plugin from pluggers.nl which handles viewing and 
> printing of pdf documents too: PDFViewer. I have been using it on macOS for 
> years. Excellent support from Rob for the rare occasions I needed it.
> 
> I would second this!
> 
> Steve
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

--
Julio Carneiro
jjfo...@gmail.com



**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread Keisuke Miyako via 4D_Tech
printing an HTML is not always easy (especially pagination) even with a good 
media specific CSS.
https://github.com/miyako/4d-component-wkhtmltopdf

besides, printing is a blocking process (only 1 job at a time) and not thread 
safe
so I think it is preferable to generate PDF by code than to "print" it, if 
possible. (like with the pluggers plugin)

> 2019/03/19 22:49、Charles Miller via 4D_Tech <4d_tech@lists.4d.com>のメール:
> Not sure if this will work but how about creating a web area in form load
> the document and then print it




**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread Tim Nevels via 4D_Tech
On Mar 19, 2019, at 8:50 AM, Julio Carneiro wrote:

> Has anyone here had the need to print a PDF document from 4D, and found a 
> solution?
> 
> I am not talking about generating a PDF from 4D. I have an existing PDF 
> document and I need 4D to print it for me! Exactly, user selects a PDF 
> document and I have 4D command it to be printed.
> 
> I can use LEP, a plugin, whatever, but so far I have not found a way to do 
> it, with a 100% assurance the document will come out faithfully.
> 
> Oh, and this in on Windows.
> 
> Thanks for any pointers.

Acrobat Reader has a command line interface to cause it to print a PDF. It’s 
not well documented and it has changed a bit over time with different versions 
but it does work. Check this out:

https://superuser.com/questions/1226609/adobe-reader-send-to-printer-command-line

You may need to provide the full path the AcroRd32.exe to get it to work via 
LEP. Also if you don’t specify  it will print to the default 
printer. 

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com
*


**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread Charles Miller via 4D_Tech
Not sure if this will work but how about creating a web area in form load
the document and then print it

On Tue, Mar 19, 2019 at 7:13 AM Julio Carneiro via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Has anyone here had the need to print a PDF document from 4D, and found a
> solution?
>
> I am not talking about generating a PDF from 4D. I have an existing PDF
> document and I need 4D to print it for me! Exactly, user selects a PDF
> document and I have 4D command it to be printed.
>
> I can use LEP, a plugin, whatever, but so far I have not found a way to do
> it, with a 100% assurance the document will come out faithfully.
>
> Oh, and this in on Windows.
>
> Thanks for any pointers.
> --
> Julio Carneiro
> jjfo...@gmail.com
>
>
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

-- 
-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  http://www.informed-solutions.com
-
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption
from disclosure as to this communication.
**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread UKVetDerm via 4D_Tech
RE:  There is another plugin from pluggers.nl which handles viewing and 
printing of pdf documents too: PDFViewer. I have been using it on macOS for 
years. Excellent support from Rob for the rare occasions I needed it.

I would second this!

Steve


**
4D Internet Users Group (4D iNUG)
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: Printing a PDF document from 4D

2019-03-19 Thread Koen Van Hooreweghe via 4D_Tech
Hi Julio,

There is another plugin from pluggers.nl which handles viewing and printing of 
pdf documents too: PDFViewer. I have been using it on macOS for years. 
Excellent support from Rob for the rare occasions I needed it.

Kind regards,
Koen

> Op 19 mrt. 2019, om 12:39 heeft Luc Devar via 4D_Tech <4d_tech@lists.4d.com> 
> het volgende geschreven:
> 
> I use QPDF plugin from Pluggers Software 
>  > to do this kind of action and 
> many more. 
> Best tools out there to manage PDF documents from 4D.




Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Aalter
Belgium
tel +32 495 511.653

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