Jump to content

"PDF Viewer" with Indirect file path (SD)


hotwires

Recommended Posts

Has anyone had success with the new "indirect, External SD, path via tag feature? This functionality is pivotal to one of my upcoming projects. I am not having any luck getting it to work with SD card installed in Unistream (\Docs\example.pdf) . If I put sample file in root directory of DOK (USB flash drive) it will open file from filename in tag no issues. I have not tried root directory on SD card. Project direct puts them in "docs" folder. Help file show syntax when file is in subfolders however I have no success. Help, please and thank you.

Link to comment
Share on other sites

Hi hotwires,
Regarding the "PDF Viewer" widget when:
image.png   

 
The value of the tag ("myTag") assigned to "Path" property should be set like you are in the root of your SD card. For example, for this SD card layout:

    MyDir
        MyFile.pdf

The path will be "/MyDir/MyFile.pdf"

Link to comment
Share on other sites

17 hours ago, NoamM said:

Hi hotwires,
Regarding the "PDF Viewer" widget when:
image.png   

 
The value of the tag ("myTag") assigned to "Path" property should be set like you are in the root of your SD card. For example, for this SD card layout:

    MyDir
        MyFile.pdf

The path will be "/MyDir/MyFile.pdf"

Dan Logee  suggested using   “/Media/Docs/V1210.pdf”

 

UPDATE: THE ABOVE SYNTAX WORKS ON SD CARD! MUST HAVE /Media/Docs/yourDocHere.pdf

Link to comment
Share on other sites

Now to construct a way to make the “/Media/Docs/“ and “.pdf” static and the “pdfFileName” dynamic all in one variable string. I only want to indirectly reference the actual filename portion. Below is what I have so far as a "reference by filename only" indirect path string builder. Is there a better way?

 

UniLindirectPathBuilder.JPG

Link to comment
Share on other sites

You can use a Message Composer.

Fixed Text with "/Media/Docs/"

Raw Data linked to a filename (ASCII string without the extension)

Fixed text with ".pdf"

 

Then use the Ladder element Build Message to output a buffer, and then use Buffer to Tag (ASCII String)

 

  • Like 1
Link to comment
Share on other sites

@Saragani

Message composer worked nicely. Now on to FTP client with dynamic filenames. How much can to tell me about the FTP COMPARE? What defines that the file is different for overwrite? File name? File size? Meta data?

I found in help section. No clear definition of what "file is different" means. Assuming filename. Any more context clarity you could provide would be greatly appreciated. I want to develop my application to it's FULLEST potential. Clean, lean, and mean.

Please and Thank You

Link to comment
Share on other sites

18 hours ago, Saragani said:

I think it reads the file from the ftp, calculates a checksum on both files and  if its different then it overwrites the original if you selected to.

Checksum driven; THANK YOU for a quick and concise answer. That should work nicely. I stumbled through the process of  fetching a file from PC (Filezilla) to SD via FTP Client on UniStream. I would suggest adding “checksum difference” to FTP help section. “If the files are different” is slightly ambiguitous. My assumption was “filename differences”, if it is indeed a checksum based update then files with the same name could be overwriten. POWERFUL feature, LOVE IT. 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...