Previous Thread
Next Thread
Print Thread
PDFX Email Method 4 #29267 10 Apr 17 01:12 PM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
Hi,

I'm feeling a little stupid here trying to figure out what comma is out of the place that makes some of my //PDFX commands being interpreted as literal text instead of PDFX commands.

Here are the code snippet where I use them:
Code
 
			  ? #9999, "//PDFX,Save.ShowSaveDialog,0"
			  ? #9999, "//PDFX,Save.RunApp,0"
			  ? #9999, "//PDFX,Save.WhenExists,1"		  
			  ? #9999, "//PDFX,Email.Method,4"	

----->		  
			  ? #9999, "//PDFX,Email.LogFile,";chr(34);"c:\userdef\pdfxsmtp.log";chr(34)
			  ? #9999, "//PDFX,Email.SMTP.Address,";chr(34);"mail.umzero.pt";chr(34)
			  ? #9999, "//PDFX,Email.SMTP.UserName,";chr(34);"tavares@umzero.pt";chr(34)
			  ? #9999, "//PDFX,Email.SMTP.Password,";chr(34);"----";chr(34)
			  ? #9999, "//PDFX,Email.SMTP.Port,25"
			  ? #9999, "//PDFX,Email.SMTP.UseSSL,1"
			  ? #9999, "//PDFX,Email.AttachFile,";chr(34);"%temp%\vendas.pdf";chr(34)

---------------------->
			  ? #9999, "//PDFX,Email.To,albuquerque.tavares@gmail.com"
			  ? #9999, "//PDFX,Email.From,tavares@umzero.pt"

			  ? #9999, "//PDFX,Email.Subject,Mapa de Vendas"

 
The commands between the -----> marks are not interpreted as PDFX commands so, are printed as literal text, the commands above and after those marks are ok.

Can it be any outdated module or PDFX driver?
I'm at 6.4.154.2 A-Shell version, I have ashnet.dll in the bin folder and the current PDFX driver.

Any tip? confused

Thanks


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: PDFX Email Method 4 #29268 10 Apr 17 01:39 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Hi Jorge,

The short answer is that it has nothing to do with quotes. But if you change "Email.Method,4" to "Email.Type,4" I think it will work.

The long answer is: I'm not sure why it doesn't like "Method" (which is the new name for the old "Type" attribute), but it's either a documentation bug or a software bug; in either case I'm investigating...

Re: PDFX Email Method 4 #29269 10 Apr 17 02:16 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
After through all of my PDFX examples and all of my source code, I can't find any reference to "Email.Method" anywhere. (Everything is "Email.Type".) So it looks to me like a planned change that was documented but never implemented. And apparently no one noticed because they've all been using the same syntax and programs developed previously.

I need to review it all before deciding if it makes more sense to update the code to match the documentation or vice versa.

Re: PDFX Email Method 4 #29270 10 Apr 17 07:21 PM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
Outch!!!! eek
Incredible how I didn't notice that slight difference, I was so focused in following the documentation that didn't realize what I've done using other Method/Type.
For me, it would be fine to just change documentation to .Type instead of .Method and thank you for noticing the detail wink


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: PDFX Email Method 4 #29271 04 Dec 18 04:31 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
Waking this thread back up...

I fell into the same trap as Jorge. I had to change method to type. But just as an FYI 99.9% of the documentation including the examples refer to it as method. The only reference to type (that i saw) was in the Email Directives Summary under the PDFXv3 column (which i thought we were running v5?)

So i guess the question/point is, is the documentation wrong? Or is method just not working?

Re: PDFX Email Method 4 #29272 04 Dec 18 05:02 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
A brief history...

For whatever reason, the underlying PDFX driver terminology changed in the v5 update. (Worse, the entire architecture of the driver changed.) So it was an unexpectedly large project upgrading to it and maintaining compatibility with the older version. But it seemed important to do the upgrade in order to maintain forward compatibility.

In trying to sort out the changes in the underlying features and terminology, for better or worse we decided to migrate to the new terminology so that our implementation could be as transparently compatible as possible with the third-party API documentation. But that created the problem of having to support both the old and new terminology (converting the old to the new when applicable), which resulted in everything getting more complicated. And then to add insult to injury, in the case of the Types/Methods, not only did the name change, but the numbers did too, resulting in documentation pages like this.

Jorge's post above revealed that although internally the attribute is named "Email.Method", the GDI printing interface wasn't recognizing the new name. Realizing that was a software bug, I fixed it shortly thereafter, posting a 6.4.1548.1 update with the following in the ash64notes.txt ...
Quote

==================================================
A-Shell Release Notes Version 6.4.1548.1 (11 April 2017)
==================================================
...
2. PDFX bug fix: //PDFX,Email.Method,# wasn't being recognized, causing the
subsequent email-related directives to be treated as plain text. It is now
recognized along with the older Email.Type,# (per the documentation).
Obviously I failed to note that in this thread, which might have been helpful, because I suspect that you may not have been aware of the update/fix and may still be running an earlier version. If so, then the solution is either to update or to make a mental note that the documentation is misleading when dealing with versions prior to 1548.1.

In addition, it would be helpful if Ty added a note to the Email Methods topic clarifying this detail.

If you are running a newer version and it still appears that Email.Method is not being recognized, then either there is still a mixup in the code or some other misunderstanding that we should get to the bottom of.

Re: PDFX Email Method 4 #29273 05 Dec 18 08:10 AM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
Thanks for the reply.

It figures that i am running 6.4.1547.5 (ATE)

(Guessing this is an client-side update?)

Re: PDFX Email Method 4 #29274 05 Dec 18 10:05 AM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
It's a Windows-side update, which in your case means client-side. (In a Windows server environment, the PDFX operation could be taking place on the server or the client.)

But, you can get by without the update, at least in this respect, by sticking with Email.Type.

Re: PDFX Email Method 4 [Re: Jorge Tavares - UmZero] #31621 10 Sep 19 09:20 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
Didn't want to open a thread just for this public service announcement...

So:

Apparently if you add a colon (:) in the subject line, it truncates everything prior to the colon. I have remedied it on this side but just in case someone else comes along in say 20 or 30 years, they can wake this thread up and learn something wink

Re: PDFX Email Method 4 [Re: Jorge Tavares - UmZero] #31624 10 Sep 19 10:10 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Appreciate the concern for your programming descendants, but I'm not sure I concur with you on the existing of the problem. I sent myself a message using this subject line:

//PDFX,Email.Subject,Test colon : long stuff : another colon

And it appears like this in my inbox:

Attached Files emsubj.png
Re: PDFX Email Method 4 [Re: Jorge Tavares - UmZero] #31627 11 Sep 19 04:19 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
I know the eyesight is going in my old age (no comment Herman) but didn't you just prove my point??

Where is the "Test colon : " in your actual inbox?

It did truncate everything prior to your first colon, did it not? crazy

Re: PDFX Email Method 4 [Re: Jorge Tavares - UmZero] #31628 11 Sep 19 04:44 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I'm not sure if I can blame this on failing eyesight, fatigue, or mere cognitive dissonance, but it appears that I got snookered by your use of truncated into thinking it was chopping off everything after the colon (when in fact if was everything prior to the first colon).

Unfortunately our in-house grammarian/etymologist is on the road today and I'm unable to come up with a better word than truncate to use for trimming something off the beginning rather than the end (left-truncate?).

For now let's leave it at: "Good observation on your part!"
Or "Look at the picture and ignore the words".

I'll see if I can figure out a workaround, and if not will at add a note to the doc.

Re: PDFX Email Method 4 [Re: Jorge Tavares - UmZero] #31629 11 Sep 19 05:02 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
Lol - well i never said how many colons i had in the subject line... wink Perhaps if you just tested with a single colon you would have seen the results!

No worries on this end, i just took off the colon.

Last edited by Frank; 11 Sep 19 05:04 PM.
Re: PDFX Email Method 4 [Re: Jorge Tavares - UmZero] #31640 12 Sep 19 04:38 PM
Joined: Jun 2001
Posts: 713
S
Steven Shatz Offline
Member
Offline
Member
S
Joined: Jun 2001
Posts: 713
FWIW: In this case, "...drops everything prior to the colon" might have been clearer.

Re: PDFX Email Method 4 [Re: Jorge Tavares - UmZero] #31642 12 Sep 19 04:44 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
To beat the dead horse... this was the orginal quote:

Apparently if you add a colon (:) in the subject line, it truncates everything prior to the colon.

Perhaps Truncate is only used with cutting off the "end" of something, however it can also mean to "shorten"

Last edited by Frank; 12 Sep 19 04:49 PM.
Re: PDFX Email Method 4 [Re: Jorge Tavares - UmZero] #31646 12 Sep 19 05:36 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
As much as it pains me to admit it, I'm afraid Frank is actually right here (even if the English language deserves part of the blame, and despite Stephen's wording being much less prone to misinterpretation by careless readers).

There really needs to be another word for cutting off the beginning, rather than the end, of something.

My ever-helpful daughter offers this brilliant suggestion, which I'm willing to pass on to anyone with the gumption to act on it:

"Well Dad, the solution is obvious -- all you need to do is come up with a word, and submit it to the dictionary!"

Re: PDFX Email Method 4 [Re: Jorge Tavares - UmZero] #31647 12 Sep 19 05:59 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
Not sure if that is a compliment or i should be offended crazy (funny how often i ask myself that same question...)

Agreed - lets all create a new word. It can be our lasting gift to humankind...

Last edited by Frank; 12 Sep 19 06:01 PM.

Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3