#59 User friendly URL for Print Endpoint
Testcase to check url from pdf print
Print URL
-
open webui and press on home button
-
select browse whole tree
-
open a window that contains documents (e.g. Shipment)
- select actions menu and Print
- => a new tab opens with the pdf to print
- => notice that it’s not metasfresh icon on the tab, but a leaf
- => url looks like this: /rest/api/window/{windowId}/{documentId}/print/{filename}
- => in my case: rest/api/window/169/1001034/print/169_546214.pdf where 169 is windowID, 1001034 is documentID and 169_546214 is windowID_docunemtNo
- => note that later it might change, like, instead of windowID to have WindowName
- use ctrl+s or download button to save the pdf on your computer
- => notice that the file name is 169_546214.pdf, same as the {filename} part of your URL
- press save again, and check if the file downloaded fine
- print a document again and while you are on the page with the pdf, change the filename
- e.g. change rest/api/window/169/1001034/print/169_546214.pdf into rest/api/window/169/1001034/print/TestName.pdf
- refresh
- => the pdf is still there
- ctrl+s or press on download button
- => notice that the file name is TestName.pdf, same as the {filename} part you changed in your URL