PDF SAM = PDF Split And Merge

Submit portable freeware that you find here. It helps if you include information like description, extraction instruction, Unicode support, whether it writes to the registry, and so on.
Message
Author
User avatar
Andrew Lee
Posts: 3092
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: PDF SAM = PDF Split And Merge

#31 Post by Andrew Lee »

I have added PDFsam to the database:

https://www.portablefreeware.com/?id=3045

I always thought this was in the database, since I have had it in my collection since god-knows-when. I don't use it that often, but it always comes in handy when the need arises.

I have almost forgotten it is Java-based until I went back on some of the posts in this thread. It has always loaded and run really quickly for me. The user interface is functional and never bothered me much. Like I said, I had assumed it was just another native Windows app, until now! :D

Anyway, I thought it deserves a place in the database after all its years of service to me. The description could do with some improvement, but I am not really in my best writing mood tonight.

Please vote!

User avatar
webfork
Posts: 10827
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: PDF SAM = PDF Split And Merge

#32 Post by webfork »

Andrew Lee wrote: Thu Feb 18, 2021 2:55 am I always thought this was in the database, since I have had it in my collection since god-knows-when. I don't use it that often, but it always comes in handy when the need arises.
Very much agree.
Andrew Lee wrote: Thu Feb 18, 2021 2:55 am Anyway, I thought it deserves a place in the database after all its years of service to me. The description could do with some improvement, but I am not really in my best writing mood tonight.
No worries, I put together something that should help, and will probably improve it the next time I come back to this program (which hopefully won't be long).

User avatar
shiny
Posts: 7
Joined: Mon Mar 04, 2024 10:33 pm

Re: PDF SAM = PDF Split And Merge

#33 Post by shiny »

not 32bit - got message "Bad descriptor"

User avatar
Midas
Posts: 6782
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: PDF SAM = PDF Split And Merge

#34 Post by Midas »

shiny wrote: not 32bit

It's Java-based and there's no mention of bitness in its download page -- when ran on my 64-bit Windows, it properly appeared as 64-bit... based on this, I changed the database entry to 64-bit (if anyone disagrees, please let me know).

Image

FYI, there's an expressly labeled 32-bit portable download for payware PDFsam Visual at https://pdfsam.org/download-pdfsam-visual/.

Spoiler!   

FTR, here's a copy of PDFsam portable batch file content:

Code: Select all

@REM This file is part of the PDF Split And Merge Basic source code
@REM Copyright 2023 by Sober Lemur S.r.l. (info@pdfsam.org).
@REM
@REM This program is free software: you can redistribute it and/or modify
@REM it under the terms of the GNU Affero General Public License as
@REM published by the Free Software Foundation, either version 3 of the
@REM License, or (at your option) any later version.
@REM
@REM This program is distributed in the hope that it will be useful,
@REM but WITHOUT ANY WARRANTY; without even the implied warranty of
@REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@REM GNU General Public License for more details.
@REM
@REM You should have received a copy of the GNU Affero General Public
@REM  License along with this program.  If not, see 
@REM  <http://www.gnu.org/licenses/>.

@echo off

set ERROR_CODE=0

:init
@REM Decide how to startup depending on the version of windows

@REM -- Win98ME
if NOT "%OS%"=="Windows_NT" goto Win9xArg

@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" @setlocal

@REM -- 4NT shell
if "%eval[2+2]" == "4" goto 4NTArgs

@REM -- Regular WinNT shell
set CMD_LINE_ARGS=%*
goto WinNTGetScriptDir

@REM The 4NT Shell from jp software
:4NTArgs
set CMD_LINE_ARGS=%$
goto WinNTGetScriptDir

:Win9xArg
@REM Slurp the command line arguments.  This loop allows for an unlimited
@REM  number of arguments (up to the command line limit, anyway).
set CMD_LINE_ARGS=
:Win9xApp
if %1a==a goto Win9xGetScriptDir
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto Win9xApp

:Win9xGetScriptDir
set SAVEDIR=%CD%
%0\
cd %0\..\..
set BASEDIR=%CD%
cd %SAVEDIR%
set SAVE_DIR=
goto repoSetup

:WinNTGetScriptDir
for %%i in ("%~dp0") do set "BASEDIR=%%~fi"

:repoSetup
set "RUNTIME=%BASEDIR%\runtime"
set "MODULEPATH=%BASEDIR%\app\mods"
set "PATH=%RUNTIME%;%BASEDIR%"

if exist "%PDFSAM_JAVA_PATH%" (
	set "JAVACMD=%PDFSAM_JAVA_PATH%\bin\java"
) else (
	if exist "%RUNTIME%" (
        set "JAVACMD=%RUNTIME%\bin\java"
    )
)

if "%JAVACMD%"=="" set JAVACMD=java

@REM Reaching here means variables are defined and arguments have been
@REM captured
:endInit

"%JAVACMD%" --enable-preview --module-path "%MODULEPATH%"
 --module org.pdfsam.basic/org.pdfsam.basic.App %JAVA_OPTS% -Xmx512M
 -splash:%BASEDIR%\pdfsam\splash.png -Dapp.name="pdfsam-basic"
 -Dprism.lcdtext=false -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%"
 %CMD_LINE_ARGS%
if %ERRORLEVEL% NEQ 0 goto error
goto end

:error
if "%OS%"=="Windows_NT" @endlocal
set ERROR_CODE=%ERRORLEVEL%

:end
@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" goto endNT

@REM For old DOS remove the set variables from ENV - we assume they were not
@REM set before we started - at least we don't leave any baggage around
set CMD_LINE_ARGS=
goto postExec

:endNT
@REM If error code is set to 1 then the endlocal was done already in :error.
if %ERROR_CODE% EQU 0 @endlocal


:postExec

if "%FORCE_EXIT_ON_ERROR%" == "on" (
  if %ERROR_CODE% NEQ 0 exit %ERROR_CODE%
)

pause
exit /B %ERROR_CODE%

Post Reply