• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Creating Selection PDF

Explorer ,
May 30, 2018 May 30, 2018

Copy link to clipboard

Copied

Hi,

I'm using Adobe InDesign CC 2017.

In an InDesign page, there are 'boxes/tables' and 'packages', I want only the 'selected item' on the page to be exported as PDF, so that i can get PDF of that selected item rather than entire page as PDF.

Thanks

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

It can be done in Illustrator, not in InDesign. Put it in ID in a Library, use it in AI and do it from there.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

I agree with Willi. I take objects back and forth through the library when I need them.

You can also just drag and drop the object from InDesign into Illustrator. I've had success doing this before as well.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

In the Layers panel, turn off the visibility of all the objects you don't want to export.

Then Export to PDF using Compatibility of Acrobat 5 (before Layers were available in Acrobat).

Only the visible object will be included in the PDF.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Two other choices (available if you have Acrobat):

  • Make a selection in InDesign.
    Edit: Be sure to Copy your selection so it is on the Clipboard
    In Acrobat, choose File > Create > PDF from Clipboard. This will keep live text.

  • In Acrobat: File > Create > PDF from Selection Capture.
    Make a selection in InDesign. This will make a picture of what you select.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Hi Jane,

good advice. But: What kind of PDF do we get with that?
There is no preset we can chose.

If we want a "controlled" PDF with a specific InDesign PDF Export Preset we'd need a script for this task.

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Hi Uwe:

With that in mind, yet another alternative would be to export the page to PDF (and select your preset) and then crop the page in Adobe Acrobat.

Whzzman, which preset/job options you use depends on what you are doing with the PDF. What are you going to do with that PDF?

~Barb

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Hi Barb,

oh yes, but do not forget to hide all other not selected objects on the spread.

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

I would recommend the following workflow:

1. Copy the selected items

2. Select All

3. Make every item on the active spread invisible.

4. Paste In Place the copied items

Export the spread ( if selected items cross the spine ) or the page to PDF/X-4 with no downsampling of images and no color conversion keeping transparency intact.

Do a new InDesign document, place the PDF with option BoundingBox on an InDesign page, change the page size to the size of the placed PDF and export again.

No Acrobat Pro DC needed.

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Hi Uwe,

There is a sample plugin in the SDK that prints the selected items.

P.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2018 Jun 01, 2018

Copy link to clipboard

Copied

Hi Pickory,

that's for CC 2018.1, isn't it?


Have to check scripting DOM if there is a new property for PDF export that will exactly allow this.

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 01, 2018 Jun 01, 2018

Copy link to clipboard

Copied

Hello Uwe,

Nothing in the DOM, its a sample plugin. If there was demand I would be quite happy to build it.

P.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2018 Jun 01, 2018

Copy link to clipboard

Copied

Hi Pickory,

please hold back!*

( But thank you very much for the offer! )

In scripting I found a way ( however this script is not written yet ).

It is analog to the description I gave in answer #11 above.

The only limitation is: The selected items have to be on a page and not on the pasteboard.

Regards,
Uwe

* If you can't hold back just do it. I think, there is demand. But if you do it, then do it for all CC versions ( including CS6 ).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 01, 2018 Jun 01, 2018

Copy link to clipboard

Copied

Hi Uwe and Rich,

Would be truly curious to take a look to the codes! … 

Best,

Michel, from FRIdNGE

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2018 Jun 01, 2018

Copy link to clipboard

Copied

Would be truly curious to take a look to the codes! … 

Try this AppleScript—OSX only. It's adapted from another script so I haven't tested it that much, but it seems to work:

(*  

    Rob Day 2015-2018  

    Exports a PDF from a selection of page items 

    *)

tell application "Adobe InDesign CC 2018"

    activate

    -------------------------------Dialog---------------------------------- 

   

    if (count documents) is equal to 0 then

        display dialog "Please open a document" buttons " OK " default button 1 with icon caution

        return -128

    end if

   

    if saved of active document is false then

        display dialog "Please save your document document" buttons " OK " default button 1 with icon caution

        return -128

    end if

   

    --gets the bounds of selected items 

    try

        set {aa, bb, cc, dd} to my getSelBounds(selection)

    on error

        return

    end try

   

    --PDF preset choice. 

    set myLabelWidth to 250

    set myDialog to make dialog with properties {name:"Export Selection as PDF"}

    tell myDialog

        tell (make dialog column)

            tell (make border panel)

                tell (make dialog column)

                    tell (make dialog row)

                        set PresertList to name of every PDF export preset of application "Adobe InDesign CC 2018"

                        make static text with properties {static label:"PDF Preset:"}

                        set myPDFPresetDropdown to make dropdown with properties {string list:PresertList, selected index:3, min width:myLabelWidth}

                    end tell

                   

                    --Crops Checkbox 

                    tell (make dialog row)

                        set myCropsCB to make checkbox control with properties {static label:"Include Marks", checked state:true, min width:myLabelWidth}

                    end tell

                   

                    --Open PDF 

                    tell (make dialog row)

                        set myOpenCB to make checkbox control with properties {static label:"Open Selection PDF", checked state:true, min width:myLabelWidth}

                    end tell

                end tell

            end tell

        end tell

    end tell

   

    --get the results 

    set myResult to show myDialog

    if myResult = true then

        --+1 gets the correct name because list starts at 0 

        set myPDFPreset to item ((selected index of myPDFPresetDropdown) + 1) of PresertList as item

        set usemarks to checked state of myCropsCB

        set openPDF to checked state of myOpenCB

    else

        return

    end if

    destroy myDialog

