I have tried to load a pdf file as a binary file and then save it as binary and the resulting saved file is not able to be opened by anything.
I have successfully done this with almost all other binary file types without incident.
How does one load a pdf file (not to show it, just to load it), process it (I already can do that) and then save it back again as a correct
pdf file that will open natively?
Thanks for your help.
Mike
[SOLVED] How to load a pdf file and then save it through programming?
Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller
-
- Posts: 355
- Joined: Wed Apr 27, 2011 2:12 pm
[SOLVED] How to load a pdf file and then save it through programming?
Last edited by karmacomposer on Thu Jul 16, 2020 5:29 pm, edited 1 time in total.
Re: How to load a pdf file and then save it through programming?
Hi,
try this:
Key is to specify the "binfile:" URL scheme. Works here.
Have fun!
try this:
Code: Select all
on mouseUp
answer file "Load what?"
put URL ("binfile:" & it) into myPDF
-- do something with myPDF
ask file "Save to:"
put myPDF into URL ("binfile:" & it)
end mouseUp
Have fun!
Livecode programming until the cat hits the fan ...
-
- Posts: 355
- Joined: Wed Apr 27, 2011 2:12 pm
Re: How to load a pdf file and then save it through programming?
Thank you.
That 100% worked.
I did not know that command.
Mike
That 100% worked.
I did not know that command.
Mike