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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.