problem w / script to merge 2 PDF files
Hello
Is anyone please tell me what is the problem with my JavaScript?
var newDoc = app.newDoc (); create a new doc PDF
newDoc.insertPages ({nPage:-1, cPath: "/ c/doc1.pdf",}); Insert doc1.pdf
newDoc.insertPages ({nPage: newDoc.numPages, cPath: "/ c/doc2.pdf",}); Insert doc2.pdf
newDoc.saveAs ({cPath: "/ c/myNewDoc.pdf"}); Save the new doc
newDoc.closeDoc (true); close the doc
I fell on the batch processing of Adobe Pro 9.0 - he gave me the invalid argument type.
Undefined Doc.insertPages:13:Batch: Exec = > nPage parameter.
I'm trying to merge 2 PDF files using the Acrobat JavaScript Scripting Guide script sample, but it does not work for some reason any.
I can has merged the 2 PDF files manually, but not by script. I hope that in a script I can forced Adobe XFA forms that I created LCDesigner with the AcroForms. Merge AcroForms and XFA forms. I know that in manually may not merge. I wonder if it can it be done through JavaScript? The doc1 doc2 I have are regular AcroForms
Thank you 1 million for your help & suggestions
Trang
Hi Trang,
XFA forms (created in the LC Designer) and AcroForms (created in Acrobat) are completely different animals!
The XFA form is wrapped in a wrapper that runs in Acrobat/Reader. You cannot merge (AFAIK) an XFA form and a PDF (or AcroForm).
The best that you will achieve is to attach an XFA form into a PDF file.
Alternatively, you can group the XFA and PDF forms in a portfolio.
Good luck
Niall
Tags: Adobe LiveCycle
Similar Questions
-
I'm looking for an effective way merge two PDF files: one with all the odd pages scanned a book, one with all even-numbered pages. This question has been posted several times in many different forums. I am unable to get the Javascript code that is given in the following forum to work. https://forums.adobe.com/thread/286654. Generally, the responses to this question are not useful for me because 1) they provide instructions that apply to an older version of Adobe (I use Adobe Acrobat Pro DC), or 2) they involve software purchase that I found to be ineffective. One post step by step to complete code that can do bonded labor and be registered as a custom through the command Wizard command (see the post from 11:27 January 13, 2016 to https://forums.adobe.com/thread/2063936, for an example of a good response to a different question) would be much appreciated. Thank you, Carl
You can use a large part of the script that was posted in the other thread and create a personalized out of it. In fact, it makes the script easier to understand, because all the "stuff" that is about adding menus and elevate the rights of scripts is no longer necessary.
See here for instructions on how to create a custom in Acrobat DC command:
Create orders customized in Adobe Acrobat DC Pro - KHKonsulting LLC
Instead of the sample code of the blog post, you would use this (which is really just a copy & paste of the original script):
// create an array to use as the rect parameter in the browse for field var arRect = new Array(); arRect[0] = 0; arRect[1] = 0; arRect[2] = 0; arRect[3] = 0; // create a non-visible form field to use as a browse for field var f = this.addField("txtFilename", "text", this.numPages - 1, arRect); f.delay = true; f.fileSelect = true; f.delay = false; // user prompted to select file to collate the open document with app.alert("Select the PDF file to merge with") // open the browse for dialog f.browseForFileToSubmit(); var evenDocPath = f.value; var q = this.numPages; var t = app.thermometer; t.duration = q; t.begin(); // insert pages from selected document into open document for (var i = 0; i < q; i++) { var j = i * 2; this.insertPages(j, evenDocPath, i); t.value = i; t.text = 'Inserting page ' + (i + 1); } t.end(); // remove unused field this.removeField("txtFilename");
Given the instructions in my blog, you should be able to create this custom command and run it. To run it, the important part is that you load the 'weird' part of the document first, then launch the custom command and then select the item "same" document.
-
Problems with showing all text in pdf file
Hi all
I have this problem. When I download a pdf file on the Web site of our company as a link and then when I open the link, most of the text in the file is as symbols. The pdf file is a brochure and is exported from CorelDraw. The brochure consists of photos and text. For me, very important is to solve the problem, because most of our customers use Mozilla firefox and they must be able to see everything on the brochure.Thank you in advance.
Best wishes
Martina
Hello again, yes the development version of the pdf viewer addon is a snapshot at the beginning of what will go into future versions of firefox. so when the display problem is not obvious in the version of the pdf viewer dev, this means that no bug must be filed and the solution is already underway to enter in the next update of firefox.
I can't give you an exact date on what will be your problem in firefox, because without a real pdf taste it is not possible to know what bug caused the problem. However, according to the pdf.js developers a difficulty which is already present in the current version of the developer at least will make in firefox (scheduled for the end of April) 29.
you could test yourself if the problem is still present in firefox (beta) 28 or 29 (aurora) firefox: https://www.mozilla.org/firefox/channel/
-
Is there a package from Adobe for a single user who would allow me to merge/combine PDF files, convert PDF to Word and I would use echosign?
Hi mm12798893,
For all these features, please see the service pack Adobe PDF or Acrobat DC subscription.
See these KB doc for more information:
- FREQUENTLY ASKED QUESTIONS | Adobe PDF Pack
- Answers to some of the more frequently asked questions about Acrobat DC.
- Price | Export to Adobe PDF
https://www.Acrobat.com/en_US/landing/EXPORTPDF-pricing-b.html let us know if you need help.
Kind regards
Meenakshi
-
How to merge several pdf files into an editable word document?
How to merge several pdf files into an editable word document?
You will need either a subscription to the pack PDF to merge the files, then export to Word or you would need Adobe Acrobat (should not be confused with the free Adobe Acrobat Reader which can not do).
-
How to merge several PDF files into a PDF file?
How to merge several PDF files into a PDF file? for example, I've scanned 3 pages of the same document on my computer and they come up on top of the computer as a separate PDF files, but they are 3 pages that should be in the same PDF file?
Hi m.zaffar,
In order to combine the PDF you can subscribe to Adobe PDF to combine files of service https://cloud.acrobat.com/combinepdf
KB doc. for help Document Cloud Help | Adobe PDF package using.
Or
You can use the Acrobat free trial download Adobe Acrobat application | Acrobat Pro DC.
KB doc. using Acrobat help. Combine or merge files into a single PDF file.
Kind regards
Nicos
-
How to merge 2 PDF files on iPad
How to merge 2 PDF files on iPad?
Hi shanebrianmurphy,
Adobe PDF package (paid subscription service) offers the possibility to combine files.
Document help Cloud | With the help of Adobe PDF Pack
Alternatively, you can use Adobe Acrobat Pro (desktop app) to combine files.
However, the reader app on iPad/iPhone has no support in-app to combine/merge PDF files.
Sorry for the inconvenience.
-
Newbie question: how to merge two pdf files?
Hello, I have two PDF documents, and I'm putting one right in the middle of the other. Can someone guide me through this process? Thank you.
Hello
Please see the following link for information on how to merge PDF'.
Acrobat help. Combine or merge files into a single PDF file
Concerning
Sukrit diallo
-
How to integrate the police Segoe Script in a saved pdf file?
When I save a file .psd in .PDF (with Photoshop elements 12), two of the three fonts do appear fine in the .pdf file, but not the third (Segoe Script). I open the PDF with Adobe Reader XI.
How to integrate the police Segoe Script in the .pdf file? (Depending on the printer, it must be there.)
Thank you.
Yes you will not be able to use either the distorted text.
(these kinds of properties do not appear in this font)
If you want to tilt the text as it would be for the italicized text, you can use Image > transform > Skew.
-
How to solve the problem of the Image in any PDF file displayed in yellow
Hello
I am trying to display any PDF in Acrobat Reader, the image is shown in light yellow.
The following pdf is created by printing to a PDF from a Web page creator using IE.
I check this document on another machine with similar Spec (Windows 8.1 Pro) and the same version of Acrobat Reader, he appears as gray as expected.
Checked the same pdf on the computer having this problem using "FoxIt Reader", it appears as Normal (Gray).
The image is displayed in yellow
The image appears normal in FoxIt and PDF Xpansion Reader (grey)
I tried the following, but does not help:
1. edit > Preferences > accessibility > replace the colors in the Document (not help)
2. I have try and reset the default Windows color profile (not help)
We know what could cause this problem?
I also tried Acrobat Pro (the same problem).
Thank you.
With regard to the dat.
I think, I found the problem (after changing the following setting, it seems to solve the problem).
I re - open the PDF file with the problem and it works now.
-
Scripting inDesign: Generate a PDF file
Hello
I have a bug with my script. Everything is OK:
The script imports the xml file into my Indesign file and the new generated file (.indd) is correct...
But this script generates PDF files with only 2 pages.
You know the correct code to generate large PDF files?
This is my script:
var myTemplate is File.openDialog ("select a template");.
myFolder var is Folder.selectDialog ("choose a folder to treat");.
myDocs var = myFolder.getFiles ("*.xml");
for (i = 0; i < myDocs.length; i ++) {}
Open the template:
var newDoc = app.open (myTemplate);
Import XML:
var myXMLImportPreferences = newDoc.xmlImportPreferences;
myXMLImportPreferences.allowTransform = false;
myXMLImportPreferences.createLinkToXML = false;
myXMLImportPreferences.ignoreUnmatchedIncoming = false;
myXMLImportPreferences.importCALSTables = false;
myXMLImportPreferences.importTextIntoTables = false;
myXMLImportPreferences.importToSelected = false;
myXMLImportPreferences.removeUnmatchedExisting = true;
myXMLImportPreferences.ignoreWhitespace = true;
myXMLImportPreferences.repeatTextElements = true;
newDoc.importXML (myDocs [i]);
Add the additional document-specific treatment steps here
Save:
var NouveauNomFichier = myFolder.absoluteURI + ' / ' +. [i] myDocs name.replace (/ xml /, 'pdf');
app.activeDocument.exportFile (ExportFormat.pdfType, File (newFileName), false);
var NouveauNomFichier = myFolder.absoluteURI + ' / ' +. [i] myDocs name.replace (/ xml /, "indd");
newDoc.save (new file (newFileName));
app.activeDocument.close ();
}
Thank you
Hey!
Try to add before you export it in PDF format:
app.pdfExportPreferences.pageRange = PageRange.ALL_PAGES;
--
tomaxxi
-
Need a script for InDesing culture pdf files
Hello
I have over 200 pages pdf file. I need to place pages in InDesign, jump the 4 sides about 20mm in InDesign. I did place using the script. I need to crop all pages, including at - it a script for the same... ?
Thanks in advance.
Hello
You can try with the code below:
var myDoc = app.activeDocument; var myGraphics = myDoc.allGraphics; for (var a = 0; a
But make sure that your rule should be in mm.
This is Zanelli script to put pdf in Indesign.
Shonky
-
Problems with Firefox Beta Android and .pdf files
I read the local newspaper online, and individual pages are in the form of .pdf files. With the Firefox for Android beta by clicking on said ads downloadable file and automatically calls up the default PDF Reader which opens the page. Some recent changes in the beta just downloads the file. I then manually click to open it. Tried default compensation on Firefox and the Kindle app, force judgment both, all without result... suggestions?
Bob
the change has been made in firefox 25 - that's why you now see this behavior only in the beta version of firefox. the general release for firefox 25 is scheduled for next week.
I initially also thought to recommend the pdf.js - addon as an alternative, but I find it very slow on my android too. Unfortunately I don't know any other solution currently. -
How to merge 2 PDF files in 1 of my office?
I have 2 pdf files, what I am doing in 1 file.
You must have the PDF creation software to do this, such as Adobe Acrobat. Whoever you are, read their help files. If you do not, you can not do. Just a PDF reader won't do.
-
unexpected problem with links to URLS in PDF files
Hi all
I have some PDF documents that contain some URLS which once hovered over or clicked behaves as expected. I need to put these PDFs through our control software upstream which checks and corrects things and writes a new file. When the new PDF is displayed there more active links. I can not change the software to control upstream, but I just want to understand what is happening. Links in PDF files are not created manually in any program created (for example, Indesign) but are just to make links by Acrobat/Reader (because the 'create links option URL' are lit)-if I turn this option off the links in the original PDF work stoppage. In my tests some links still work in the new PDF but others do not, but I do not see why some would not. In addition, links in the new PDF files that worked often did not the first time you open the PDF but would be the second time that they were opened (once the program has been revived). All this is just weird!
The text in question is a selectable text in the PDF file (not converted to outlines or rasterised) and regularly works until the file is preflighted. But whether it is always selectable text in the new PDF why would not Acrobat/Reader displays links as usual. What could the preflight software may have which would spoil this process?
I'm just checking le files in Acrobat Pro 10.1.10 (Windows), 8.3.1 and on Mac 9.5.5.
Any suggestion is appreciated.
Thank you
Iain
Your software changes
[link removed by Moderator]
as a result of the
{pumvGohuk ~ lh} lyz2jv2 | r
You can see when you copy the text into the text editor.
Maybe you are looking for
-
Hello can I use this program in Slovakia? http://www.Apple.com/shop/iPhone/iPhone-upgrade-program
-
Firefox launches Zimbra Desktop for mailto links
Windows 7 Home Premium 64-bit Core 2 Duo Run Firefox 26. Installed Zimbra Desktop Email client, when I click on mailto links, it offers only Yahoo and Gmail. In IE and other programs Zimbra launches when I use these programs messaging features. Zimbr
-
Lenovo Thinkpad x 201 display problem
OK so I probably never have the strangest problem with this laptop, so the problem started when the screen no longer works correctly and would work only at a certain angle or when you apply slight pressure on a certain part of the screen, the correct
-
I use a program called Dragon speaking naturally and sometimes it needs to be repaired. As at the moment and I can't am hoping that someone knows more that I know, which is quite likely. The program will say, the InstallShield Wizard completed and I
-
Since the client netframe4 download my system crashes. I tried to repair and reinstall but still keeps happening. Under XP and Norton internet security 2012. All installed uppdates. Of course simple answer is to take it but I have an application t