Applescripts & automation tasks: Pages '09 + PDFs

I've been searching for an answer to this for quite some time. I've searched discussions and everything on all these mac forum websites...
Hopefully someone that has knowledge with automator or scripts or command line will have an answer for me...
I have an 80-some odd page pdf that contains a conflation of several organic chemistry lectures that were important throughout the semester. Due to the fact that I am a student, poor as can be, I cannot spend my money on Adobe acrobat (unless someone has $150-200 they would like to send me). If you've been in my situation before, _*you know don't have the time*_ to sit at your computer and copy, PAGE BY PAGE, the thumbnails in Preview.app into the said Pages.app or Word.app document (or .jpeg, png, etc...). I plan on using the 80-some page lecture (already in pdf form) as a background for each succeeding document page either in Pages.app or Word.app. This will make it extremely easy for me to free-write, annotate and make links within the document as I please.
Yes, I do realize that it is entirely possible to do some of these annotations in Preview.app but I assure you, this would be a lot easier to present or review if I could add these pdf pages as backgrounds in a pages/word.app document. I do not have the original powerpoints these came from.
(Oh, I apologize if I sound redundant; I'm just trying to articulate my issue by the best means possible to avoid confusion... even though - I'm sure I did)

I tested pdfsam-2.0.0 under 10.6.3.
The app evolved to version 2.2.0 but this version is not online at this time and only the very old 1.2.0 is reachable.
So I uploaded temporarily version 2.0 on my iDisk :
<http://public.me.com/koenigyvan>
Download :
pdfsam-2.0.0.app.dmg.zip
Under 10.5, look at :
http://gephi.org/users/install-java-6-mac-os-x-leopard/
to learn how to activate the required java 6 (but it would perhaps be easier to use the PDFLab app)
This app did its job flawlessly.
For me, the boring point was to understand the way to use the tool.
So, now that I was able to do, I will try to explain.
Of course,
step 1 : print or export the Pages document in a PDF file.
step 2 : create a folder in which will be stored the splitted pages.
step 3 : run pdfsam
step 4 : click the 'button' split
step 5 : click the button Add
navigate to the PDF file to split
step 6 : click the buttons _Choose a folder_ and Browse
navigate to the destination folder
step 7 : click the button Run
Let's do it .
When the task is finished, use this script :
--[SCRIPT pdfs2Pages]
Enregistrer le script en tant que Script : pdfs2Pages.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
menu Scripts > Numbers > pdfs2Pages
Naviguer jusqu'au dossier contenant les pages PDFs à insérer.
Il est également possible d'enregistrer le script sous forme de Progiciel (Application sous 10.6).
Dans ce cas il peut être activé par un double clic ou par glisser-déposé d'un dossier sur son icône.
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
--=====
Save the script as a Script: pdfs2Pages.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
menu Scripts > Numbers > pdfs2Pages
Navigate to the folder containing the PDFs pages to insert.
Alternatively, the script may be saved as an Application package (Application under 10.6).
In this case, it may be triggered by double click on by drag & drop of a folder on its icon.
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
--=====
Yvan KOENIG (VALLAURIS, France)
2010/04/19
--=====
on run
set dossier to choose folder "Choose a folder containing PDFs files"
my main(dossier)
end run
--=====
on open sel
my main(item 1 of sel as alias)
end open
--=====
on main(theFolder)
my activateGUIscripting()
set pagesDoc to my makeAnIworkDoc("Pages")
tell application "Finder"
open folder theFolder
set ref1 to a reference to window 1
tell ref1
set lesIcones to get items
repeat with i from 1 to count of lesIcones
if my getTypeId((item i of lesIcones) as alias) is "com.adobe.pdf" then
select item i of lesIcones
my copyPaste2Pages(pagesDoc)
end if
end repeat
end tell
end tell
end main
--=====
on copyPaste2Pages(d)
my shortcut("Finder", "c", "c") (* Copy *)
my shortcut("Pages", "v", "c") (* Paste *)
tell application "Pages" to tell document d to insert page break of body text
end copyPaste2Pages
--=====
on getTypeId(f)
set t_id to type identifier of (info for f)
return t_id
end getTypeId
--=====
Creates a new iWork document from the Blank template and returns its name.
example:
set myNewDoc to my makeAnIworkDoc(theApp)
on makeAnIworkDoc(theApp)
local t, n
if theApp is "Pages" then
set t to ((path to applications folder as text) & "iWork '09:Pages.app:Contents:Resources:Templates:Blank.template:") as alias
else if theApp is "Numbers" then
set t to ((path to applications folder as text) & "iWork '09:Numbers.app:Contents:Resources:Templates:Blank.nmbtemplate:") as alias
else
if my parleAnglais(theApp) then
error "The application “" & a & "“ is not accepted !"
else
error "l’application « " & a & " » n’est pas gérée !"
end if
end if
tell application theApp
set n to count of documents
open t
repeat
if (count of documents) > n then
exit repeat
else
delay 0.1
end if
end repeat
set n to name of document 1
end tell -- theApp
return n
end makeAnIworkDoc
--=====
on activateGUIscripting()
tell application "System Events"
if not (UI elements enabled) then set (UI elements enabled) to true (* to be sure than GUI scripting will be active *)
end tell
end activateGUIscripting
--=====
==== Uses GUIscripting ====
This handler may be used to 'type' text, invisible characters if the third parameter is an empty string.
It may be used to 'type' keyboard shortcuts if the third parameter describe the required modifier keys.
on shortcut(a, t, d)
local k
tell application a to activate
tell application "System Events" to tell application process a
set frontmost to true
try
t * 1
if d is "" then
key code t
else if d is "c" then
key code t using {command down}
else if d is "a" then
key code t using {option down}
else if d is "k" then
key code t using {control down}
else if d is "s" then
key code t using {shift down}
else if d is in {"ac", "ca"} then
key code t using {command down, option down}
else if d is in {"as", "sa"} then
key code t using {shift down, option down}
else if d is in {"sc", "cs"} then
key code t using {command down, shift down}
else if d is in {"kc", "ck"} then
key code t using {command down, control down}
else if d is in {"ks", "sk"} then
key code t using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
key code t using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
key code t using {command down, shift down, option down}
end if
on error
repeat with k in t
if d is "" then
keystroke (k as text)
else if d is "c" then
keystroke (k as text) using {command down}
else if d is "a" then
keystroke k using {option down}
else if d is "k" then
keystroke (k as text) using {control down}
else if d is "s" then
keystroke k using {shift down}
else if d is in {"ac", "ca"} then
keystroke (k as text) using {command down, option down}
else if d is in {"as", "sa"} then
keystroke (k as text) using {shift down, option down}
else if d is in {"sc", "cs"} then
keystroke (k as text) using {command down, shift down}
else if d is in {"kc", "ck"} then
keystroke (k as text) using {command down, control down}
else if d is in {"ks", "sk"} then
keystroke (k as text) using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
keystroke (k as text) using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
keystroke (k as text) using {command down, shift down, option down}
end if
end repeat
end try
end tell
end shortcut
--=====
--[/SCRIPT]
As with most of my scripts, explanations are given at the beginning in French then in English.
Yvan KOENIG (VALLAURIS, France) lundi 19 avril 2010 15:45:58

Similar Messages

  • How do I do Web Galleries in CS6? They used to be in automated tasks.

    How do I do a Web Gallery in CS6?
    They used to be in automated tasks.

    Hello there! You are going to want to do this in Bridge.
    To create your web gallery, follow these steps:
    Select your desired images and choose Window→Workspace→Output.You can also select Output from the Workspace shortcut menu in the top-right portion of the Application window. Finally, you can also click the Output to web or PDF in the Application bar. The Output panel appears.
    Click the web Gallery icon.
    Select a template from the pop-up menu.Presets, such as Filmstrip and Slideshow, are available. Photoshop will automatically select the Style, based on your chosen template.
    (Optional) To get an idea of what the template will look like, click the Refresh Preview button.You can also click Preview in Browser to see how your web gallery looks in your default web browser.
    Credit: ©iStockphoto.com/SAMI photo Image #4831034
    In the Site Info area, specify your desired site, gallery titles, and description. Also, enter your contact info and e-mail or web address, if desired. If you want everyone to know that your web gallery is copyrighted, tell them so.Be aware that putting an e-mail link on a web page invites spam. So, be sure to have your e-mail client’s spam filter on full bore if you plan to include your e-mail address.
    Specify the colors you want for your text, headers, menu, background, border, and controls in the Color Palette section.
    In the Appearance area, specify whether you want your web page to be laid out as scrolling, left-aligned, paginated, or a slide show.
    Select the size of your preview and thumbnails.
    In the Create Gallery section, click either Save to Disk or Upload.If you select Save to Disk, click Browse to navigate to the location where you want to save your web gallery files. Then, click Save.If you select Upload, enter the FTP server address, your username, your password, and the folder name. Then, click a second Upload button. If you’re unsure about this information, check with your ISP (Internet service provider).
    Helpful links with the above information:
    http://www.dummies.com/how-to/content/how-to-create-a-web-gallery-with-your-photoshop-cs.h tml
    Please let us know if you have any other questions-
    Janelle

  • Reinstalled Acrobat Pro 8.1.6 won't let me print web pages to PDFs

    I'm really ticked at Adobe's "help" in updating the program only to cause a lot of misery.  I'd read Acrobat had a security update, and got a constant reminder from Adobe update to install the available update.  I've been using Acrobat Pro 8.1.6 with absolutely no problems printing web pages to PDFs.  I installed the 8.1.7 update which immediately disabled Acrobat completely.  So I wasted a lot of time uninstalling Acrobat and reinstalling sequential versions to get back to 8.1.6.  Now I can't print web pages to a PDF.
    I had NOT done anything else to installed programs in the meantime, except that probably Norton has automatically updated antivirus files in the background.  I don't have any problems using Acrobat to open and print an existing PDF, or to create new PDFs from my scanner.  I can do a hardcopy print of a webpage by selecting my Brother printer.  From Word 2002 and Excel 2002, I can create a PDF by "printing" to Acrobat as usual.   The only problem is creating a PDF by "printing" a webpage by selecting Acrobat as the device from the list of available printers.  This problem happens both with Firefox and with Internet Explorer 7.
    I have Windows XP Pro SP3.  I did the most recent Windows Tuesday security update several days before messing around with Acrobat and did not have any problems printing PDF files from Firefox or IE7.  So, it seems like it's clearly an Adobe Acrobat problem.  I get the small box saying "Preparing to Print" which goes nowhere and then I have to use the Task Manager to get out of the loop.  That closes Firefox, and when I reopen Firefox, the same webpage comes up.

    I'm really ticked at Adobe's "help" in updating the program only to cause a lot of misery.  I'd read Acrobat had a security update, and got a constant reminder from Adobe update to install the available update.  I've been using Acrobat Pro 8.1.6 with absolutely no problems printing web pages to PDFs.  I installed the 8.1.7 update which immediately disabled Acrobat completely.  So I wasted a lot of time uninstalling Acrobat and reinstalling sequential versions to get back to 8.1.6.  Now I can't print web pages to a PDF.
    I had NOT done anything else to installed programs in the meantime, except that probably Norton has automatically updated antivirus files in the background.  I don't have any problems using Acrobat to open and print an existing PDF, or to create new PDFs from my scanner.  I can do a hardcopy print of a webpage by selecting my Brother printer.  From Word 2002 and Excel 2002, I can create a PDF by "printing" to Acrobat as usual.   The only problem is creating a PDF by "printing" a webpage by selecting Acrobat as the device from the list of available printers.  This problem happens both with Firefox and with Internet Explorer 7.
    I have Windows XP Pro SP3.  I did the most recent Windows Tuesday security update several days before messing around with Acrobat and did not have any problems printing PDF files from Firefox or IE7.  So, it seems like it's clearly an Adobe Acrobat problem.  I get the small box saying "Preparing to Print" which goes nowhere and then I have to use the Task Manager to get out of the loop.  That closes Firefox, and when I reopen Firefox, the same webpage comes up.

  • Are qt-tracks switchable per Applescript/Automator?

    my idea is the following scenario:
    I do have a Quicktime.mov containing TWO video tracks.
    What I'm looking for is a 'single button'-solution, which allows to switch between both tracks.
    possible? how?
    any ready-made scripts/actions avail?
    to give additional info about my project:
    I'm recording soccer games with two (... four) cameras simultanously.
    the team's coach needs a 'dumb' solution (no word about soccer-coaches! ) , to see the action from one or the other perspective.
    it's simple to stitch the two videos into a single mov, and I do know how to 'select tracks on display' in QT7pro.
    but he doesn't.
    my idea is, to create a (local, on usb-stick) website, offering that video. (and additional info)
    or, even better, a Pages/iBooks document .......
    plus a 'switch'-button, which is a kind-of applescript/automator action/whatever, which changes 'priority'. that way both videos are always in synch.-
    anybody any idea?
    thanks in advance
    k.

    I'm recording soccer games with two (... four) cameras simultanously.
    the team's coach needs a 'dumb' solution (no word about soccer-coaches! ) , to see the action from one or the other perspective.
    it's simple to stitch the two videos into a single mov, and I do know how to 'select tracks on display' in QT7pro.
    but he doesn't.
    Hi Karsten, it's been while since I last saw a posting by you here.
    Simplest approach would be to create a file containing side-by-side or over-and-under display of two angle cameras or a combination of the two to display four simultaneous camera angles. If you combine, align, and offset the video tracks in QT 7 Pro and then compress to your target diplay file, then the sync alignment of the source tracks will be locked in the combined frames of your final output file unlike individual source tracks each of which might drop frames independently during playback in a multiple video track standalone file. This, of course, means that all viwing angles are displayed simultaneously and the viewer must switch his or her attention to the specific angle of interest but does allow you to play the file in any compatible media player, on a web site or on any compatible mobile device without having to program track switching which may or may not be compatible will all of the viewing options previously mentioned.
    A second approach would be to key your video tracks to alternative language options and have the viewing angle (track) change when the associated language is selected. Unfortunately, this only works in apps/on devices which support built-in alternate languages and/or multiple video track control. For instance, it QT X and QT 7 will switch the video track when the appropriate language is selected but VLC has separate built-n video track switching controls and iTunes doesn't recognize alternative video tracks. Unfortunately, there is a secondary problem with this approach. Playback can sometimes become jittery after switching tacks. This problem can be correctly by momentarily stopping playback and then restarting it but this can be a pain.
    A third option might be the use of sprite buttons to script switching between tracks. Unfortunately, I can't say how difficult or successful this approach may be based on any personal experience.

  • How do I create an automator task to run TimeMachine at only certain hours?

    Hi
    In another forum it was suggested I make an Automator task for setting TimeMachine to only run at certain hours of the day.
    I've not used Automator in the past.
    I'd like to set it to run TimeMachine from only 1AM to 7 AM.
    Can anyone point me to a good source to figure out how to do this?  Or just share with me how to write the task?
    Thanks

    You might look at this program.
    TimeMachineEditor - Time Software - Free

  • Automated Tasks in Photoshop or using Adobe Bridge

    I have recently transfered to CS3 and am having problems using the automated tasks. Normally with CS2 i would select pictures in bridge and then hit the Tools-Photoshop-Image Processor to switch over a series of files from one format to another. When I try to do the same thing with CS3 nothing happens, the photoshop screen comes up empty and i do not get the image processor message. I would appreciate any advice. thanks
    R. Silveston
    ps: I am using a pc

    Try asking in the PS Elements forum.
    http://forums.adobe.com/community/photoshop_elements

  • Photoshop CC 2014   Bridge CC: automated tasks missing

    I Have downloaded the new Photoshop CC 2014 and updated to Bridge CC. I am no longer able to run automated tasks from Bridge in Photoshop because the "photoshop" submenu is no longer available under tools… unistalling en reinstalling brings no avail. I'm now back to Photoshop CS6 and Bridge CS6… I just would like to know: Am I doing something wrong or is this a bug that hopefully will soon get fixed?

    Please post queries regarding Adobe Bridge over at
    Bridge General Discussion

  • PC users cannot open my Pages-exported PDF documents

    Has anyone encountered this? When I want to give someone a PDF, I need to export it from Pages, choose "Open with Adobe Reader," and then re-save from Reader as a different name. (If I just export from Pages, some PC users cannot open it.) When I look at the file information for these two supposed PDFs, the one that's only exported from Pages says "Portable Document Format (PDF)" and the one opened and resaved with Reader says "Adobe PDF Document." What's going on here? Is there a reason my PC friends can't open a Pages-generated PDF?

    Thanks for the suggestions. Funny, when I changed the "Open With" selection inside the "File Info" box to tell it to use Reader, it it still tells me in the "General" information section that it's a "Portable Document Format (PDF)", but it does replace the "Preview" icon in the upper left with the Adobe logo. Only the version that I physically opened with Reader and re-saved lists the "Kind" of document as an "Adobe PDF Document". Wacky.
    Regarding the extension, when I exported from Pages, the "Hide Extension" box was unchecked in the "Save" window, yet the file's PDF extension is in fact hidden (and the "File Info" box also says it's hidden). What's up with that? Grr.
    Seems like a small bug--now I just have to get some PC-using friends to let me know which ones they can open! Thanks for your (tres rapide) help guys!

  • Project Server 2010 Task page - An unknown error has occurred

    Hi All,
    I have searched inside the forum for similar problems but i didn't find any solution.
    We have Project Server 2010 with December CU installed and
    we are
    experiencing
    a serious
    problem with two enterprise resources.
    They can login to pwa succesfully but when they enter in the Task page the following error is raised:
    An unknown error has occurred
    There are no errors reported in the event viewer while in the ULS Log I found only this entry but i don't know if it's related with this issue:
    Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them, but not before. Stack trace:
    at Microsoft.SharePoint.SPWeb.get_CurrentUser()
    at Microsoft.Office.Project.PWA.PJContext.get_RegionalSettings()
    at Microsoft.Office.Project.PWA.PJContext.get_LocaleCulture()
    at Microsoft.Office.Project.PWA.WCFContext.AuthenticateUser(Message message, WCFContext& wcfContext, String userName, Boolean isWindowsUser)
    at Microsoft.Office.Project.PWA.WCFContext.GetContext(Message message, String userName, Boolean isWindowsUser, Boolean newCookie, Uri originalTargetUri)
    at Microsoft.Office.Project.Server.ProjectServerRouter.Microsoft.Office.Project.Server.IProjectServerRouter.ProcessMessage(Message message)
    at SyncInvokeProcessMessage(Object , Object[] , Object[] )
    at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
    at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
    at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
    at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
    at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
    at System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
    at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
    at System.ServiceModel.Channels.InputQueue`1.AsyncQueueReader.Set(Item item)
    at System.ServiceModel.Channels.InputQueue`1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread)
    at System.ServiceModel.Channels.InputQueue`1.EnqueueAndDispatch(T item, ItemDequeuedCallback dequeuedCallback, Boolean canDispatchOnThisThread)
    at System.ServiceModel.Channels.InputQueueChannel`1.EnqueueAndDispatch(TDisposable item, ItemDequeuedCallback dequeuedCallback, Boolean canDispatchOnThisThread)
    at System.ServiceModel.Channels.SingletonChannelAcceptor`3.Enqueue(QueueItemType item, ItemDequeuedCallback dequeuedCallback, Boolean canDispatchOnThisThread)
    at System.ServiceModel.Channels.SingletonChannelAcceptor`3.Enqueue(QueueItemType item, ItemDequeuedCallback dequeuedCallback)
    at System.ServiceModel.Channels.HttpChannelListener.HttpContextReceived(HttpRequestContext context, ItemDequeuedCallback callback)
    at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
    at System.ServiceModel.PartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state)
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state)
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2()
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke()
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks()
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state)
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
    at System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
    at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
     It's not a task related errors because i have alredy done an analysis of the resorce's assignments.
    I have also verified IIS authentication settings as described in this
    post but all had been alredy correctly configured.
    We have a farm installation with two physical server:
    Application Server with Windows 2008 R2, SharePoint 2010 Enterprise, Project Server 2010
    Database Server with Windows 2008 R2 and SQL Server 2008 SP2
    Any help would be greatly appreciated!
    Thanks in advance.
    Raffaele

    Hi,
    I faced exactly the same problem: some resources try to connect to My Tasks, and get an Unknown error. No error message in ULS or Eventlog.
    I hope I solved the problem, and want to share the experience here.
    First, by reading this article,
    http://www.projectserverexperts.com/ProjectServerFAQKnowledgeBase/Unknown%20Error%20My%20Tasks%20Page.aspx: even if the SQL Query returns me no records, it gives me the idea to delete (unpublish) some tasks (i managed to identify some tasks which raised
    the problem, by assigning a test account on them, and see that the pb happened).
    So I decided to delete my project from the Published Database (and keep it in the Draft of course). Than in Project Pro, I opened and Published: the problem seem to be solved.
    I don't know the root cause of the pb: maybe some SQL data were corrupted for an unknown reason.
    Hope it could help some one ! Don't hesitate to give feedback if you solved this pb with this solution, or workaround.
    Sylvain

  • Spool List more than 99 pages to PDF File to Mail

    Hi All,
    I want to convert a big spool list (342 Pages) to PDF file to send it by e-mail.
    I use the following code to convert my spool to PDF file:
    Convert to PDF file*
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = w_spool_id
          no_dialog                = 'X'
          dst_device               = c_device
        IMPORTING
          pdf_bytecount            = gd_bytecount
        TABLES
          pdf                      = it_pdf_output
        EXCEPTIONS
          err_no_abap_spooljob     = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_destdevice       = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 9
          err_btcjob_submit_failed = 10
          err_btcjob_close_failed  = 11
          OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings*
      LOOP AT it_pdf_output.
        TRANSLATE   it_pdf_output           USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT  gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    The problem with the FM 'CONVERT_ABAPSPOOLJOB_2_PDF' is when my spool have more than 99 pages. In this case, the FM generate a backscreen job (sm37) to convert my spool and generate a binary PDF spool.
    After this step, the 'FM SO_DOCUMENT_SEND_API1' send an e-mail with the binary PDF File recovered in the spool list but i can't open the file with Adobe Reader because the format is wrong.
    Someone knows how could i convert my big spool list to PDF file to send it by e-mail adress ?
    Thanks a lot for your precious help that i need so much !

    Generate big spool list
    REPORT  ZGEN_SPOOL.
    tYPE-POOLS: slis.
    TYPES: BEGIN OF str_mara,
    matnr TYPE mara-matnr,
    ersda TYPE mara-ersda,
    ernam TYPE mara-ernam,
    laeda TYPE mara-laeda,
    aenam TYPE mara-aenam,
    vpsta TYPE mara-vpsta,
    END OF str_mara.
    DATA: i_mat TYPE TABLE OF str_mara,
    wa_mat LIKE LINE OF i_mat.
    DATA:params LIKE pri_params.
    DATA: days(1) TYPE n VALUE 2,
    valid TYPE c.
    DATA: obj TYPE REF TO cl_salv_table.
    SELECT matnr
    ersda
    ernam
    laeda
    aenam
    vpsta
    UP TO 4999 ROWS
    FROM mara INTO CORRESPONDING FIELDS OF TABLE i_mat.
    TRY.
    CALL METHOD cl_salv_table=>factory
    IMPORTING
    r_salv_table = obj
    CHANGING
    t_table = i_mat.
    CATCH cx_salv_msg .
    ENDTRY.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
    * destination = 'QAS'
    list_name = 'ZTEST_VERTEX'
    list_text = 'TEST'
    no_dialog = 'X'
    immediately = ' '
    expiration = days
    IMPORTING
    * OUT_ARCHIVE_PARAMETERS =
    out_parameters = params
    valid = valid
    * VALID_FOR_SPOOL_CREATION =
    EXCEPTIONS
    archive_info_not_found = 1
    invalid_print_params = 2
    invalid_archive_params = 3
    OTHERS = 4
    IF sy-subrc ne 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    TRY .
    NEW-PAGE PRINT ON PARAMETERS params NO DIALOG.
    CATCH cx_sy_nested_print_on .
    ENDTRY.
    CALL METHOD obj->display.
    NEW-PAGE PRINT OFF.

  • How to make Adobe acrobat feature to convert SAP  Pages to PDF available for multiple users connected to the same server

    We have installed Adobe Acrobat X Pro- English,Francais,Deutsch version 10.1.9 in our test environment and tried  testing it for converting SAP pages into PDF with a few pilot users. In doing so we faced a challenge, where only one user at a time can use Adobe Acrobat PRO to convert SAP pages in to PDF.As long as the first user who  is connected to Adobe Acrobat Pro via SAP isn’t logged off, other users connected to the same  server  are not being able to get the “Save As” dialog box to save the PDF in their preferred location.
    This is a business requirement and we need an urgent solution for the same. Can anyone help us in telling us if this is possible and if yes the how to go about?

    It's not something we deal with here, the LiveCycle products are a different world. Key points: Adobe LiveCycle is a range of products, some desktop, some server. LiveCycle PDF Generator is the one you should look at, it comes in 3 editions. License terms are by negotiation. Key management is via its Java API.

  • How to turn a doc designed for spread  into a page ordered pdf?

    I am a relative InDesign newbie, so please excuse my ignorance. I have document of installation instructions that is printed on a single double-sided piece of paper, which is then folded. So in InDesign, there are two layout spreads. The first one includes actual pages 2,3,4,5,6,7,8, and 9. The second one includes 10,11,12,13,14,15,16, and 1.
    After updating this I want to create both a spread version of the pdf for a printer, plus a regular page ordered pdf for web viewing. I am not clear on how to do this.
    I am using CS5.
    Thank you in advance for your help.

    There are two "pages". Not sure how they are referred to in InDesign, but when you look at the InDesign doc, you see two separate "pages", each one divided into 8 sections. There is also a third "page" which includes all the specs for the printer (it is in the spread version of the pdf, but is not printed and not included in the web version of the pdf).

  • How can I prevent Firefox from opening the file I create when I print a page with PDF Create! 5

    After I print a web page using PDF Create! 5, Firefox opens the file so i can view it. Before I print, I select print properties and disable "view resulting pdf". However, the file is always opened in Adobe Acrobat, although I believe I have Adobe Reader set as default. I do not want any file to open. This happens on my non-privileged accounts. On my privileged account, the file is not opened. I have removed Firefox profiles, re-installed Firefox, Reset Firefox in Help-Troubleshooting. PDF Create!5 print screen can only be viewed in a host program such as Firefox, Libre-office Writer, or any other program that prints. They do not open the file either.

    Thanks for your help. This is the Scansoft (Nuance) program. What I do not understand is why when I tell the print driver not to open the file with a privileged account, it obeys me. I am not sure where in the registry I would look for the information. I do not want to, but perhaps I should remove the Adobe Acrobat program (temporarily?) - then what would it do? Again, when I print from other programs - browsers, wordprocessors, etc - the file is not opened after printing, just with FireFox. I guess I can live with it, I have spent too much time already.

  • How can I create a link that allows users to convert a Wiki pages into PDF format.

    I am working on an enterprise Wiki library site collection, but I want to create a link named “Convert to PDF” , which allow users to convert the current Wiki into a pdf file. I need this link to be displayed some where in all the exsiting Wikis pages, and
    on any new wiki page. Can anyone advice if there is already such as capability within sharePoint 2013.
    Thanks

    Hi,
    For your requirement, we can add this link to the master page, then it will appear in the pages which apply this master page.
    To convert the current page to PDF, you can take consideration of using jsPDF.
    The links below with demos for your reference:
    http://parall.ax/products/jspdf
    Best regards
    Patrick Liang
    TechNet Community Support

  • Firefox is stumbling when pages with PDF content come up. how can i get my old version3.5.6 back?

    Question
    firefox is stumbling when pages with PDF content come up. how can i get my old version3.5.6 back?

    Thanks for your response Cor el, I'll try that the next time it happens, it's completely random. One moment it functions normally then suddenly it changes its mind.
    Restarting my pc usually brings it back to normal until next time.
    One thing I've noticed, but not 100% sure there's a connection here.....I edit my websites online and log into cpanel which opens new pages in separate tabs, as it should do. It seems that this problem occurs when I'm logged into cpanel...if i'm logged in then open a new tab for regular browsing of other sites then all links on those sites also open in new tabs.
    Ican't say for sure if it's always only happened when logged into cpanel, but certainly on the last 3 occasions.
    At the moment it's behaving normally so much I can do to check your suggestions, but will try them the next time it occurs.
    One other thing I forgot to mention too....since i've had the new firefox, I've noticed that when I log into yahoo and post comments, I often find myself having to log on for each new post. Everything was fine with old firefox and there have been no other changes to my pc .

Maybe you are looking for

  • How to change the language in smartform?

    hi how to change the language in smartform?

  • Does CTAS evaluate "order by" in APEX SQL Command window?

    I need to recreate my table in order to change the column order. When I use the SQL Commands window and run the SQL, it runs successfully, creates the new table, but doesn't reorder the columns. Is this expected behavior?

  • JWSDP and tomcat

    Hello, I am trying to install wsdp 1.5 on a machine with tomcat 5.0.28 and I am not successful. I was successful to install it with the provided tomcat version only. Can anyone please tell me if wsdp 1.5 works only with the provided version of tomcat

  • Grid size for Curves in PhotoShop CS

    I want to get back to the default grid size for Curves in PhotoShop CS. I accidentally changed it to a much smaller grid (100 squares) from its default grid size which I think was 16 squares. I don 't know what I did to change it, but I'd sure like t

  • SELECT-ELEMENT

    hi! I have a SELECT element in my html-file and i can't get the selected value from it in NETSCAPE. In Explorer everything goes fine with the code tha is beneath. I am a very beginner in this and do not know if there is a error in my code or should i