I get security errors when you try to open a pdf file.

I received a security error when trying to run my javascript program, the function has worked before, but now creates an error after I entered the addWaterMark function. I put my entire code below for my script.

The basic function is to load a text file in a table which has the path location and file, open the document, add a watermark, save the file, close the file, and then repeat for the next position of table.

I use Acrobat Standard so I'm unable to debug using the console, that's why I'm fighting for what I'm doing wrong. I want to clarify that I am not a fluent programmer, only to have a knowledge of database programming.

Code

() app.addSubMenu

{

cName: "Extras."

cParent: 'change '.

}

)

() app.addMenuItem

{

cName: "Import a file"

cParent: "Extras."

cExec:"main().

}

)

main() function

{

fileCount = 0 var

var listOfFiles =]

listOfFiles = importData()

amountOfFiles = listOfFiles.length

for (var i = 0; I < listOfFiles.length; i ++) //calculates amount in the listOfFiles array entries

{

newFile = openFile (listOfFiles [i]) //Opens current file

var d = app.activeDocs; Gets the name of the current document title

addWater (d [0]);

app.execMenuItem ('Save');

for (var x d) d [x] .closeDoc ();

}

}

function addWater (myName)

{app.alert("watermark",0);

() myName.addWatermarkFromText

{

cText: "OBSOLETE."

cFont: "Arial,"

nFontSize:36,

aColor: color.red,.

nOpacity: 0.5

}

);

}

SaveFile function saves the current file but with an addition of WM file name

saveFile = app.trustedFunction (function (currentDoc, currentFileName)

{app.alert("savefile",0);

app.beginPriv ();

currentDoc.saveAs (currentFileName);

app.endPriv ();

}

);

openFile function that opens the file named in the variable currentFilename

openFile = app.trustedFunction (function (currentFileName)

{app.alert ("openfile" + currentFileName, 0);}

app.beginPriv ();

app.openDoc (currentFileName);

app.endPriv ();

}

);

importData function matter the paths and the file names contained in the list.txt located on the desktop

importData = app.trustedFunction (function)

{app.alert ("import", 0);

app.beginPriv ();

cFilePath = ' / C/Users/103019944/Desktop/File_List.txt ';

var stmData = util.readFileIntoStream (cFilePath);

cData var = util.stringFromStream (stmData);

CMSG var = cData;

var fileArray = cMsg.split("\r\n");

for (var i = 0; i < fileArray.length; i ++)

Return (fileArray);

app.endPriv ();

}

);

It happens with a specific file? Are you sure that the file path is correct?

Tags: Acrobat

