{"id":82,"date":"2010-06-22T04:25:00","date_gmt":"2010-06-22T04:25:00","guid":{"rendered":"\/lisa\/post\/2010\/06\/22\/Odds-and-Ends-and-YAPS-on-VFP-PDF.aspx"},"modified":"2010-06-22T04:25:00","modified_gmt":"2010-06-22T04:25:00","slug":"odds-and-ends-and-yaps-on-vfp-pdf","status":"publish","type":"post","link":"https:\/\/spacefold.com\/lisa\/2010\/06\/22\/odds-and-ends-and-yaps-on-vfp-pdf\/","title":{"rendered":"Odds and Ends, and YAPS on VFP PDF"},"content":{"rendered":"<p>I&#8217;ve still got a bunch of questions tee&#8217;d up to answer, and no time to do it.&nbsp; Why?<\/p>\n<p><a title=\"Blog post about Derek\" href=\"\/lisa\/2007\/07\/29\/Second-test-and-a-plug-for-my-inEFFable-second-son\/\">Derek<\/a> and Lila got married two weeks ago!&nbsp; <a title=\"Blog post announcing Jonah's arrival\" href=\"\/lisa\/2009\/08\/14\/And-then-there-were-three\/\">Jonah<\/a> continues to be absorbingly interesting!&nbsp;And Paul Zygielbaum turned 60 last week, which was a matter of great joy and moment to his family and friends<a title=\"A little bit about Paul and Michelle\" href=\"http:\/\/mesothel.com\/asbestos-cancer\/legislation\/victim-protest-letters\/zygielbaum_essay.htm\" target=\"_parent\" rel=\"noopener\"> for many reasons<\/a>.<\/p>\n<p class=\"NB\">BTW, although I didn&#8217;t publish any news about this when it happened, Derek doesn&#8217;t work for EFF any more. <a title=\"Sample Derek interview\" href=\"http:\/\/www.readwriteweb.com\/archives\/google_public_policy_interview.php\" target=\"_blank\" rel=\"noopener\">Here&#8217;s a sample<\/a> of what he&#8217;s up to now.&nbsp; Lots more where this one comes from.&nbsp; Derek and Lila, who is equally cool, prodigiously talented, and <a title=\"Lila at Creative Commons\" href=\"http:\/\/creativecommons.org\/about\/people\" target=\"_blank\" rel=\"noopener\">committed to making the world a better place<\/a>, met during the EFF period, though, so that&#8217;s just one more reason for me to <a title=\"eff.org\" href=\"http:\/\/www.eff.org\/\" target=\"_blank\" rel=\"noopener\">thank EFF <\/a>&nbsp;;-).<\/p>\n<table border=\"0\">\n<tbody>\n<tr>\n<td>\n<p>But mostly, my work hours <br \/>just don&#8217;t permit much time here.<\/p>\n<p>I steal just enough time<br \/>for family events, <br \/>and a little gardening.<\/p>\n<\/td>\n<td>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/lisa\/wp-non\/migrated\/2010\/6\/gardenStuff.jpg\" alt=\"\" width=\"264\" height=\"125\" \/><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>I am trying to do something about my work schedule, and&nbsp;I hope to start posting answers to your questions, especially Ehud&#8217;s latest conundrum since he&#8217;s come up with another <a title=\"Blog post answering Ehud's last corker\" href=\"\/lisa\/2009\/07\/26\/YAPS-about-Dynamic-Layouts\/\">corker<\/a>, soon.<\/p>\n<p>Here are a few random notes to grease the skids and get me back into practice.<\/p>\n<h2>1. Adrian&#8217;s helpful notes on PDFs<\/h2>\n<p>Adrian H&nbsp;has <a title=\"Adrian's comment on PDF Power blog post\" href=\"\/lisa\/2007\/08\/06\/PDF-Power-Redux-Redacted-and-Reduced\/\">written<\/a> to say:<\/p>\n<blockquote>\n<p>We had trouble when upgrading our installation to GS v8.71, using the &#8220;silent install&#8221; of GS from a DB table.<br \/>VFP adds a .txt extension to filenames with no extension, which made Ghostscript unhappy. <br \/>Here&#8217;s a mod to Lisa&#8217;s prg that creates\/replaces the installer table directly in the DBC and nixes the bogus .txt extensions. <\/p>\n<p>GS v8.71, incidentally, allows copying text from the generated PDF. GS v7 produced garbled text on copy\/paste.<\/p>\n<\/blockquote>\n<p>&nbsp;&nbsp;&#8230; and he includes a modification to the &#8220;quick and dirty CreateInstallDBF.PRG&#8221; program that I added to the article, to show the basic principle of what needs to be included in an Install.DBF for GhostScript.<\/p>\n<p>Please do use Adrian&#8217;s mods, in the <a title=\"Adrian's comment on PDF Power blog post\" href=\"\/lisa\/2007\/08\/06\/PDF-Power-Redux-Redacted-and-Reduced\/\">blog post comment he wrote<\/a>, if you plan to use that particular PRG to create your install DBF &#8212; actually I will repeat them here for the purposes of syntax coloring and stuff &#8212; &#8212; although there are many ways to do so.&nbsp;You may already have created your own method of defining the files that you wish to deploy in production and scarfing them up in a DBF\/FPT form, my PRG was just supposed to describe the required steps briefly.<\/p>\n<p class=\"code\"><span style=\"color: #008000;\">* CREATEINSTALLDBF.PRG<br \/>* &gt;L&lt;&#8216;s Q&amp;D program<br \/>* for gathering the GhostScript<br \/>* files required for installation<br \/>* (c) Lisa Slater Nicholls<br \/>* Modified by Adrian [adrianh at midcoast.com]<br \/><\/span><span style=\"color: #0000ff;\"><br \/>LOCAL<\/span> lcTopDir, lcFile<br \/><span style=\"color: #0000ff;\">PRIVATE ALL LIKE <\/span>j*<br \/><span style=\"color: #0000ff;\">CLOSE DATABASES<br \/><\/span>= <span style=\"color: #0000ff;\">MESSAGEBOX<\/span> (&#8220;Open the database and Specify the table in the next dialogs&#8230;&#8221;)<br \/><span style=\"color: #0000ff;\">OPEN DATABASE<br \/><\/span><br \/>? jcInstall= <span style=\"color: #0000ff;\">PUTFILE<\/span> (&#8220;Install dbf&#8230;&#8221;,&#8221;GSinstall&#8221;,&#8221;dbf&#8221;) <br \/><span style=\"color: #0000ff;\"><br \/>IF EMPTY<br \/><\/span>&nbsp;&nbsp; (jcInstall) = <span style=\"color: #0000ff;\">MESSAGEBOX<\/span> (&#8220;User cancelled&#8221;) <br \/><span style=\"color: #0000ff;\">&nbsp;&nbsp; RETURN <br \/>ENDIF<br \/><span style=\"color: #0000ff;\"><br \/>DROP TABLE JUSTSTEM<span style=\"color: #000000;\">(jcInstall)<\/span><\/span> <\/span><br \/><span style=\"color: #0000ff;\"><br \/>CREATE TABLE <\/span>(jcInstall) (filename c(120), DIR c(10), contents m <span style=\"color: #0000ff;\">NOCPTRANS<\/span> ) <\/p>\n<p>= <span style=\"color: #0000ff;\">MESSAGEBOX<\/span> ( &#8220;Find dir for GS Executable in next dialog&#8230;&#8221;)<br \/>lcTopDir = <span style=\"color: #0000ff;\">GETDIR<\/span> ()<br \/>lcTopDir = <span style=\"color: #0000ff;\">ADDBS<\/span> (lcTopDir)<br \/><span style=\"color: #0000ff;\"><br \/>SET NOCPTRANS TO <\/span>contents<br \/><span style=\"color: #0000ff;\">DO <\/span>GetFiles <span style=\"color: #0000ff;\">WITH <\/span>lcTopDir, &#8220;&#8221;<br \/><span style=\"color: #0000ff;\">DO <\/span>GetFiles <span style=\"color: #0000ff;\">WITH <\/span>lcTopDir, &#8220;fonts\\&#8221;<br \/><span style=\"color: #0000ff;\">DO <\/span>GetFiles <span style=\"color: #0000ff;\">WITH <\/span>lcTopDir, &#8220;lib\\&#8221;<br \/>jQuery1520962885844600045_1342192883884 <span style=\"color: #0000ff;\">CHR<\/span> (7)<br \/>= <span style=\"color: #0000ff;\">MESSAGEBOX<\/span> (&#8220;Mission accomplished&#8230;&#8221;)<br \/><span style=\"color: #0000ff;\">RETURN<\/p>\n<p><span style=\"color: #0000ff;\">PROCEDURE<br \/><\/span>&nbsp;&nbsp; GetFiles(<span style=\"color: #000000;\">tTopDir, tSubDir<\/span>) <\/span><br \/><span style=\"color: #0000ff;\">&nbsp;&nbsp; LOCAL <\/span>lcFile, lcDir <br \/>&nbsp;&nbsp; lcDir = tTopDir + tSubDir&nbsp; <br \/>&nbsp;&nbsp; lcFile = <span style=\"color: #0000ff;\">SYS<\/span>(2000,<span style=\"color: #0000ff;\">FORCEPATH<\/span> (&#8220;*.*&#8221;,lcDir)) <br \/><span style=\"color: #0000ff;\">&nbsp;&nbsp; DO WHILE <\/span>NOT <span style=\"color: #0000ff;\">EMPTY<\/span> (lcFile) <br \/><span style=\"color: #0000ff;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO <\/span>(jcInstall)(filename, DIR) <span style=\"color: #0000ff;\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VALUES <\/span>(<span style=\"color: #0000ff;\">JUSTFNAME<\/span> (lcFile),tSubDir) <br \/><span style=\"color: #0000ff;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APPEND MEMO <\/span>contents ;<br \/><span style=\"color: #0000ff;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM <\/span>(<span style=\"color: #0000ff;\">FORCEPATH<\/span> (lcFile,lcDir)) <\/p>\n<p><span style=\"color: #008000;\"><span style=\"color: #008000;\"><span style=\"color: #008000;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *If the filename does not have an extension, <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *VFP forces the file extension to &#8220;.txt&#8221; when<br \/>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;*you COPY MEMO to create the files later. VFP will<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *not force a file extension when the name ends in &#8220;dot.&#8221;<br \/><span style=\"color: #008000;\"><span style=\"color: #008000;\"><span style=\"color: #008000;\"><br \/><span style=\"color: #000000;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jcName= <\/span><\/span><span style=\"color: #0000ff;\">JUSTFNAME<\/span><span style=\"color: #000000;\"> (lcFile) <\/span><\/span><\/span><br \/><span style=\"color: #0000ff;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF<\/span><span style=\"color: #000000;\"> !(&#8220;.&#8221; $ jcName) <\/span><\/span><\/span><br \/><span style=\"color: #0000ff;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REPLACE<\/span><span style=\"color: #000000;\">filename<\/span> <\/span><span style=\"color: #0000ff;\">WITH <\/span>jcName+&#8221;.&#8221; <br \/><span style=\"color: #0000ff;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ENDIF<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lcFile = <\/span><span style=\"color: #0000ff;\">SYS<\/span>(2000,<span style=\"color: #0000ff;\">FORCEPATH<\/span> (&#8220;*.*&#8221;,lcDir),1) <br \/><span style=\"color: #0000ff;\">&nbsp;&nbsp; ENDDO<br \/>RETURN<\/span><\/p>\n<h3>Crazy like a fox<\/h3>\n<p>Notice&nbsp;Adrian&#8217;s last recommendation, about GS v7 versus GS v8.71.<\/p>\n<p>It&#8217;s good advice&#8230; but don&#8217;t throw away the GS v7 version. Consider the &#8220;garbled text&#8221; as a feature, not a limitation; it&#8217;s a primitive way to make your PDF non-copy-able. There is a PDF switch for doing this, and it&#8217;s probably possible to add that switch to the GS command line script that PDFClass and PDFListener build for you, but I don&#8217;t off-hand know what it is, and it would take a bit of work and testing for you to incorporate it properly.<\/p>\n<p>You can get both versions <a title=\"GS download page\" href=\"http:\/\/pages.cs.wisc.edu\/~ghost\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<h2>2. When life, or your garden, hands you ornamental plums&#8230;<\/h2>\n<p>That photograph at the top of this entry isn&#8217;t cherries, but I decided to treat them that way anyway.&nbsp; It was a little extra work, but the result tastes like <a title=\"Lingonberry jam has its own site?!?\" href=\"http:\/\/lingonberryjam.com\/\" target=\"_blank\" rel=\"noopener\">lingonberry jam<\/a> and is great with yogurt.&nbsp;<\/p>\n<p>Luckily I have a cherry pitter &#8212; although I subscribe to <a title=\"Alton Brown's site\" href=\"http:\/\/www.altonbrown.com\/\" target=\"_blank\" rel=\"noopener\">Alton Brown<\/a>&#8216;s theory that no unitasking tool except a fire extinguisher should be permitted in a kitchen, cherry pitters don&#8217;t count.&nbsp; They&#8217;re in constant use in our house &#8212; to pit olives.&nbsp; (FWIW: I understand that Alton eventually <a title=\"Alton at work, discussed in the comments on this page\" href=\"http:\/\/unclutterer.com\/2010\/04\/07\/unitasker-wednesday-the-fire-extinguisher\/\" target=\"_blank\" rel=\"noopener\">found a second use for fire extinguishers<\/a>, too.)<\/p>\n<p class=\"NB\">FYI: I make a mean tea from lavendar from our beautiful and decorative garden, too, but C and I are slowly adding intended-edibles to the landscape.&nbsp; I mean, fun is fun, but come on.<\/p>\n<p>Did you know that, maybe a hundred years ago, you wouldn&#8217;t have needed a cherry pitter at all?&nbsp; A <a title=\"buttonhook society site!\" href=\"http:\/\/www.thebuttonhooksociety.com\/mainpage.php\" target=\"_blank\" rel=\"noopener\">button hook <\/a>would have done.&nbsp; Just another example of technology deteriorating.<\/p>\n<h2>3. Cherries no relation<\/h2>\n<p>Speaking of technological devolution&#8230; don&#8217;t get me started on Bing the Merciless.&nbsp; It&#8217;s not only the name that comes up short.&nbsp; And it&#8217;s not only my son&#8217;s job that keeps me with Google.&nbsp; Sigh.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve still got a bunch of questions tee&#8217;d up to answer, and no time to do it.&nbsp; Why? Derek and Lila got married two weeks ago!&nbsp; Jonah continues to be absorbingly interesting!&nbsp;And Paul Zygielbaum turned 60 last week, which was a matter of great joy and moment to his family and friends for many reasons.<a class=\"more-link\" href=\"https:\/\/spacefold.com\/lisa\/2010\/06\/22\/odds-and-ends-and-yaps-on-vfp-pdf\/\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4,9,12],"tags":[],"class_list":["post-82","post","type-post","status-publish","format-standard","hentry","category-general-techspeak","category-life","category-visual-foxpro","category-yaps"],"_links":{"self":[{"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/comments?post=82"}],"version-history":[{"count":0,"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/posts\/82\/revisions"}],"wp:attachment":[{"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/media?parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/categories?post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/tags?post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}