I am trying to split a PDF into 2 smaller PDF's using gs (Ghostscript version 8.62
on Debian Lenny). I only have Debian Linux on hand, so please don't offer Windows or Mac solutions.
When specifying -dLastPage=740, I receive the error:
GPL Ghostscript 8.62: ERROR: A pdfmark destination page 1203 points
beyond the last page 740.
I have scoured the Ghostscript documentation for how to disable
pdfmark entirely (I don't need links or bookmarks for a straight-to-
print pdf). -dDOPDFMARKS=false does not work.
I've scoured the internet for anyone reporting a similar error. I
haven't found a solution yet.
Please help!
For reference, the command I'm using is:
gs -dSAFER -dBATCH -sDEVICE=pdfwrite -DNOPAUSE -sPAPERSIZE=halfletter -
dFIXEDMEDIA -dEmbedAllFonts=true -sOutputFile=library.1of2.pdf -
dLastPage=740 -dPDFFitPage library.pdf
Give CAM::PDF a try (note: I'm the author). The syntax would be:
deletepdfpage.pl library.pdf 741- library.1of2.pdf
deletepdfpage.pl library.pdf -740 library.2of2.pdf
or programmatically, it would be roughly like this:
use CAM::PDF;
my $pdf = CAM::PDF->new('library.pdf') || die;
$pdf->deletePages('741-');
$pdf->cleanoutput('library.1of2.pdf');
It's open source and it's pretty fast, too.
As it turns out, the error is not fatal. The pdf is generated anyhow, and since I do not care about pdf links or bookmarks functioning, this problem is solved for me.
In general, though, it would be good to know why pdfmark or ghostscript is failing, and how to generate a valid pdf with functioning links. If anyone has an answer, I'd still like to hear.
You should ask a new question which details exactly how and where you want to generate what kind of "PDFs with functioning links".
Related
I want to build a Node.JS/Electron ApplicationCache, that can show Previews for the following filetypes: DNG, CR2, JGP, TIFF.
I have accomplished all of that using an external library. Except for CR2.
I cant find anything (free) that can generate a preview image for CR2-Files and does not require installing exiftools or imagemagick on the machine. Does anybody have an idea waht it can use?
The solution to this problem is: dcraw
I am required to make a custom FireFox profile on a RHEL based system.
most of the configuration are changed inside the FireFox inside the about:config menu.
When I try and lock parameter values using the "mozilla.cfg" file and the "lockPref("", )" function the browser doesn't seem to read those files, I place the file both in: "~/.mozilla/firefox/" and "/usr/lib64/firefox/". I used the http://kb.mozillazine.org/Lock_Prefs guide and some more and still I have no one answer about where those function should be written and how do I check that those functions were loaded.
I would like some clear instructions or a definitive guide that I just couldn't manage to find.
Thanks!
This came up fairly high in a Google search when I was asking the same question, but did not have an answer at the time.
I found the following reference:
https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment
On RHEL7, the files needed to be added to the following locations:
/usr/lib64/firefox/defaults/preferences/autoconfig.js (root:root, 644)
/usr/lib64/firefox/mozilla.cfg (root:root, 644)
I am trying to use gdal2tiles to batch-create a bunch of KML superoverlays from a set big geotiff files; problem is that the gdal2tiles output seems to be stripped of its lowest-values point (i.e. the blue ones in the first image below)
This is an example of a superoverlay created directly from Google Earth Pro (using its built-in function):
This is the corresponding output of gdal2tiles, which I generated following the instructions explained in this KML guide; particularly, this is what I did:
gdalwarp -of VRT -t_srs EPSG:4326 input.tif output.vrt
gdal2tiles.py -p geodetic -k output.vrt outputdir/
Does anyone know why this happens? Any suggestions on how to avoid it?
Thanks
I came across echofunc.vim today (from a link in SO). Since I'm rubbish at remembering the order of function parameters, it looked like a very useful tool for me.
But the documentation is a bit lean on installation! And I've not been able to find any supplementary resources on the internet.
I'm trying to get it running on a RHEL box. I've copied the script into ~/.vim/plugin/echofunc.vim however no prompt when I type in a function name followed by '('. I've tried adding
let g:EchoFuncLangsUsed = ["php","java","cpp"]
to my .vimrc - still no prompting.
I'm guessing it needs to read from a dictionary somewhere - although there is a file in /usr/share/vim/vim70/ftplugin/php.vim, this is the RH default and does not include an explicit function list.
I'm not too bothered about getting hints on the functions/methods I've defined - just trying to get hints for the built-in functions. I can see there is a dictionary file available here which appears to provide the resources required for echofunc.vim, I can't see how I set this up.
TIA,
It expects a tags file, the last line of the description describes exactly how to generate it:
ctags -R --fields=+lS .
It works here with PHP but not with JS. Your mileage may vary.
I didn't know about this plugin, thanks for the info.
You should try phpcomplete.vim, it shows a prototype of the current function in a scratchpad. It is PHP only, though.
I have some files that were created using BSAVE in QuickBasic. I'm wondering how I can load/view these files?
I received assistance over at the FreeBasic forums. Its easy to do if you download and install the FreeBasic compiler / IDE. Here is the relevant thread:
http://www.freebasic.net/forum/viewtopic.php?t=12554&postdays=0&postorder=asc&start=0
Essentially, it loads the image using BLOAD like one normally would and then BSAVEs it as a BMP. I suppose it would be pretty easy to create an app. that did this by just prompting for source and output files...
I would try installing pcpaint (free) http://www.shdon.com/software/pcpaint
Change the extension to .PIC and try to open it. Apparently this program used bsave to save images with the extention .pic.
Hope this works!