Question
How to fast copy PDF to ai file?
I just want to duplicate PDF contents into a new layer of an AI file? So how to fast copy? Now I have to open the PDF file and copy pageItems one by one:
var firstLayer = docSrc.activeLayer;
var newLayer = docDest.layers.add();
if (firstLayer.pageItems.length > 0) {
for (var i = firstLayer.pageItems.length - 1; i >= 0; i--) {
var item = firstLayer.pageItems[i];
item.duplicate(newLayer, ElementPlacement.PLACEATBEGINNING);
}
}
