Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Embed PDF into XML for invoice, UBL 2.1
Message
From
06/10/2021 10:49:58
 
 
To
06/10/2021 06:27:34
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01682446
Message ID:
01682452
Views:
93
Likes (1)
I need to create invoice as XML file in UBL 2.1 format. Mandatory field is attached PDF invoice. Can you help me how to embed PDF invoice in XML (VFP 6)?
Thanks in advance.

,,,
lcImePdfSaExt="TrtMrtFakktura.PDF"
lcBase64bin = DajBase64bin(lcImePdfSaExt)

...
I created one Ubl Template file and that is my basis for the upgrade.
See the attached picture
<cac:AdditionalDocumentReference>
<cbc:ID><<lcImePdfbezExt>></cbc:ID>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="<<lcImePdfSaExt>>"><<lcBase64bin>> </cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>
...
FUNCTION DajBase64bin
LPARAMETERS tcImePdfSaExt
LOCAL sb2binbase64, lcstr
lcstr=FILETOSTR(tcImePdfSaExt)
sb2binbase64=STRCONV(lcstr,13) && konvertuje u base64 binary
_cliptext=sb2binbase64 && base64 bin. stavio u _cliptext

RETURN _cliptext
Previous
Reply
Map
View

Click here to load this message in the networking platform