Re: Merging PDF pages

2023-08-28 Thread Chris Heidecker via use-livecode
Hi,

While applescript is still around, you could use this script. Works pretty well.

https://www.macscripter.net/t/applescript-objective-c-handler-to-merge-pdf-files/72534

Regards,
Chis Heidecker


use scripting additions
use framework "Foundation"
use framework "Quartz" -- required for PDF stuff

set inFiles to (choose file of type {"pdf"} with prompt "Choose your PDF 
files:" with multiple selections allowed)
set destPosixPath to POSIX path of (choose file name default name 
"Combined.pdf" with prompt "Save new PDF to:")
its combineFiles:inFiles savingTo:destPosixPath

on combineFiles:inFiles savingTo:destPosixPath
-- make URL of the first PDF
set inNSURL to current application's class "NSURL"'s fileURLWithPath:(POSIX 
path of item 1 of inFiles)
-- make PDF document from the URL
set theDoc to current application's PDFDocument's alloc()'s initWithURL:inNSURL
-- loop through the rest
set oldDocCount to theDoc's pageCount()
set inFiles to rest of inFiles
repeat with aFile in inFiles
-- make URL of the next PDF
set inNSURL to (current application's class "NSURL"'s fileURLWithPath:(POSIX 
path of aFile))
-- make PDF document from the URL
set newDoc to (current application's PDFDocument's alloc()'s 
initWithURL:inNSURL)
-- loop through, moving pages
set newDocCount to newDoc's pageCount()
repeat with i from 1 to newDocCount
-- get page of old PDF
set thePDFPage to (newDoc's pageAtIndex:(i - 1)) -- zero-based indexes
-- insert the page
(theDoc's insertPage:thePDFPage atIndex:oldDocCount)
set oldDocCount to oldDocCount + 1
end repeat
end repeat
set outNSURL to current application's class "NSURL"'s 
fileURLWithPath:destPosixPath
-- save the new PDF
(theDoc's writeToURL:outNSURL)
end combineFiles:savingTo:



> Op 25 aug. 2023, om 23:15 heeft Eller, Roger via use-livecode 
>  het volgende geschreven:
> 
> Thank you for this and all the details, Matthias.  I will give it a try.
> 
> 
> ~Roger
> 
> ________
> From: use-livecode  on behalf of 
> matthias rebbe via use-livecode 
> Sent: Friday, August 25, 2023 2:16 PM
> To: How to use LiveCode 
> Cc: matthias_livecode_150...@m-r-d.de 
> Subject: Re: Merging PDF pages
> 
> 
> CAUTION: This email originated from outside of the organization. Do not click 
> links or open attachments unless you recognize the sender and know the 
> content is safe.
> 
> 
> 
> Just noticed that my steps are missing something.
> So here's version 2 of it.
> 
> 1. download
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pdflabs.com%2Ftools%2Fpdftk-the-pdf-toolkit%2Fpdftk_server-2.02-mac_osx-10.11-setup.pkg&data=05%7C01%7Croger.e.eller%40sealedair.com%7Ce1d5200433404eec54d008dba59780d1%7C2691a2514c384643af0b0c0982f197bd%7C0%7C0%7C638285842350859203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tEXnKnbF7xT3GjOMoYKIiM%2Fv3JwkS7pzKRM3op80KMI%3D&reserved=0<https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg>
> 
> 2. to extract the pkg run the following in Terminal
> pkgutil --expand   
> 
> If the source path to the pkg contains spaces then put quotes around the path.
> 
> 3. Now open the destination path to which you've extracted the .pkg. There 
> should be another pkg pdftk.pkg
> 
> 4. right click the file pdftk.pkg  and select "show package content"
> 
> 5. Now you should see a file payload. Right click that file and select "open 
> with" and select the archive utility to decompress the file payload.
> 
> 6. After extraction you'll find a new folder "Payload 2"
> 
> 7. open that folder. In that folder you will find the Lib and Bin folder. 
> Copy those folder to another location.
> 
> Now in LC you can use shell shell function to call the pdftk
> 
> Example
> set the folder to "path to the bin folder"
> 
> put shell("./pdftk  file1.pdf file2.pdf file3.pdf cat output mynewfile.pdf")
> 
> 
> would create combine the three file..pdf file into a new one called 
> mynewfile.pdf
> 
> To use pdftk server in your standalone  you just have to include both folders 
> in your standalone.
> 
> 
> On Windows you first have to run the setup of pdftk server. During the 
> installation you can select the folder where pdftk server shall be installed. 
> You then can copy the bin folder from that installation folder
> and use it with your standalone on any other computer without the need to run 
> the setup on that computer.
> 
> 
> 
> 
>> Am 25.08.2023 um 17:00 schrieb matthias rebbe 

Re: Merging PDF pages

2023-08-26 Thread doc hawk via use-livecode
richard reasoned

be aware that you will lose one the most valuable things about a PDF
document: the embedded text layer.


Oh, no, there’s something more valuable, which you also lose:  anything
over 72 dpi!

I played with a pdf library for python for a bit, as well as raw pdf,
without much luck.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Merging PDF pages

2023-08-25 Thread Eller, Roger via use-livecode
Thank you for this and all the details, Matthias.  I will give it a try.


~Roger


From: use-livecode  on behalf of 
matthias rebbe via use-livecode 
Sent: Friday, August 25, 2023 2:16 PM
To: How to use LiveCode 
Cc: matthias_livecode_150...@m-r-d.de 
Subject: Re: Merging PDF pages


CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.



Just noticed that my steps are missing something.
So here's version 2 of it.

1. download
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pdflabs.com%2Ftools%2Fpdftk-the-pdf-toolkit%2Fpdftk_server-2.02-mac_osx-10.11-setup.pkg&data=05%7C01%7Croger.e.eller%40sealedair.com%7Ce1d5200433404eec54d008dba59780d1%7C2691a2514c384643af0b0c0982f197bd%7C0%7C0%7C638285842350859203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tEXnKnbF7xT3GjOMoYKIiM%2Fv3JwkS7pzKRM3op80KMI%3D&reserved=0<https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg>

2. to extract the pkg run the following in Terminal
pkgutil --expand   

If the source path to the pkg contains spaces then put quotes around the path.

3. Now open the destination path to which you've extracted the .pkg. There 
should be another pkg pdftk.pkg

4. right click the file pdftk.pkg  and select "show package content"

5. Now you should see a file payload. Right click that file and select "open 
with" and select the archive utility to decompress the file payload.

6. After extraction you'll find a new folder "Payload 2"

7. open that folder. In that folder you will find the Lib and Bin folder. Copy 
those folder to another location.

Now in LC you can use shell shell function to call the pdftk

Example
set the folder to "path to the bin folder"

put shell("./pdftk  file1.pdf file2.pdf file3.pdf cat output mynewfile.pdf")


would create combine the three file..pdf file into a new one called 
mynewfile.pdf

To use pdftk server in your standalone  you just have to include both folders 
in your standalone.


On Windows you first have to run the setup of pdftk server. During the 
installation you can select the folder where pdftk server shall be installed. 
You then can copy the bin folder from that installation folder
and use it with your standalone on any other computer without the need to run 
the setup on that computer.




> Am 25.08.2023 um 17:00 schrieb matthias rebbe via use-livecode 
> :
>
> On which OS are you planning to do this?
>
> On Windows and macOS you could make use of PDFTK server from PDFLabs.com 
> <https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpdflabs.com%2F&data=05%7C01%7Croger.e.eller%40sealedair.com%7Ce1d5200433404eec54d008dba59780d1%7C2691a2514c384643af0b0c0982f197bd%7C0%7C0%7C638285842350859203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2KHRMuPPbThuEdstyMStYxuVIocIbRsA9yaSB%2Fw%2F7dI%3D&reserved=0<http://pdflabs.com/>>
>
> On macOS  PDFTK Server normally  has to be installed to use it. But you could 
> follow these steps here to get it working w/o installation.
>
> 1. Do not use the d/l link for pdftk Server from the pdfLabs website. That 
> version will not work on macOS11 and up. Instead download this version of 
> PDFTK Server. Sid Steward created a new version but did not update the d/l 
> link
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pdflabs.com%2Ftools%2Fpdftk-the-pdf-toolkit%2Fpdftk_server-2.02-mac_osx-10.11-setup.pkg&data=05%7C01%7Croger.e.eller%40sealedair.com%7Ce1d5200433404eec54d008dba59780d1%7C2691a2514c384643af0b0c0982f197bd%7C0%7C0%7C638285842351015442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=S5yjsFoOrBWQY%2FKUhQbD6WZxAzuRiBOK6Yrval2H1Q4%3D&reserved=0<https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg>
>
> 2. to extract the pkg run the following in Terminal
> pkgutil --expand   
>
> If the source path to the pkg contains spaces then put quotes around the path.
>
> After extraction you'll find the 2 folders lib and bin and some others .The 2 
> mentioned ones are needed.
>
> Now in LC you can use shell shell function to call the pdftk
>
> Example
> set the folder to "path to the bin folder"
>
> put shell("./pdftk  file1.pdf file2.pdf file3.pdf cat output mynewfile.pdf")
>
>
> would create combine the three file..pdf file into a new one called 
> mynewfile.pdf
>
>
> I wrote this in a hurry, so i might have some error in my explanation. Just 
&

Re: Merging PDF pages

2023-08-25 Thread matthias rebbe via use-livecode
Just noticed that my steps are missing something.
So here's version 2 of it.

1. download
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg

2. to extract the pkg run the following in Terminal
pkgutil --expand   

If the source path to the pkg contains spaces then put quotes around the path.

3. Now open the destination path to which you've extracted the .pkg. There 
should be another pkg pdftk.pkg

4. right click the file pdftk.pkg  and select "show package content"

5. Now you should see a file payload. Right click that file and select "open 
with" and select the archive utility to decompress the file payload.

6. After extraction you'll find a new folder "Payload 2"

7. open that folder. In that folder you will find the Lib and Bin folder. Copy 
those folder to another location.

Now in LC you can use shell shell function to call the pdftk

Example
set the folder to "path to the bin folder"

put shell("./pdftk  file1.pdf file2.pdf file3.pdf cat output mynewfile.pdf")


would create combine the three file..pdf file into a new one called 
mynewfile.pdf

To use pdftk server in your standalone  you just have to include both folders 
in your standalone.


On Windows you first have to run the setup of pdftk server. During the 
installation you can select the folder where pdftk server shall be installed. 
You then can copy the bin folder from that installation folder
and use it with your standalone on any other computer without the need to run 
the setup on that computer.




> Am 25.08.2023 um 17:00 schrieb matthias rebbe via use-livecode 
> :
> 
> On which OS are you planning to do this?
> 
> On Windows and macOS you could make use of PDFTK server from PDFLabs.com 
> 
> 
> On macOS  PDFTK Server normally  has to be installed to use it. But you could 
> follow these steps here to get it working w/o installation.
> 
> 1. Do not use the d/l link for pdftk Server from the pdfLabs website. That 
> version will not work on macOS11 and up. Instead download this version of 
> PDFTK Server. Sid Steward created a new version but did not update the d/l 
> link
> https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg
> 
> 2. to extract the pkg run the following in Terminal
> pkgutil --expand   
> 
> If the source path to the pkg contains spaces then put quotes around the path.
> 
> After extraction you'll find the 2 folders lib and bin and some others .The 2 
> mentioned ones are needed. 
> 
> Now in LC you can use shell shell function to call the pdftk
> 
> Example
> set the folder to "path to the bin folder"
> 
> put shell("./pdftk  file1.pdf file2.pdf file3.pdf cat output mynewfile.pdf")
> 
> 
> would create combine the three file..pdf file into a new one called 
> mynewfile.pdf
> 
> 
> I wrote this in a hurry, so i might have some error in my explanation. Just 
> ask, if you have problems.
> 
> Regards,
> 
> Matthias
> 
>> Am 25.08.2023 um 15:10 schrieb Eller, Roger via use-livecode 
>> :
>> 
>> It's been a while since I've posted a question here.  Is it possible to use 
>> livecode script to merge multiple 1-page PDFs into a multipage PDF without 
>> using Acrobat or other 3rd party software?
>> 
>> Thanks.
>> 
>> ~Roger
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Merging PDF pages

2023-08-25 Thread matthias rebbe via use-livecode
On which OS are you planning to do this?

On Windows and macOS you could make use of PDFTK server from PDFLabs.com 


On macOS  PDFTK Server normally  has to be installed to use it. But you could 
follow these steps here to get it working w/o installation.

1. Do not use the d/l link for pdftk Server from the pdfLabs website. That 
version will not work on macOS11 and up. Instead download this version of PDFTK 
Server. Sid Steward created a new version but did not update the d/l link
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg

2. to extract the pkg run the following in Terminal
pkgutil --expand   

If the source path to the pkg contains spaces then put quotes around the path.

After extraction you'll find the 2 folders lib and bin and some others .The 2 
mentioned ones are needed. 

Now in LC you can use shell shell function to call the pdftk

Example
set the folder to "path to the bin folder"

put shell("./pdftk  file1.pdf file2.pdf file3.pdf cat output mynewfile.pdf")


would create combine the three file..pdf file into a new one called 
mynewfile.pdf


I wrote this in a hurry, so i might have some error in my explanation. Just 
ask, if you have problems.

Regards,

Matthias

> Am 25.08.2023 um 15:10 schrieb Eller, Roger via use-livecode 
> :
> 
> It's been a while since I've posted a question here.  Is it possible to use 
> livecode script to merge multiple 1-page PDFs into a multipage PDF without 
> using Acrobat or other 3rd party software?
> 
> Thanks.
> 
> ~Roger
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Merging PDF pages

2023-08-25 Thread panagiotis m via use-livecode
Hello all,

There is a built-in utility on MacOS for merging PDFs. You can call it from
"shell", as Paul suggested.

This seems to work - tested on MacOS Mojave. It merges "test1.pdf" and
"test2.pdf" into "merged.pdf" on Desktop.
Just check that the path of tApp actually exists in modern MacOS as well.

on mouseUp pButtonNumber
   local tShell, tApp
   put quote & "/System/Library/Automator/Combine PDF
Pages.action/Contents/Resources/join.py" & quote \
 into tApp
   put tApp && "-o ~/Desktop/merged.pdf ~/Desktop/test1.pdf
~/Desktop/test2.pdf" \
 into tShell
   get shell(tShell)
end mouseUp

Cheers,
Panos
--

On Fri, 25 Aug 2023 at 17:23, Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:

> The short answer is NO. There is nothing built into Livecode to take a
> set fo existing PDF files and append them to create a readable PDF that
> is them all stitched together. Neither the XPDF external nor the PDF
> widget will do this.
>
> You best option is to use some 3rd party command line utility that will
> merge PDF files that works on the platform or platforms your want to do
> this on and use the Livecode shell() function to call that command line
> utility.
>
> If this is going to be a distributed standalone, you can actually read
> the utility as a binary file and compress it as a staved property in
> your application, that can uncompress and install it on any target
> computer.
>
> We do this with the popular free open-source video tool ffmpeg for macOS
> and WIndows. Our app install it if needed on the target computer from a
> compressed copy bundled into our app and we use SHELL() to call it to do
> several video operations that can't be done in Livecode.
>
> Paul Dupuis
> Researchware
>
>
>
> On 8/25/2023 9:10 AM, Eller, Roger via use-livecode wrote:
> > It's been a while since I've posted a question here.  Is it possible to
> use livecode script to merge multiple 1-page PDFs into a multipage PDF
> without using Acrobat or other 3rd party software?
> >
> > Thanks.
> >
> > ~Roger
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Merging PDF pages

2023-08-25 Thread Paul Dupuis via use-livecode
The short answer is NO. There is nothing built into Livecode to take a 
set fo existing PDF files and append them to create a readable PDF that 
is them all stitched together. Neither the XPDF external nor the PDF 
widget will do this.


You best option is to use some 3rd party command line utility that will 
merge PDF files that works on the platform or platforms your want to do 
this on and use the Livecode shell() function to call that command line 
utility.


If this is going to be a distributed standalone, you can actually read 
the utility as a binary file and compress it as a staved property in 
your application, that can uncompress and install it on any target computer.


We do this with the popular free open-source video tool ffmpeg for macOS 
and WIndows. Our app install it if needed on the target computer from a 
compressed copy bundled into our app and we use SHELL() to call it to do 
several video operations that can't be done in Livecode.


Paul Dupuis
Researchware



On 8/25/2023 9:10 AM, Eller, Roger via use-livecode wrote:

It's been a while since I've posted a question here.  Is it possible to use 
livecode script to merge multiple 1-page PDFs into a multipage PDF without 
using Acrobat or other 3rd party software?

Thanks.

~Roger


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Merging PDF pages

2023-08-25 Thread Craig Newman via use-livecode
Richmond.

Did I mention this was a bit clunky?

Craig

> On Aug 25, 2023, at 9:39 AM, Craig Newman via use-livecode 
>  wrote:
> 
> Hmmm.
> 
> Rereading, did you want to be able to collect existing pdf documents, read 
> them, and then output a single new PDF?   If so, I guess you can import those 
> documents as images on successive cards, and do what I posted earlier.
> 
> Seems clunky, but then you are asking LC to do something clunky.
> 
> Craig
> 
>> On Aug 25, 2023, at 9:33 AM, Craig Newman via use-livecode 
>>  wrote:
>> 
>> Hi.
>> 
>> Sure. Try this in a button on card 1 of a new stack with, say, three cards:
>> 
>> on mouseUp
>> 
>> get the desktop folder
>> 
>> open printing to pdf it & "/" & “yourNamehere" & ".pdf"
>> 
>> repeat with x = 1 to 3
>> 
>> print card x
>> 
>> end repeat
>> 
>> close printing
>> 
>> end mouseUp
>> 
>> 
>> 
>> And I wonder if the new pdf widget has that built in.
>> 
>> 
>> 
>> Craig
>> 
>> 
>>> On Aug 25, 2023, at 9:10 AM, Eller, Roger via use-livecode 
>>>  wrote:
>>> 
>>> It's been a while since I've posted a question here.  Is it possible to use 
>>> livecode script to merge multiple 1-page PDFs into a multipage PDF without 
>>> using Acrobat or other 3rd party software?
>>> 
>>> Thanks.
>>> 
>>> ~Roger
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Merging PDF pages

2023-08-25 Thread Richmond Mathewson via use-livecode
Humph . . . importing documents at images and then knitting them 
together . . . be aware that you will lose one the most valuable things 
about a PDF document: the embedded text layer.


Richmond.

On 25.08.23 16:39, Craig Newman via use-livecode wrote:

Hmmm.

Rereading, did you want to be able to collect existing pdf documents, read 
them, and then output a single new PDF?   If so, I guess you can import those 
documents as images on successive cards, and do what I posted earlier.

Seems clunky, but then you are asking LC to do something clunky.

Craig


On Aug 25, 2023, at 9:33 AM, Craig Newman via use-livecode 
 wrote:

Hi.

Sure. Try this in a button on card 1 of a new stack with, say, three cards:

on mouseUp

get the desktop folder

open printing to pdf it & "/" & “yourNamehere" & ".pdf"

repeat with x = 1 to 3

print card x

end repeat

close printing

end mouseUp



And I wonder if the new pdf widget has that built in.



Craig



On Aug 25, 2023, at 9:10 AM, Eller, Roger via use-livecode 
 wrote:

It's been a while since I've posted a question here.  Is it possible to use 
livecode script to merge multiple 1-page PDFs into a multipage PDF without 
using Acrobat or other 3rd party software?

Thanks.

~Roger


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Merging PDF pages

2023-08-25 Thread Craig Newman via use-livecode
Hmmm.

Rereading, did you want to be able to collect existing pdf documents, read 
them, and then output a single new PDF?   If so, I guess you can import those 
documents as images on successive cards, and do what I posted earlier.

Seems clunky, but then you are asking LC to do something clunky.

Craig

> On Aug 25, 2023, at 9:33 AM, Craig Newman via use-livecode 
>  wrote:
> 
> Hi.
> 
> Sure. Try this in a button on card 1 of a new stack with, say, three cards:
> 
> on mouseUp
> 
> get the desktop folder
> 
> open printing to pdf it & "/" & “yourNamehere" & ".pdf"
> 
> repeat with x = 1 to 3
> 
> print card x
> 
> end repeat
> 
> close printing
> 
> end mouseUp
> 
> 
> 
> And I wonder if the new pdf widget has that built in.
> 
> 
> 
> Craig
> 
> 
>> On Aug 25, 2023, at 9:10 AM, Eller, Roger via use-livecode 
>>  wrote:
>> 
>> It's been a while since I've posted a question here.  Is it possible to use 
>> livecode script to merge multiple 1-page PDFs into a multipage PDF without 
>> using Acrobat or other 3rd party software?
>> 
>> Thanks.
>> 
>> ~Roger
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Merging PDF pages

2023-08-25 Thread Craig Newman via use-livecode
Hi.

Sure. Try this in a button on card 1 of a new stack with, say, three cards:

on mouseUp

get the desktop folder

open printing to pdf it & "/" & “yourNamehere" & ".pdf"

repeat with x = 1 to 3

print card x

end repeat

close printing

end mouseUp



And I wonder if the new pdf widget has that built in.



Craig


> On Aug 25, 2023, at 9:10 AM, Eller, Roger via use-livecode 
>  wrote:
> 
> It's been a while since I've posted a question here.  Is it possible to use 
> livecode script to merge multiple 1-page PDFs into a multipage PDF without 
> using Acrobat or other 3rd party software?
> 
> Thanks.
> 
> ~Roger
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode