If you create the XML import file by yourself, you can use the URL of the galley instead of the embed code, like this: <galley> <label>PDF</label> <file> <href mime_type="application/pdf" src="http://URL_to_the_PDF_file.pdf"/> </file> </galley>
The PDF file has to be then accessible on that URL – the system will then get the file from the URL and import it in.
When article are exported from the system, then they are base64-encoded exported in the file.
You could also program just a small function to give you the base64 encoding of a file, run the function for each PDF and import/copy the code in your XML import file, but if you could handle it with the URLs it is much easier.