end tell

-------------------------------Set & Save Preferences---------------------------------- 

tell application "Adobe InDesign CC 2018"

   

    --the active document to impose and its doc prefs 

    set d to active document

    set dp to properties of document preferences of d

   

    --save application and doc view prefs 

    set appviewprefs to properties of view preferences

    set docviewprefs to properties of view preferences of d

   

    set properties of view preferences of d to {horizontal measurement units:points, vertical measurement units:points, ruler origin:spread origin}

    set properties of view preferences to {horizontal measurement units:points, vertical measurement units:points, ruler origin:spread origin}

   

   

    -------------------------------Make Selection Document---------------------------------- 

    set {aa, bb, cc, dd} to my getSelBounds(selection)

   

    copy

   

    --set the path for the selection PDF to the same folder as the ID file 

    set pth to file path of active document

    set nme to name of active document

    set nme to characters 1 thru -6 of nme as string

    set thePath to pth & nme & "-selection.pdf" as string

   

    --adjust doc prefs for new selection doc 

    set facing pages of dp to false

    set pages per document of dp to 1

   

    --make the selection doc and close. 

    set exportdoc to make new document with properties {CMYK policy:CMYK policy of d, RGB policy:RGB policy of d, after blending intent:after blending intent of d, solid color intent:solid color intent of d, RGB profile:RGB profile of d, accurate LAB spots:accurate LAB spots of d, document preferences:dp, view preferences:properties of view preferences of d, zero point:{0.0, 0.0}}

   

    -------------------------------Paste and Export---------------------------------- 

   

    --import page into the selection doc 

    tell exportdoc

       

        --adjust page width & height for the selection 

        set page width of document preferences to dd - bb

        set page height of document preferences to cc - aa

       

        tell application "Adobe InDesign CC 2018"

            paste

        end tell

       

        my exportPDF(exportdoc, thePath, myPDFPreset, usemarks)

        close saving no

    end tell

   

    ------------------------------- Reset Prefs ---------------------------------- 

   

    set properties of view preferences of d to docviewprefs

    set properties of view preferences to appviewprefs

   

    --trash temp files 

    tell application "Finder"

        if openPDF then

            open file thePath

        end if

    end tell

end tell

------------------------------- functions ---------------------------------- 

--get selection bounds 

on getSelBounds(s)

    tell application "Adobe InDesign CC 2018"

        try

            set {e, f, g, h} to visible bounds of item 1 of s

        on error

            display dialog "Please select a page item"

        end try

       

        repeat with x in s

            set {a, b, c, d} to visible bounds of x

            if a is less than e then

                set e to a

            end if

            if b is less than f then

                set f to b

            end if

            if c is greater than g then

                set g to c

            end if

            if d is greater than h then

                set h to d

            end if

        end repeat

    end tell

    return {e, f, g, h}

end getSelBounds

--export (doc, savepath, preset, usemarks?) 

on exportPDF(d, p, prst, m)

    tell application "Adobe InDesign CC 2018"

        set pset to properties of PDF export preset prst

        set properties of PDF export preferences to pset

        set properties of PDF export preferences to {page range:all pages, use document bleed with PDF:false, bleed marks:false, crop marks:m, view PDF:false, registration marks:false}

        export d format PDF type to p

    end tell

end exportPDF


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 01, 2018 Jun 01, 2018

Copy link to clipboard

Copied

Hi Rob,

Nice! …

2 years ago, I've written a script that did the same thing but for "Tables".

Not one selected table, but all the tables!

100 tables => 100 pdf !… 1 click of course!

Best,

Michel

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 02, 2018 Jun 02, 2018

Copy link to clipboard

Copied

Hi Rob,

your script is working!

Thank you very much for the code.

However it's clear that it lags one thing because of its visible bounds paradigm:

Effects like drop shadows are cut.

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 02, 2018 Jun 02, 2018

Copy link to clipboard

