Question

HTTPFetcher to pdf format


Badge
How can I use the HTTPFetcher to download pdf documents from a URL? I have successfully managed it with Images using the Imagefetcher and writing to JPG, but what do I do for PDFs?

 

 

 


3 replies

Userlevel 2
Badge +17
Try specifying these parameters of the HTTPFeatcher.

 

Target URL: http://<domain>/<path>/filename.pdf

 

Save File: Yes

 

Output Filename: C:\\<preferable path>\\filename.pdf
Badge
Thanks...that worked but it wasn´t logical. Firstly FME took the path _URL_Contents as the download folder which was my profile directory on windows. Secondly, I needed to concatenate another attribute to give the httpFettcher the "OUTPUT FILENAME" - the complete path to where the file should be saved which included windows path and file-ending...and thirdly , paths copied from Windows use backslashes instead of forward slashes, so everytime I enter a path, I need to change the slashes. 
Userlevel 2
Badge +17
Both Target URL and Output Filename can be set as attribute of input feature. You can create preferable URL and file path strings before the HTTPFetcher based on feature attributes, user parameters etc., using the StringConcatenator or the AttributeCreator.

 

And you can use the StringReplacer to replace backslashes with foward slashes, if necessary.

Reply