Similar Questions

  • Update Firefox, now I get an error when you try to open the .mkv files, but not other video files

    I created an html page of cinema at home with links to movies on my hard drive. I have two types of links or href = 'file:///C:/Media/movies/Looney Tunes/MainMovie/Vol 1 Disc 3/VIDEO_TS/VIDEO_TS. IFO' for normal DVD or href = "file:///C:/Media/movies/Blu-ray/Lorax/mkv/THE_LORAX/THE_LORAX.Title800.mkv" for blu - ray. Both have worked fine (click on the link and the movie starts to play with Media Player Home Cinema) for a few years until what I recently upgraded to firefox. The .ifo files still open as usual, but now blu - ray links take me to a gray page that says "Video cannot be read because the daughter is corrupt" with a large "X" over it. If I open the html page in Internet Explorer and click on the link, it works very well (blu - ray opens by using Media Player Home Cinema). Also, if I directly open the .mkv files, they play very well (open using MPHC). Thanks for any help!

    Change your links to include the attribute type with the value of video/x-matroska . Example:

    <a type="video/x-matroska" href="file:///C:/My%20Videos/Cooking/Making%20Gingerbread.mkv">How to make gingerbread</a>

    I also used to get the same behavior with files from web sites, when I had the extension of InlineDisposition installed.

  • I get an error when you try to open "application that creative Cloud cannot be opened. -1712

    I get an error when you try to open "application that creative Cloud cannot be opened. -1712

    Cannot open the application Install.app. -1712

  • You use Mac OSX 10.7.5, when you try to open a PDF file, I get a message "an internal error has occurred." I uninstalled and reinstalled both Adobe 10 and 11. Anyone know of the problem and the solution?

    You use Mac OSX 10.7.5, when you try to open a PDF file, I get a message "an internal error has occurred." I uninstalled and reinstalled both Adobe 10 and 11. Anyone know of the problem and the solution?

    Hi Charles,


    It is specific to a particular file or all the files that you are trying to open, gives you the error.

    How you open the same file using Preview on Mac.


    Thank you

    Vikrantt Singh

  • I recently got 'Class not registered' when you try to open my PDF files. This didn't happen before the last 2 days

    I recently got 'Class not registered' when you try to open my PDF files. This didn't happen before the last 2 days

    Hi Meenakshi,

    Thanks for getting back to me. The problem is solved now. We had to reinstall Acrobat DC who, for some reason, had disappeared.

    Regards, Randy

  • Blue screen error when you try to print Adobe PDF files

    Original title: the computer crashes when I try to print Adobe PDF files.

    I unintalled and reinstalled remains 9.3.3 and it still won't print. The OS crashes when you try to print a .pdf file. I can open the document and view the file but not print, just the blue screen and restarts. I opened a word document, print and print text files. It will print anything but Adobe files. Is there any help out there?

    HonoriusIII

    Thank you for your support and help Sicard. I finally got to the last version of Adobe as the culprit. It seems that the latest version 9.3.3 was causing problems. I uninstalled the software, cleaned the registry and other remains and installed the various editions of Adobe. Seems that Vista likes only one software version which proved Adobe 8.0. Once I installed the software, found a few .pdf documents and tried to print. Not only did it print well, it was very fast. Of all the places to find the 8.0 Adobe has been installed on my recovery disks. I don't think Microsoft product (s) are the root cause. Something in Adobe was the cause of the crash. I have the error message has not write against accidents, but it dumped memory and restart is fine, no conflict of driver. Only thing I did after each accident was to defragment. the hard drive and RAM by using certain tools. Vista ran fine since. I know a lot of people out there do not like Vista, but I did have a lot of problems with the software. I found problems with other types of competing software and work with software developers using their products in beta. The crash of the problems were not these beta products. I believe in keeping software simple and effective, it seems that Adobe will conversely making it too complicated software and an application's entire concept.

    Thanks for you help,

    HonoriusIII

  • Error when you try to open a .wmv file

    opening wmv files

    I think I have a problem with media center.  When I try to open a .wmv file sent to me, I get a msg of error saying that windows media player cannot play the file.  The player may not support the codec used to compress the file.  When zi check the files supported, the wmv is included in the list.

    Hi Ratller,

    ·         You are able to open the .wmv files in windows media center?

    Try to update codec on your computer.
    http://Windows.Microsoft.com/en-us/Windows-Vista/codecs-frequently-asked-questions

    Previous post: the results.

    Bindu S - Microsoft Support

    [If this post can help resolve your problem, please click the button 'Mark as answer' or 'Useful' above]
    This message. [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

  • When you try to open a PDF file, it says "Acrobat could not load the DLL base."

    I do not have any Antivirus and when I want to open a PDF it always says "Acrobat could not load the DLL base."

    Hello Kushagra_Saxena,

    To address your error message:
    You can repair Adobe Reader in Control Panel:
    In Windows, choose Start > Control Panel, and then double-click programs and features.
    Click on adobe Reader.
    Click on modify and follow the instructions to repair the application.

    Since you don't have an Antivirus, you can download Microsoft Security Essentials for free.
    It offers offers protection in real time for malware, spyware and other virus infections. It runs
    quietly and efficiently in the background.
    You can download at the following Web site: http://www.microsoft.com/en-us/security_essentials/default.aspx

    I hope this helps.

    Marilyn

  • When you try to open a PDF file, Windows Media Center opens

    My aunt has Windows Vista on her computer and whenever she tries to open a pdf file that opens Windows Media Center. Is there a way to get Windows Vista to point to Acrobat Reader to open the file, or should it go directly to the RA? Thanks for any help you can give on this subject.


    Steve

    PS; I don't know if it's 32-bit or 64-bit.
    * original title - PDF problem on windows Vista *.

    Acrobat Reader or Adobe Reader? Personally, I wouldn't use Adobe at all, but try this. Skip #1 if it is already on the HARD drive.

    Create a file association.

    1. download and save the attachment to the office.
    2. right click on the saved file.
    3. Select: Open with on the shortcut menu.
    4. click on: choose [default] program.
    5. Select: PDF reader program.
    6. check: always use the selected program to open this type of file.
    7. click on OK.

  • Get the error when you try to write to a file using java script in my Metro app

    I'm discovering a problem in my App Metro and thought that I will create a file to copy all log messages in ther... I tried the following

    var LogFile = "LogFile.txt";

    () Windows.Storage.DownloadsFolder.createFileAsync("LogFile.txt").done

    {function (file)

    LogFile = file;

    });

    Windows.Storage.FileIO.appendLinesAsync (log file, "Test") .done ();<-- line="">

    but then, I get the following error:

    Unhandled exception, line 26, column 5 in ms-appx://windowsmultimediaperformanceapplication/js/default.js

    0x800a000d - JavaScript runtime error: Type mismatch

    It creates the file correctly, but it fails to write to it. Any help will be appreciated. I looked at the code example provided and talked about when writing this.

    Hey Kajal,

    The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums.

    http://social.msdn.Microsoft.com/forums/en-us/winappswithhtml5/threads

  • Error when you try to convert a PDF file in Adobe Acrobat 8.1.7

    Trying to convert a PDF drawing/file in TIF format, one of our users receive this error message:

    Acrobat could not save a page in this document due to the following error:

    The image is too wide at the exit.  Please, crop or reduce the resolution and try again.

    The image that is being converted is a design and the estimator cannot crop it as he should have the design "such what" order to do takeoffs on the image.  Does anyone have a solution for this?  Thank you!

    Try to print in a new PDF which is small and try again in the conversion. A roundabout way to get there, but should work.

  • How can I get rid of "your free trial period is over" when you try to open the pdf in the screen reader

    Hello

    How can I get rid of the "your free trial period has finished" screen when you try to open a pdf file in Adobe Reader?

    I got a trial of Dreamweaver, but it was too complicated for me.

    It was not the case for cancell the free track so I let it run its course and expires.  He then deleted programs that is very well (I didn't buy), but he has also deleted my Acrobat Reader.

    I have re-installed that but when I try to open a pdf file, all I get is the screen "your free trial period is over," which only allows you to buy or out and out all together.

    Needless to say that I am very UNIPRESEED with Adobe to spoil my programs and now they want to charge me $ 29 for a problem that they have created.

    Can someone help me with this very annoying problem?

    Concerning

    David

    If this is the free software Adobe reader, then it will not be a free trial that are associated with message.  Maybe what you have installed is not the drive.

  • Windows7 64 I get C646 error when you try to install KB982331

    In Windows7 64 I get C646 error when you try to install the update of security KB982331.  I tried Windows update and download it directly.

    Hello

    Here's what I recommend you do:

    1. Tower of AUC. Down comes the restrictions - turn it off completely.
    2 restart your computer for the change to take effect.
    3 re - download the update of security for Microsoft Office System 2007 (KB982331) from the link below:
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=7f89a734-cda4-4abb-9a10-f6dfe560e8d0&displaylang=en
    4. install. It should work fine.
    5. If it still does not work, try to open all or part of your MS Office applications (such as MS Word, MS Excel, etc.).
    6. follow step 3.

    Let me know your results.

  • Continually, I get an error when you try to update KB968930

    Continually, I get an error when you try to update the following: Windows PowerShell 2.0 and WinRM 2.0 for Windows Vista (KB968930) I tried the solutions provided and it still does not work.  What can I do?.

    Both are optional, non-security updates - don't hesitate to hide them.

  • Get the error when you try to manually create a restore point in Vista 32 - Bit - System - Protection of the system control panel. Got the unable to create the specified task

    Get the error when you try to manually create a restore point in Vista 32 - Bit - System - Protection of the system control panel.
    Got the unable to create the specified task

    Hello

    What is the exact error message received when the problem occurs?

    Methood 1:

    Auditor of file system (CFS) scan to fix all of the corrupted system files. To do this, follow the steps in the following link:

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833 

    Method 2:

    You can start Windows Vista by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    I suggest to put the computer in a clean boot state, and check if the problem persists, see the link:
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    Note: See step 7; Reset the computer to start as usual after troubleshooting is performed.

    Method 3:

    You can temporarily disable the security software and check if the problem occurs. Check out the following link to do the same thing:

    http://Windows.Microsoft.com/en-GB/Windows-Vista/disable-antivirus-software

    Warning: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you need to disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.

    I hope this helps! Let us know if you need more assistance.

Maybe you are looking for