Copied

I see three strategies to overcome this shortfall:

0. Export the whole spread without all not selected items.

1. Open and render the PDF in PhotoShop and calculate the "bounding box" of all drawing pixels.

Take the results back to InDesign, change the size of the page based on the calculations and export that page.

One problem with that ( there might be others 😞 Textframes with text that should be exported and follow the baseline grid.

2. Place the exported PDF with bounding box option in a new InDesign document.

Change the size of the page according to the placed PDF and export again.

Problem with that: Interactive elements will be not there because of placing the PDF again.

3. Open the PDF from 0. in Acrobat Pro DC and set all PDF boxes to the "bounding box" of all drawing elements.

( Did not test this for most efficiency, there might be a Acrobat Pro PDF Preflight rule for that. )

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 02, 2018 Jun 02, 2018

Copy link to clipboard

Copied

There doesn't seem to be an easy way to do get an effect's bounds. I thought about checking if any of the selected items has an effect and calculate the offset via the effect's settings properties—the drop shadow settings has distance, offset, and angle. Too much work.

Before running the script you could include an empty frame to define the effect's bounds.

There is also a problem with the first script where the default margins might be a problem for small selections. I think this is a fix:

(*   Rob Day 2015-2018  

    Exports a PDF from a selection of page items  *)

tell application "Adobe InDesign CC 2018"

    activate

   

    -------------------------------Selection check----------------------------------

   

    if (count documents) is equal to 0 then

        display dialog "Please open a document" buttons " OK " default button 1 with icon caution

        return -128

    end if

   

    if saved of active document is false then

        display dialog "Please save your document document" buttons " OK " default button 1 with icon caution

        return -128

    end if

   

    try

        my getSelBounds(selection)

    on error

        return

    end try

   

   

    -------------------------------Dialog---------------------------------- 

   

    --PDF preset choice. 

    set myLabelWidth to 250

    set myDialog to make dialog with properties {name:"Export Selection as PDF"}

    tell myDialog

        tell (make dialog column)

            tell (make border panel)

                tell (make dialog column)

                    tell (make dialog row)

                        set PresertList to name of every PDF export preset of application "Adobe InDesign CC 2018"

                        make static text with properties {static label:"PDF Preset:"}

                        set myPDFPresetDropdown to make dropdown with properties {string list:PresertList, selected index:3, min width:myLabelWidth}

                    end tell

                   

                    --Crops Checkbox 

                    tell (make dialog row)

                        set myCropsCB to make checkbox control with properties {static label:"Include Marks", checked state:true, min width:myLabelWidth}

                    end tell

                   

                    --Open PDF 

                    tell (make dialog row)

                        set myOpenCB to make checkbox control with properties {static label:"Open Selection PDF", checked state:true, min width:myLabelWidth}

                    end tell

                end tell

            end tell

        end tell

    end tell

   

    --get the results 

    set myResult to show myDialog

    if myResult = true then

        --+1 gets the correct name because list starts at 0 

        set myPDFPreset to item ((selected index of myPDFPresetDropdown) + 1) of PresertList as item

        set usemarks to checked state of myCropsCB

        set openPDF to checked state of myOpenCB

    else

        return

    end if

    destroy myDialog

end tell

-------------------------------Set & Save Preferences---------------------------------- 

tell application "Adobe InDesign CC 2018"

    try

 

        set d to active document

      

       

        --save application and doc view prefs 

        set appviewprefs to properties of view preferences

        set docviewprefs to properties of view preferences of d

       

        --save the default document preset properties

        set defpre to item 1 of every document preset whose name is "[Default]"

        set defprop to properties of item 1 of defpre

       

        --use spread in case selection crosses the spine

        set properties of view preferences of d to {ruler origin:spread origin}

       

        --set the path for the selection PDF to the same folder as the ID file 

        set pth to file path of d

        set nme to name of d

        set nme to characters 1 thru -6 of nme as string

        set thePath to pth & nme & "-selection.pdf" as string

       

        --gets the selection bounds

        set {aa, bb, cc, dd} to my getSelBounds(selection)

       

        copy

       

        -------------------------------Make Selection Document---------------------------------- 

       

        --document setup (height, width, margin-top, margin-right, margin-bottom, margin-left, bleed, columns, facing?, num pages)

        my docSetup(cc - aa, dd - bb, 0, 0, 0, 0, 0, 1, false, 1)

       

        --make the selection doc.

        set exportdoc to make new document with properties {document preset:"[Default]", CMYK policy:CMYK policy of d, RGB policy:RGB policy of d, after blending intent:after blending intent of d, solid color intent:solid color intent of d, RGB profile:RGB profile of d, accurate LAB spots:accurate LAB spots of d, view preferences:properties of view preferences of d, zero point:{0.0, 0.0}}

       

       

        -------------------------------Export---------------------------------- 

       

        tell exportdoc

           

            --adjust page width & height for the selection (for some reason doc setup width and height doesn't always work)

            set page width of document preferences to dd - bb

            set page height of document preferences to cc - aa

           

            tell application "Adobe InDesign CC 2018"

                paste

            end tell

           

            my exportPDF(exportdoc, thePath, myPDFPreset, usemarks)

            close saving no

        end tell

       

        ------------------------------- Reset Prefs ---------------------------------- 

       

        set properties of view preferences of d to docviewprefs

        set properties of view preferences to appviewprefs

        set properties of item 1 of defpre to defprop

       

        --open PDF 

        tell application "Finder"

            if openPDF then

                open file thePath

            end if

        end tell

    on error

        --reset if there is an error

        set properties of view preferences of d to docviewprefs

        set properties of view preferences to appviewprefs

        set properties of item 1 of defpre to defprop

    end try

end tell

------------------------------- functions ---------------------------------- 

--get multi selection bounds 

on getSelBounds(s)

    tell application "Adobe InDesign CC 2018"

        try

            set {e, f, g, h} to visible bounds of item 1 of s

        on error

            display dialog "Please select a page item"

        end try

       

        repeat with x in s

            set {a, b, c, d} to visible bounds of x

            if a is less than e then

                set e to a

            end if

            if b is less than f then

                set f to b

            end if

            if c is greater than g then

                set g to c

            end if

            if d is greater than h then

                set h to d

            end if

        end repeat

    end tell

    return {e, f, g, h}

end getSelBounds

--export (doc, savepath, preset, usemarks?) 

on exportPDF(d, p, prst, m)

    tell application "Adobe InDesign CC 2018"

        set pset to properties of PDF export preset prst

        set properties of PDF export preferences to pset

        set properties of PDF export preferences to {page range:all pages, use document bleed with PDF:false, bleed marks:false, crop marks:m, view PDF:false, registration marks:false}

        export d format PDF type to p

    end tell

end exportPDF

--set the default preset for new doc (height, width, margin-top, margin-right, margin-bottom, margin-left, bleed, columns, facing?, num pages)

on docSetup(h, w, mt, mr, mb, ml, b, c, fp, tp)

    tell application "Adobe InDesign CC 2018"

        set properties of item 1 of every document preset whose name is "[Default]" to {document bleed bottom offset:b, document bleed uniform size:true, column count:c, bottom:mb, left:ml, right:mr, top:mt, pages per document:tp, page height:h, facing pages:fp, page width:w, start page number:1}

    end tell

end docSetup

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 02, 2018 Jun 02, 2018

Copy link to clipboard

Copied

Drawing a bounding box

Screen Shot 5.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

LATEST

Laubender  wrote

I see three strategies to overcome this shortfall:

0. Export the whole spread without all not selected items.

3. Open the PDF from 0. in Acrobat Pro DC and set all PDF boxes to the "bounding box" of all drawing elements.

( Did not test this for most efficiency, there might be a Acrobat Pro PDF Preflight rule for that. )

Hi together,

it took me a while to find the right single correction with Acrobat Pro DC, but now I am successful with the workflow outlined above.

Basically there is one correction that should work: Set page geometry boxes (based on page content).

However, there is one problem I could not solve. This option did not work:

Dimension based on: Shape of visible page content (including white areas)

Wheras this one did:

Dimension based on: Shape of visible page content (excluding white areas)

So I was able to create a fix that first is using the TrimBox and then the MediaBox.

SetPageGeometryBoxes-1.PNG

And this fix eventually can be used with a droplet.

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

This is a great way to do this! Super easy. Learned something new. Love it!

Thanks Jane!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

Just tested, this works even with a complicated set of text/image frames:

1) Open the layout and make the selection of the objects you want to export in InDesign

2)  In CC Libraries panel, choose a Library (or make a new one just for this), and lower left, click the + icon  ("Add Content")

3)  Add it as a Graphic. (Make sure the checkbox for Add Graphic is enabled) 

fb-addgraphic.png

4)  Switch to Illustrator and  create a new blank document

5)  Drag/drop INDD graphic from the Libraries panel over to the Illustrator doc. You'll see that the items/text aren't editable.

5a)  optional: Resized the artboard  to kiss fit the artwork, it that matters

6)  In Illustrator, File > Save As > PDF, choosing to View PDF after.

7) The graphic opens as a PDF in Acrobat, with editable text

AM

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

omg I like  Jane-e's  solution  better (Create PDF  from Clipboard). Brilliant!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2018 May 31, 2018

Copy link to clipboard

Copied

AnneMarie—Yours works, it's just more steps!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines