Hi,
I am trying to change the DPI with the api with Option["DevMode.DPI"] but this give no effect.
the build is 5.5 315 and the dev.env. VS 2012 C#.
Within the documentation there is no description of how to set the DPI.
Can you help with this.
How to change the DPI with the API
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
-
- Site Admin
- Posts: 17949
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: How to change the DPI with the API
Hello DeltaPi,
You should be able to change the DPI via DevMode:
https://forum.pdf-xchange.com/ ... 552#p49552
Or do you want to e.g. downsample images when generating the PDF file?
Regards,
Stefan
You should be able to change the DPI via DevMode:
https://forum.pdf-xchange.com/ ... 552#p49552
Or do you want to e.g. downsample images when generating the PDF file?
Regards,
Stefan
-
- User
- Posts: 5
- Joined: Fri Aug 05, 2005 10:39 am
Re: How to change the DPI with the API
Current i am running a test:
CPXCPrinter.Option[General.Specification]=7
CPXCPrinter.Option[Graphics.Color.Convert.Method]=1
CPXCPrinter.Option[Graphics.Indexed.Convert.Method]=1
CPXCPrinter.Option[Graphics.MonoAndDrawings.Convert.Method]=1
CPXCPrinter.Option[Save.File]=C:\Users\hk\AppData\Local\Temp\DeltaPi\Tempfiles\dpi-test_rvt_12466b1b-c7d4-4fc8-9ff7-679e365e7f39.pdf
CPXCPrinter.Option[Save.ShowSaveDialog]=False
CPXCPrinter.Option[Save.WhenExists]=1
CPXCPrinter.Option[Save.RunApp]=False
CPXCPrinter.ApplyOptions
CPXCPrinter.Option[DevMode.DPI]=72
CPXCPrinter.ApplyOptions
And compare the result pdf with a manual created pdf. But the DPI don't changed.
CPXCPrinter.Option[General.Specification]=7
CPXCPrinter.Option[Graphics.Color.Convert.Method]=1
CPXCPrinter.Option[Graphics.Indexed.Convert.Method]=1
CPXCPrinter.Option[Graphics.MonoAndDrawings.Convert.Method]=1
CPXCPrinter.Option[Save.File]=C:\Users\hk\AppData\Local\Temp\DeltaPi\Tempfiles\dpi-test_rvt_12466b1b-c7d4-4fc8-9ff7-679e365e7f39.pdf
CPXCPrinter.Option[Save.ShowSaveDialog]=False
CPXCPrinter.Option[Save.WhenExists]=1
CPXCPrinter.Option[Save.RunApp]=False
CPXCPrinter.ApplyOptions
CPXCPrinter.Option[DevMode.DPI]=72
CPXCPrinter.ApplyOptions
And compare the result pdf with a manual created pdf. But the DPI don't changed.
-
- Site Admin
- Posts: 17949
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: How to change the DPI with the API
Hello DeltaPi,
Can you please send us those sample files you are comparing as well as the method you use to compare them?
Regards,
Stefan
Can you please send us those sample files you are comparing as well as the method you use to compare them?
Regards,
Stefan
-
- User
- Posts: 5
- Joined: Fri Aug 05, 2005 10:39 am
Re: How to change the DPI with the API
Add a zip with 6 files.
3 files generated with the print from revit:
dpi-test.####.pdf
3 files generated with the api from revit:
dpi-test.rvt_A5-####.pdf
There are 3 DPI's used: 72/300/1200.
3 files generated with the print from revit:
dpi-test.####.pdf
3 files generated with the api from revit:
dpi-test.rvt_A5-####.pdf
There are 3 DPI's used: 72/300/1200.
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 17949
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: How to change the DPI with the API
Thanks DeltaPi,
There are no images in those files - only vector objects - so there is no raster content that needs to be scaled down to 72 DPI.
Regards,
Stefan
There are no images in those files - only vector objects - so there is no raster content that needs to be scaled down to 72 DPI.
Regards,
Stefan
-
- User
- Posts: 5
- Joined: Fri Aug 05, 2005 10:39 am
Re: How to change the DPI with the API
The question is, how can I change the DPI.
Revit use the "Graphics Resolution" on the "Paper" settings.
Revit use the "Graphics Resolution" on the "Paper" settings.
-
- Site Admin
- Posts: 17949
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: How to change the DPI with the API
Hello DeltaPi,
If you want to downsample raster graphics - you can use these settings for the driver api:
https://help.pdf-xchange.com/DEV/de ... K:graphics
Regards,
Stefan
If you want to downsample raster graphics - you can use these settings for the driver api:
https://help.pdf-xchange.com/DEV/de ... K:graphics
Regards,
Stefan
-
- User
- Posts: 5
- Joined: Fri Aug 05, 2005 10:39 am
Re: How to change the DPI with the API
Our customer want to change the DPI from 300 to 1200.
Can I do this with a downsample?
Can I do this with a downsample?
-
- Site Admin
- Posts: 17949
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: How to change the DPI with the API
Hello DeltaPi,
Our printing drivers will take whatever resolution images are sent to it, and put them in the PDF file it generates. If it is larger than a given value that you specify - it can downsample them, but if the original image is 300 DPI - we can not upscale it.
If the objects are vector ones as in your sample - the DPI has little effect - as those vector objects can be rendered at any DPI needed when printed to e.g. paper.
Regards,
Stefan
Our printing drivers will take whatever resolution images are sent to it, and put them in the PDF file it generates. If it is larger than a given value that you specify - it can downsample them, but if the original image is 300 DPI - we can not upscale it.
If the objects are vector ones as in your sample - the DPI has little effect - as those vector objects can be rendered at any DPI needed when printed to e.g. paper.
Regards,
Stefan