Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 07-05-2014, 02:02 PM   #841
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 883
Karma: 6370957
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by mike2003 View Post
where is all profile store?
why this so simple app dont use "portable concept"???
i loose all my profile after reinstalling win7
I'm not sure what you mean by "portable concept." The k2pdfopt settings are all stored in K2PDFOPT... environment variables since environment variables are cross-platform, relatively reliable and non-intrusive ways to store settings. So you need only correctly transfer environment variables from your old installation of Windows 7 to your new one.
willus is offline   Reply With Quote
Advert
Old 07-05-2014, 02:13 PM   #842
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 883
Karma: 6370957
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by Smith-Corona View Post
...
So basically I want all the pages cropped as much as they can be with reference to the maximum text width found in the document (with column set to 1). Then to make all the pages that size, and have the font the same size throughout...
@Smith-Corona -- Welcome to MR! Thank you for the post. At this stage, k2pdfopt will not automatically do what you want (I think), i.e. scan the whole document and determine a single set of crop margins that will best encompass every page so that each page remains at the same scale. You can kind of do this manually using the -cbox command-line option, though--you just have to figure out the right values to use with -cbox. e.g.

k2pdfopt -cbox 0.1s,0.1s,0.8s,0.8s -mode fitpage myfile.pdf

... will remove 10% margins around each source page and turn that into the output page, but it will always take the same crop box on each page--it won't determine the optimum position of the crop box on each page to best surround the text, which I think is what you want. I'll add your idea to my wish list, but I can't promise anything right away. It would involve a significant amount of new logic.

Perhaps Briss would be a better option for you since it lets you choose graphically?
willus is offline   Reply With Quote
Old 07-05-2014, 02:17 PM   #843
mike2003
Member
mike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic something
 
Posts: 11
Karma: 18680
Join Date: Aug 2013
Device: none
Quote:
I'm not sure what you mean by "portable concept."
settings store in app folder, not in reg or other places on system disk
mike2003 is offline   Reply With Quote
Old 07-05-2014, 02:23 PM   #844
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 883
Karma: 6370957
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by Smith-Corona View Post
... I am having trouble understanding how margin settings work.

First of all, I am not sure what "Crop margins" means. To me that suggests, how much would you like to crop the margins by, ie how much would you like to chop off. But the default setting of 0.00 removes the margin altogether, so I guess "Crop margins" refers to the actual margin width? ...
Imagine all pixels in the crop margins being painted white, and you essentially have exactly the effect--that's all k2pdfopt does internally with the crop margin information--it internally paints that area of the source page white. The value used by crop margins thus tells k2pdfopt to ignore that margin area (treat it as white/blank). This doesn't mean that k2pdfopt will automatically remove it from the output--it just means any text or black ink in those margins will be ignored when determining source page regions to put on the output page. Other settings combine with this setting to determine what part of each region actually gets turned into each output page, e.g. what mode is being used. With "-mode fitpage", for example, k2pdfopt automatically trims any blank margins away from the output regions, but with "-mode copy", k2pdfopt preserves the source page size exactly (no trimming).
willus is offline   Reply With Quote
Old 07-05-2014, 02:32 PM   #845
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 883
Karma: 6370957
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by mike2003 View Post
settings store in app folder, not in reg or other places on system disk
There is no chosen "app folder" for k2pdfopt. In fact, I want users to be able to run it directly from their desktop, and I don't wish to clutter the desktop with a .ini file. Besides, this has its drawbacks--it doesn't create unique settings for individual users. The app is also not necessarily guaranteed to have write access to the folder it is running from. For these reasons and various others, I store settings in environment variables. I do not intend to change this in the near future. In any case, there are many, many applications (the majority, I would venture) for which re-installing Windows 7 loses all settings.

PS. I could consider a "save settings" and "import settings" menu selection for the MS Windows GUI. That wouldn't be hard...

Last edited by willus; 07-05-2014 at 02:38 PM. Reason: Added PS
willus is offline   Reply With Quote
Old 07-05-2014, 02:43 PM   #846
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 10,577
Karma: 10905000
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2
Quote:
Originally Posted by willus View Post
There is no chosen "app folder" for k2pdfopt. In fact, I want users to be able to run it directly from their desktop, and I don't wish to clutter the desktop with a .ini file. Besides, this has its drawbacks--it doesn't create unique settings for individual users. The app is also not necessarily guaranteed to have write access to the folder it is running from. For these reasons and various others, I store settings in environment variables. I do not intend to change this in the near future. In any case, there are many, many applications (the majority, I would venture) for which re-installing Windows 7 loses all settings.
I would agree but having said that this app folder approach is generally the approach used or for Unix they are usually stored in a file in the users home directory. This is one of the very few apps I have heard of that stores all of it settings in variables. It is not generally expected so I will add this to the wiki page to help users expect this behavior. It could be used to aid portability. How to you get these variables into the users environment in the first place?

Dale
DaleDe is offline   Reply With Quote
Old 07-05-2014, 04:57 PM   #847
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 883
Karma: 6370957
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by DaleDe View Post
...This is one of the very few apps I have heard of that stores all of it settings in variables. It is not generally expected so I will add this to the wiki page to help users expect this behavior...
Sounds good. Thanks for helping with the wiki page, Dale.

Quote:
Originally Posted by DaleDe View Post
...How to you get these variables into the users environment in the first place?
Only the MS Windows GUI does this, actually. I use Windows-specific calls (see k2gui_get_settings() and k2gui_save_settings() in k2gui.c, which call environment variable functions in wsys.c). The other platforms expect you to set the K2PDFOPT environment variable per your desired defaults.

I never really thought people would consider it important to save k2pdfopt settings--to me, there aren't that many of them--I can easily enough re-create them from scratch--but I guess if people spend a fair amount of time fine-tuning the settings, this becomes an issue.
willus is offline   Reply With Quote
Old 07-05-2014, 05:38 PM   #848
mike2003
Member
mike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic something
 
Posts: 11
Karma: 18680
Join Date: Aug 2013
Device: none
It is bad practice to store data in the registry or in the system drive (for Windows). Many users use the "portable" version of the programs because they do not want to lose all settings because of problems with the OS.

So simple app like k2pdf would be better if given a choice!
mike2003 is offline   Reply With Quote
Old 07-05-2014, 05:42 PM   #849
Smith-Corona
Junior Member
Smith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 3
Karma: 12690
Join Date: Jul 2014
Device: Nook HD+
Quote:
Originally Posted by willus View Post
Perhaps Briss would be a better option for you since it lets you choose graphically?
Yes, I was thinking about using Briss. I liked the idea of k2pdfopt as a kind of one-stop shop and being able to carry out a number of transformations at the one time, including cropping. I'll give Briss a go. When I've tried it before I didn't find it very easy to see what I was doing. I actually found the graphical approach a bit less clear-cut (so to speak) than k2pdfopt.

Smith-Corona
Smith-Corona is offline   Reply With Quote
Old 07-05-2014, 05:50 PM   #850
Smith-Corona
Junior Member
Smith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterSmith-Corona can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 3
Karma: 12690
Join Date: Jul 2014
Device: Nook HD+
Quote:
Originally Posted by willus View Post
Imagine all pixels in the crop margins being painted white, and you essentially have exactly the effect--that's all k2pdfopt does internally with the crop margin information--it internally paints that area of the source page white. The value used by crop margins thus tells k2pdfopt to ignore that margin area (treat it as white/blank). This doesn't mean that k2pdfopt will automatically remove it from the output--it just means any text or black ink in those margins will be ignored when determining source page regions to put on the output page. Other settings combine with this setting to determine what part of each region actually gets turned into each output page, e.g. what mode is being used. With "-mode fitpage", for example, k2pdfopt automatically trims any blank margins away from the output regions, but with "-mode copy", k2pdfopt preserves the source page size exactly (no trimming).
Thanks, this makes it clearer. Looking forward to trying out the different options.

It may be that for pure cropping something like Briss is the way to go, but the great advantge of k2pdfopt I think is the fact that it understands the output device, and that you can tailor the pdf to fit different screen sizes, control font size with DPI etc.

Smith-Corona
Smith-Corona is offline   Reply With Quote
Old 07-05-2014, 08:31 PM   #851
markom
Banned
markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.
 
Posts: 488
Karma: 1080260
Join Date: Sep 2012
Device: sony prs t1 kindle dx ipad
Quote:
Originally Posted by Smith-Corona View Post
Thanks, this makes it clearer. Looking forward to trying out the different options.

It may be that for pure cropping something like Briss is the way to go, but the great advantge of k2pdfopt I think is the fact that it understands the output device, and that you can tailor the pdf to fit different screen sizes, control font size with DPI etc.

Smith-Corona
You can use Briss or Pdfscissors to visually quickly crop pdf margins just roughly (left and right pages separately if necessary), simultaneously making the cropping boxes (i.e. cropped pages) the same size so that text(font) size shall later also stay approx. the same, and then simply employ k2pdfopt for more precised cropping and everything else.

Last edited by markom; 07-05-2014 at 09:27 PM.
markom is offline   Reply With Quote
Old 07-06-2014, 12:10 AM   #852
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 883
Karma: 6370957
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by mike2003 View Post
It is bad practice to store data in the registry or in the system drive (for Windows). ...
That is your opinion. I have explained my rationale for the way k2pdfopt stores its settings.
willus is offline   Reply With Quote
Old 07-06-2014, 01:10 AM   #853
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 10,577
Karma: 10905000
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2
Quote:
Originally Posted by willus View Post
Sounds good. Thanks for helping with the wiki page, Dale.


Only the MS Windows GUI does this, actually. I use Windows-specific calls (see k2gui_get_settings() and k2gui_save_settings() in k2gui.c, which call environment variable functions in wsys.c). The other platforms expect you to set the K2PDFOPT environment variable per your desired defaults.

I never really thought people would consider it important to save k2pdfopt settings--to me, there aren't that many of them--I can easily enough re-create them from scratch--but I guess if people spend a fair amount of time fine-tuning the settings, this becomes an issue.
Thanks for the info. Perhaps it would be good to have a way to write them out in a file. It might be useful for those who tweak the settings to be able to revert back or even have different sets. In addition this would make things truly portable.

Dale
Dale
DaleDe is offline   Reply With Quote
Old 07-06-2014, 07:42 AM   #854
mike2003
Member
mike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic somethingmike2003 has a certain pleonastic something
 
Posts: 11
Karma: 18680
Join Date: Aug 2013
Device: none
Quote:
the way k2pdfopt stores its settings.
better use of commonly accepted principles than to invent new ones. matter of time. sooner or later you will have to do it right)
mike2003 is offline   Reply With Quote
Old 07-06-2014, 09:56 AM   #855
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 883
Karma: 6370957
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by mike2003 View Post
better use of commonly accepted principles than to invent new ones. matter of time. sooner or later you will have to do it right)
Storing settings in environment variables is not something I invented, nor is it new.
willus is offline   Reply With Quote
Reply

Tags
ebook apps, k5 tools, kindle tools, kindle touch, tools

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing PDFs with another font Font PocketBook 4 11-12-2010 08:27 AM
Viewing Textbook PDFs... NJReader enTourage Archive 4 08-17-2010 05:17 PM
PRS-600 Restart bug while viewing PDFs? conundrum Sony Reader 2 03-04-2010 08:46 PM
More on viewing pdfs dso371 Bookeen 8 03-11-2008 07:15 PM
Viewing Untagged PDFs on Palm T|X Eroica Reading and Management 3 12-10-2007 01:44 PM


All times are GMT -4. The time now is 06:54 PM.


MobileRead.com is a privately owned, operated and funded community.