1. Jochen Peters
  2. Valentina Reports ADK
  3. Wednesday, March 16 2016, 01:20 PM
  4.  Subscribe via email
I have problems i can see the pdf on my iphone
how i can fix this

Dim fName As String
fName="PayOutOrder"+Trim(CompCity)+"_"+Str(OrderNum)+".pdf"
dim f as folderItem=GetFolderItem( "C:\GasRb\"+fName)

mReport.PrintToDisk( f, EVReportPrintType.kToPDF)

if mAttachFile <> "" then
file = new emailAttachment
file.ContentEncoding="UTF8"
file.loadFromFile getFolderItem(mAttachFile)
mail.attachments.append file
end if
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Is mAttachFile equal to "C:\GasRb\"+fName ?

And no need to set encoding.

The following code works for me:

file = new emailAttachment
file.loadFromFile( f )
mail.attachments.append( file )


Also, it should be possible to avoid saving to intermediate file, using PrintToBuffer (but I have to check it).
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 1
Sergey Pashkov Accepted Answer
Just for information - it's possible to send directly without saving to a file.



Dim pdf as String = mReport.PrintToBuffer( EVReportPrintType.kToPDF, 1 )

Dim file as EmailAttachment = New EmailAttachment
file.MIMEType = "application/pdf"
file.ContentEncoding = "Base64"
file.Data = EncodeBase64( pdf )
file.Name = "report1.pdf"
mail.attachments.append( file )

...

Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 2
Jochen Peters Accepted Answer
ok
thanks is fix
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories