Showing posts with label PDF. Show all posts
Showing posts with label PDF. Show all posts

Monday, April 07, 2008

Acrobat PDFMaker 8.0 toolbar in AutoCAD 2009 and CUI bugs

If you want the Acrobat PDFMaker 8.0 toolbar in AutoCAD 2008 or AutoCAD 2009 here is how you can do it. It requires that you have Adobe Acrobat 8.0.

With some work I achieved this result and unfortunately it was not because CUI was so stable and easy to use. But it is also AutoCAD Ribbon version 1 so hopefully this works better after some hotfixes, service packs or at least in AutoCAD 2010.

Ribbon

As a starter use the APPLOAD command. Click on Startup Suit Contents and add "C:\Program Files\Adobe\Acrobat 8.0\PDFMaker\AutoCAD\2007\PDFMAcad.arx".

It should then look like this on the command line:
Command: appload
PDFMAcad.arx was added to the Startup Suite.

This created some menu files and images in this folder on my PC:
C:\Users\<user>\appdata\roaming\adobe\acrobat\8.0\ACAD-7001-409

In AutoCAD 2009 it will look this this with the Acrobat PDFMaker 8.0 toolbar loaded.

Acrobat PDFMaker 8.0

Now I want to move the toolbar to the Ribbon.

Run the CUI command. Select pdfmacad.cui.

Right-click on the toolbar Acrobat PDFMaker 8.0.

image

Right-click on Ribbons Tabs and add a new tab named "PDF".

image

Drag and drop the ribbon panel that was created into the PDF tab.

image 

Click on Apply.

Select All Customization Files and click on the current workspace and you find that you see the right pane change.

image 

Select pdfmacad.cui again. Here you should be able to click on Customize Workspace on the right pane but I got an error. Instead expand Ribbons Tab on the left side so you see "PDF". Drag and drop that one to the right side on the Ribbons Tab there.

image

image 

Looking in CUI two panels are listed. One is unnamed that obviously just creates an empty panel and cannot be deleted. Another bug.

image

The workaround was to click on it and set the Show property to No.

image

Now I want to make the icons side by side and add some text below.

image

I try to drag the command on Row 2 to Row 1 but nothing happens. Another bug as I can drag the command from Row 1 down to Row 2.

After deleting Row 1 and showing the text it look like this.

image

But I don't want a separate Tab. I would like to move it to the Output tab.

I tried different methods like transferring the panels between the cui files but even though it looked right in CUI the result was just an empty panel on the Ribbon tab. Buggy again.

I even tried another approach.but was not able to get it to work because of several bugs in CUI.

Right click on the toolbar and select Customize.

Customize

In Customize User Interface (CUI) expand "Customizations in All CUI Files" and the right part of CUI by clicking on the black arrow at the bottom.

Click on the command "Convert to Adobe PDF" so you see the Button Image.

image

Click on Edit and in the next dialog box click on Save As and place the image where you can find it later. Do the same with the command "Convert to Adobe PDF and Send for Review". Notice that if you in the button image editor click on Save As the first time you end up in you Documents folder. If you cancel it and click again you end up in the Icons folder. Bug again.

One location could be something like this if you have Windows Vista:
C:\Users\<UserName>\AppData\Roaming\Autodesk\AutoCAD 2009\R17.2\enu\Support\Icons

Click OK to make sure things are saved and that the next step will work. If not you will get the menu file corrupted in the following steps due to some bug.

Start CUI again by right clicking on the toolbar like before and expand the panes.

Now right click on "Acrobat PDFMaker 8.0" as seen below and select "Copy To Ribbon Panels".

CUI Copy To Ribbon Panels

Now the Ribbon Panel "Acrobat PDFMaker 8.0" is available.

Acrobat PDFMaker 8.0

Right click on it and select Copy.

Navigate now to the Ribbon Tabs and locate Output -2D and select it. Right click and select Paste.

Output - 2D

Bummer. It didn't work either. To achieve the best result you should create the Ribbon Panel manually.

Saturday, April 05, 2008

doPDF another free PDF printer

This freeware has worked pretty good in my small tests and does not require GhostScript, works on Vista and also 64-bit systems.

If you plot from AutoCAD and use TrueType fonts they will be converted to text if you make that change in in the plotter properties.

You need to change the Properties of the plotter (Plotter Configuration
Editor)>Device and Document Settings>Graphics>TrueType Text to "as text". Save this to a PC3 that you use.

Plotter Configuration Editor

Another thing that is great is that it's free even to print to PDF for commercial usage.

Test of the PDF converter was done using AutoCAD 2009.

http://www.dopdf.com/

Add any good or bad comments on your experience of it below.

Monday, January 07, 2008

Lines Merge for PDF created from AutoCAD using Acrobat

Line merging is possible to achieve using Adobe Acrobat 8 and AutoCAD 2008. I just confirmed it and here is the result with lines merge and lines overwrite.

lines merge                       lines overwrite

The built in DWG to PDF.pc3 that comes with AutoCAD cannot do this and if you just use the Plot command and the Adobe PDF.pc3 it will not work.

In short here is how.

  • In the Page Setup select Adobe PDF.pc3 or some other pc3 file that supports lines merge. Click on Properties>Devices and Document Settings>Graphics>Merge Control and there you select Lines Merge.
  • Acrobat PDF Maker must then be used. Either via the toolbar or with the PDF command.

In step 14 in the post below you don't have to retain the layers. Flatten all layers works as well.

Via Acrobat “Lines Merge” adjustments for PDF created from AutoCAD » I did not know Acrobat could do that

Thursday, December 13, 2007

Save filled forms in Adobe Reader as PDF file

If you have Adobe Reader and fills out a form you might see the message below. This is what Adobe Reader 8.0 shows.

Then if you try to Save a Copy you  will get this message.

Save a Blank Copy of this Form

Data typed into this form will not be saved. Adobe Reader can only save a blank copy of this form. Please print your completed form if you would like a copy for your records.

If you really want a PDF that has the forms filled out and you don't have for example Adobe Acrobat 8.0 what do you do? Here comes the solution to the problem.

You can print it and scan it to a PDF file or even better get a free PDF printer like CutePDF Writer, pdf995, PrimoPDF or PDFCreator. With  any of these freeware's installed you can select to print to that PDF writer and you will have a PDF with the filled forms.

Monday, October 22, 2007

Adobe Labs - Adobe Share reviewed

Do you want to share, publish and organize your documents online?

Here is another free web-based service, now from Adobe. Take a look at Adobe Labs - Share. The UI uses Adobe Flash Player.

image

  • Your free Share account has 1 GB of storage space.
  • You can share it with one, many or publicly to everyone.
  • Adobe Share only allows documents right now.
  • There is an API.

Here are a couple of tests having a DWF (could be shared but not embedded) and a PDF shared and embedded. It's very easy to embed the document because you get all HTML code needed.

Link to the DWF file.

Below is a PDF embedded using Flash.

PS. Windows Live SkyDrive that I earlier blogged about has recently raised the limit to 1 GB of online storage. Take a look at SkyDrive here. Sure looks like competition. One thing I like with SkyDrive is that documents can be dragged and dropped into it.

Tuesday, October 16, 2007

PDF-XChange Viewer review

If you want something better or want more than Adobe Reader but don't want or cannot justify the quite expensive Adobe Acrobat, Tracker Software Products has made the free PDF-XChange Viewer.

Testing the Viewer I must say it's a great product.

Below is an AutoCAD DWG file I printed to PDF and then annotated as a test.

image

Here is some of the things this free PDF viewer can do.

  • Add Comments and Annotations to any PDF file (subject to security settings) - unlike the Adobe Viewer which requires the PDF creation tool to be 'certified' by Adobe !
  • Markup pages with text and objects
  • Type directly on any PDF page, not just Adobe enabled forms documents - in Typewriter mode.
  • Export PDF pages or entire files to any one of the supported Image formats including BMP, JPEG, TIFF, PNG and many more ...
  • Extract text from a PDF page/File
  • Make your navigation of large or complex PDF files both simple and enjoyable switch the extended functionality of our 'Loupe' and the 'Pan' Window tools
  • Fill and Save Adobe Forms to disk, email or 'post' !
  • Full Javascript Engine included
  • Updated JPEG2000 Compression support - improving speed.
  • And many more features such as Rotate and 'Save',  Email files etc ...

Crop pages and Delete pages are not available in this version even though there are menu items for them. (Version 1.0 Build 0026) It seems like there is a PRO version coming and it might be that you need to buy that one for added functionality.

Notice that if you have added comments, annotations and markups they are still editable from within Adobe Acrobat.

There is also a SDK for the viewer but it's not free.

I've developed using their PDF-XChange SDK Pro API before and it creates the best and smallest PDF you can find. I used it to add text and images to existing PDF's in an automated way after they were approved in a document management system (ProArc from Software Innovation). I also solved so that PDF documents were printed in correct sorted order when printed from ProArc.

Friday, August 17, 2007

Start a Windows application within AutoCAD

One way is achieved by the AutoLISP function startapp. Notice that the control of what is started is not in the hand of AutoCAD. So if you have an AutoLISP program the code will just continue executing.

Here is an example how it can be used to open with Notepad the acad.pgp file that AutoCAD uses. If you do edit the acad.pgp file you need to run the ReInit command and select the PGP file check box so the changes will be used by AutoCAD. Or if you want to use AutoLISP: (setvar "re-init" 16)

Command: (startapp "notepad" (findfile "acad.pgp"))
33

33 is the return value. As long as not nil is returned the function is successful.

Notice that if one of the arguments contain spaces you need to use double quotes like this sample: (startapp "notepad.exe" "\"file with spaces in the name.txt\"")

If you want to launch Windows Explorer here is one way to open the folder of the current drawing: (startapp (strcat "explorer /e," (getvar "dwgprefix")))

If you want to open a PDF file in Adobe Reader 8.0 at a specific page this can be used.(startapp "\"C:\\Program Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32.exe\"" "\"/A page=5 C:\\Program Files\\Adobe\\Reader 8.0\\Reader\\plug_ins\\Annotations\\Stamps\\ENU\\StandardBusiness.pdf\"")

If you want to open a DWF file in Autodesk Design Review here is how:(startapp "\"C:\\Program Files\\Autodesk\\Autodesk Design Review\\DesignReview.exe\"" "\"C:\\Program Files\\Autodesk\\Autodesk Design Review\\Tutorial\\IRD Addition Autodesk Design Review Sample.dwf\"")

And another one if you want to open a DWF in your favorite web browser:
(command "_browser" "http://freewheel.autodesk.com/dwf.aspx?path=http://freewheel.autodesk.com/sample/Hotel5.dwf&sec=1")

To run a VBScript this can be used:
(startapp "wscript" "c:/MyCoolScript.vbs")

There is also the AutoCAD command SHELL.

With SHELL, you can execute operating system (OS) commands while remaining in this program. When SHELL prompts you for an OS command, you can enter most valid commands for your OS. When the command has been executed, SHELL returns you to the Command prompt. You can also call the SHELL command with AutoLISP like this: (command "_shell" "dir *.dwg /p")

Another alternative is if you have DOSLib. In that case you can use the function dos_execute (Runs an external program), dos_exewait (Runs a program and waits for completion) or dos_shellexe (Opens or prints a program or file). You can with these also control how the newly opened window is to be displayed.

I think you pretty much get the idea. If you have any sample you want to share please add a comment below.

Wednesday, July 11, 2007

Adobe Reader 8.1 includes PDF Preview Handler

image Robin raised a good question to my previous post if the Outlook 2007 preview is included with the reader.

Adobe Reader 8.1 does include the Outlook 2007 and Windows Explorer PDF Previewer, Windows Search filter, and Windows Explorer icon preview extension (see the image).

When I tried in my Virtual PC 2007 Vista test environment I could not get the Windows Search filter to work. Not sure why. Maybe text within PDF files cannot be searched with the PDF filter that is included with the Reader.

Tuesday, July 10, 2007

PDF Preview Handler included with Adobe Acrobat 8.1

Recently Adobe Acrobat 8.1 was released. One good thing is that a PDF Preview Handler is included so you can look at PDF files directly within Outlook 2007. The viewer is very basic and it is not much you do. I directly missed being able to zoom in and zoom out but a workaround is to resize the message window.

image

The first time you click on a PDF file it takes a few seconds but after that the viewer fires up in less than a second.

image

image

It also works in Windows Explorer

image

New features in Adobe Acrobat 8.1
New operating system support:

  • Windows XP 64-bit edition
  • Windows 2003 64-bit edition
  • Windows Vista 32-bit and 64-bit editions
    Note: There is a known issue with 64-bit versions of these operating systems which causes the Adobe PDF Printer to not work correctly. Microsoft has released a Hot Fix for this issue which is documented in Microsoft Knowledge Base Article #930627 available at http://support.microsoft.com/kb/930627. Adobe has tested and will support the Adobe PDF Printer with this Hot Fix installed.

New features:

  • Vista Preview Handler: Preview Handler is a new user interface for viewing PDF files in Microsoft Office Outlook 2007 on Windows Vista and Windows XP, as well as in Windows Explorer on Windows Vista. Preview Handler must be turned on in both applications.
  • Microsoft Office 2007 support.
  • PDF printer driver in Vista supports high quality PDF creation.
  • PDFMaker Office 2007 PDF Creation.
  • Option to create Quick and Simple PDFs from Word 2007.
  • New PDFMaker Ribbon UI in Office 2007.
  • Mac OS X version now includes Flash MPP for improved support for Flash files with multimedia on Mac OS.
  • InDesign Plug-In update supports communication with InDesign for Creative Suites 3.
  • Option to print documents to a FedEx Kinko?s office in the USA. English only.
  • Direct render of Dynamic forms
  • FIPS 140 Support

Wednesday, March 21, 2007

PDF Preview Handler for Vista and Outlook 2007

Here are a couple of great Preview Handlers for PDF files.

Foxit PDF Preview Handler as well as Adobe PDF Preview Handler.

Another one is in this MSDN article. The code download for this article includes a framework that makes it a snap to implement your own preview handlers, and it provides several sample previewers (including previewers for PDF, XML, ZIP, MSI, BIN, CSV, XPS, and XAML files).

If I had more time I would write one for DWG and DWF files. With the above code samples it's a quite easy task.

What are File Previewers for Outlook?

Wednesday, March 07, 2007

Have you lost your .EXE file extension association in Windows Vista?

"I have problems to start all programs that has the .EXE extension!" "My programs are broken!" "What happened to my .exe file extensions?" "I cannot run Regedit or do a System Restore!" "I'm unable to launch..." "I have an EXE file problem, the EXE does not execute"

You have probably tried to open an .EXE file with something like Adobe Reader, Internet Explorer, Notepad or the like. This results in having the .EXE file extension corrupted.

Now you really have problems since most every program requires access the exe file association to work. But there is no need to panic.

If you have this problem the solution is not the same as in previous Windows versions. Below you can see what have been added to the registry after Acrobat Reader (AcroRD32.exe) has been associated with .exe files. They need to be removed but since you cannot run regedit.exe you need to use a .reg file like one of those below.

 

Solution (only compatible with Windows Vista)

Here are some registry files that should be able to fix this problem. Download one of them and save it locally. Double click on the file and when asked "Windows needs your permission to continue" "Registry Editor" it is to give permission to start regedit.exe. Click on Continue. Then the Registry Editor will warn you again and click on Yes to add or merge the content of the reg file to the registry. You need to be an administrator to apply these fixes.

Windows Vista exe fix.reg

Here is the content of the above file. Copy the three rows below to Notepad and save to a file with the file extension reg.

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\OpenWithList]

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\UserChoice]

Windows Vista exe fix2.reg

Here is the content of the above file. Copy the five rows below to Notepad and save to a file with the file extension reg.

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\OpenWithProgids]
"exefile"=hex(0):

If the above ones does not help here is a more thorough one.

Windows Vista exe fix3.reg

And if nothing else works you can try this one.

Windows Vista exe fix4.reg

To see the change of the icons you might need to log out or restart the computer. But the file association should work directly.

If you want to reproduce the error save the below rows using Notepad to a .reg file.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\OpenWithList]
"a"="AcroRd32.exe"
"MRUList"="a"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\OpenWithProgids]
"exefile"=hex(0):

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\UserChoice]
"Progid"="Applications\\AcroRD32.exe"

If You Are Unable to Start a Program with an .exe File Extension in Windows XP take a look at this knowledge base article from Microsoft. In this case a virus is the cause of the problem.

When you attempt to start a program that has an .exe file extension, the program may not start, and you may receive one of the following error messages:

    • Windows cannot find FILES32.VXD. This program is needed for opening files of type "Application".
    • Path to program is not a valid Windows application

Your desktop may appear to be blank. Also, the problem occurs many times when you restart your computer. Even after an anti-virus program has indicated it has cleaned the virus, the registry entry described in the "Resolution" section of this article is still in the registry.

Another KB is also for Windows 2000.

When you try to start a program that has an .exe file name extension, you receive one of the following error messages:

  • Windows cannot find FileName.exe
  • Windows cannot find ProgramName. Make sure you typed the name correctly
  • Windows cannot find FileName.exe. This program is needed for opening files of type "ProgramName".

Tuesday, December 19, 2006

Adobe Reader 8

Adobe Reader 8 is released as well as Adobe Acrobat 8 Standard and Adobe Acrobat 8 Professional. Reader has new user interface, 2D GPU acceleration ("NVIDIA® GeForce® and NVIDIA Quadro® GPUs let users do more with PDF files, and faster," said Pam Deziel, director, platform product marketing, Adobe Systems Incorporated. "Panning, scrolling, zooming…Virtually every major function in Adobe Reader 8 that takes advantage of the GPU will receive a tangible boost in performance. Things people may have avoided in the past, such as deeply detailed zoomable maps, are now easily displayed."), loupe tool, start meetings and collaborate with Acrobat Connect (Free web conferencing for the rest of 2006), link to Create PDF Online (Note that Create Adobe PDF Online only supports AutoCAD DWG files saved as versions Release 2.5 through AutoCAD 2002! Since AutoCAD 2002 there has been 2 new file formats.)

Technorati tags: Adobe Reader 8, Adobe, PDF

Saturday, December 16, 2006

Hyperlinks in Word documents to work in PDF

If you want to use one of the free PDF printers or writers that are available hyperlinks does not always convert correctly when the Word document is printed to PDF. Typically this is when they are wrapped on two or more rows or have very long paths.

I've tried CutePDF Writer, Pdf995 and PDFCreator among others and they all had this limitation.

To solve this using CutePDF there is no free solution. You need to buy ($49.95) CutePDF Pro (Commenting -> Link Tool) to add those links back onto created PDF document.

PDF995 had the solution with the Word toolbar addin that comes with pdfEdit995 that also is free.

PDFCreator could not solve this at all.

Both the support for CutePDF and Pdf995 where quick to answer my questions.

Technorati tags: , , , ,

Sunday, September 03, 2006

DWGgateway supports DWG 2007

Some days ago I mentioned that Open Design Alliance supports DWG 2007. Now it seems to be used by SolidWorks an ODA member. The beta for DWGgateway that works for AutoCAD 2007 can be downloaded. Notice that this link must be used to get the beta.

AutoCAD® free download

According to their email:

DWGgateway 3.0 (beta) now works with AutoCAD 2007

If you’re an AutoCAD® user who occasionally has issues sharing files with colleagues, DWGgateway™ can make your life easier than ever now that it reads files created with AutoCAD 2007 and converts older AutoCAD file formats to 2007 format

Try DWGgateway 3.0 beta

Use DWGgateway to:
* Open files from any version of AutoCAD.
* Create Adobe PDF documents.
* Eliminate the need to upgrade your AutoCAD licenses.

Notice the following. When I installed the software and started ADT 2007 I got a dialog box forcing me to activate the product using name, email, title and country.

It still forces me for example to plot both the model and the layout to PDF even though I just want the layout. It uses the saved page setup and does not use the AutoCAD plot interface.

Uninstalling DWGgateway does not clean up fully from CUI. The menu and toolbar show up as unresolved.

For some DWGgateway can be useful no doubt. But if you want PDF files I recommend CutePDF instead and if you want to convert between different DWG versions I recommend DWG TrueConvert 2007.

Here is what I said about DWGgateway almost a year ago.

Technorati: Open Design Alliance, DWG, AutoCAD 2007AutoCAD,

Monday, July 31, 2006

EplotView DWF & PDF viewer Palette for AutoCAD

Check out the cool EplotView DWF & PDF viewer Palette for AutoCAD by Mark Douglas.

Technorati: , , , ,

Tuesday, April 25, 2006

AcroPDF.dll fix in Acrobat Reader 7.0.7

I've made a solution using the ActiveX AcroPDF.dll that comes free with Acrobat Reader to automate batch printing of PDF files in a more consistent way than selection a bunch of PDF files in Explorer right click and print that has problems with not all PDF's being printed or in a random order and sometimes the first file is not printed to fit the paper but was zoomed in quite a bit (a bug that seems to be related to versions 7.0.0 up to 7.0.7 but that worked using the COM object). I used

AxAcroPDF1.LoadFile("C:\test.pdf")

AxAcroPDF1.printAllFit(True)

and it worked on my PC for a while but then stopped working one day and I could not get it to work again. Adobe support confirmed to me that it was fixed in Acrobat 7.0.7 and that explained why it worked on some PC's but not on all. I had during the time tried installing older versions like Acrobat 5.0 and Acrobat 6.0 for other testing purposes and somehow that broke the fix even for 7.0.7 after a while. What helped was to completely uninstall every Adobe Acrobat and Acrobat Reader and clean up the registry.

I still get a dialog box saying "WARNING! A script has requested to print an Acrobat file. This could print an entire document. Do you want to proceed printing?" There is a checkbox to make this not show up but in versions before 7.0.7 it just made the application not print the PDF's at all. So finally I got to know why this happened.

One method to skip this question is to change the registry setting iWarnScriptPrintAll at

HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\7.0\AVAlert\cCheckbox\cEWH

to 1 (DWORD)

before launch of Reader so that the dialog is not displayed. Setting it to 0 will make Reader to show it again.

[HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\7.0\AVAlert\cCheckbox\cEWH]
"iWarnScriptPrintAll"=dword:00000001

Something that is more irritating and that I've not found an easy solution for (let me know if you find it) is that you cannot add a new command to the PDF extension. Try Tools>Folder Options>File Types>Advanced on the PDF and add a new action. Now right click on a PDF and see that it's not there. Go back and try to edit it. Not possible. I suspect that it's the PDF shell extension file pdfshell.dll that does this. Not kind at all.

You might as well run into this and I hope these notes can get help some of you.

Saturday, December 17, 2005

DWG and PDF are alike

Or the title could be "Autodesk and Adobe are alike". When reading this blog post on Acrobat and PDF Clones: What you should know . . . I immediately thought about Autodesk and DWG and the DWG Clones existing for good and bad. Don't you?

Wednesday, December 14, 2005

Kill a process in VB.NET

I have had problems with processes that are not closed correctly. This is what I've done after trying to close it the correct way to ensure it is killed. In this case it is Acrobat that I have run.

res = AcroExchAVDoc.Close(False)
Dim myProcesses As Process() = Process.GetProcessesByName("acrobat")
Dim myProcess As Process
For Each myProcess In myProcesses
  If myProcess.MainWindowTitle = "" Then myProcess.Kill()
Next myProcess
PS. I have not tried this yet but it could be worth trying to use Marshal.FinalReleaseComObject(AcroExchAVDoc)